diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-19 01:38:18 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-19 01:38:18 -0800 |
commit | 5fed4668153c9ca6e44ec84a0976089f515705aa (patch) | |
tree | 82f3ce0d2ea76ca31cebd3a5b40d0993e019859a /ident.c | |
parent | 63085fabbdeaad9eb8b29d39d0998c704e6cd232 (diff) | |
parent | 8683a45d66967b0969516a2b72cdbf136c2064a2 (diff) | |
download | git-5fed4668153c9ca6e44ec84a0976089f515705aa.tar.gz |
Merge branch 'jc/test-clone' into jc/clone
* jc/test-clone: (35 commits)
Introduce GIT_TEMPLATE_DIR
Revert "fix testsuite: make sure they use templates freshly built from the source"
fix testsuite: make sure they use templates freshly built from the source
rerere: fix breakage of resolving.
Add config example with respect to branch
Add documentation for show-branch --topics
make git a bit less cryptic on fetch errors
make patch_delta() error cases a bit more verbose
racy-git: documentation updates.
show-ref: fix --exclude-existing
parse-remote::expand_refs_wildcard()
vim syntax: follow recent changes to commit template
show-ref: fix --verify --hash=length
show-ref: fix --quiet --verify
avoid accessing _all_ loose refs in git-show-ref --verify
git-fetch: Avoid reading packed refs over and over again
Teach show-branch how to show ref-log data.
markup fix in svnimport documentation.
Documentation: new option -P for git-svnimport
Fix mis-mark-up in git-merge-file.txt documentation
...
Diffstat (limited to 'ident.c')
-rw-r--r-- | ident.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -221,3 +221,18 @@ const char *git_committer_info(int error_on_no_name) getenv("GIT_COMMITTER_DATE"), error_on_no_name); } + +void ignore_missing_committer_name() +{ + /* If we did not get a name from the user's gecos entry then + * git_default_name is empty; so instead load the username + * into it as a 'good enough for now' approximation of who + * this user is. + */ + if (!*git_default_name) { + struct passwd *pw = getpwuid(getuid()); + if (!pw) + die("You don't exist. Go away!"); + strlcpy(git_default_name, pw->pw_name, sizeof(git_default_name)); + } +} |