summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorLibravatar Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-04-04 22:14:18 -0400
committerLibravatar Paul Mackerras <paulus@samba.org>2011-07-24 15:34:54 +1000
commit86e847bcbf2b7f8700bcb3f3eaf7d08801e0cbab (patch)
treef4b435abd9a1a51139880a837817b76d3a98154c /fsck.c
parentgitk: Run 'git rev-parse --git-dir' only once (diff)
downloadtgif-86e847bcbf2b7f8700bcb3f3eaf7d08801e0cbab.tar.xz
gitk: Simplify calculation of gitdir
Since 5024baa ([PATCH] Make gitk work when launched in a subdirectory, 2007-01-09), gitk has used 'git rev-parse --git-dir' to find the .git directory. However, gitk still first checks for the $GIT_DIR environment variable and that the value returned from git-rev-parse does not point to a file. Since git-rev-parse does both of these checks already, the checks can safely be removed from gitk. This makes the gitdir procedure small enough to inline. This cleanup introduces a UI regression in that the error message will now be "Cannot find a git repository here." even in the case where GIT_DIR points to a file, for which the error message was previously "Cannot find the git directory \"%s\".". It should be noted, though, that even before this patch, 'gitk --git-dir=path/to/some/file' would give the former error message. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'fsck.c')
0 files changed, 0 insertions, 0 deletions