diff options
author | Tom Hoover <tom@hisword.net> | 2012-03-02 22:03:23 -0600 |
---|---|---|
committer | Tom Hoover <tom@hisword.net> | 2012-03-02 22:03:23 -0600 |
commit | 8546ca362c7a42aff5ff963c26ce22d0bd2f73ea (patch) | |
tree | d874609b3e0eb3689bb23ff5d32411f452b41446 /git-prompt.conf | |
parent | fix for enable/disable_set_shell_label (diff) | |
download | git-prompt-8546ca362c7a42aff5ff963c26ce22d0bd2f73ea.tar.gz git-prompt-8546ca362c7a42aff5ff963c26ce22d0bd2f73ea.tar.bz2 git-prompt-8546ca362c7a42aff5ff963c26ce22d0bd2f73ea.zip |
added quotation marks around $git_dir/HEAD to prevent "detached" message from appearing in the prompt when $git_dir includes space character(s)
For example, assume a git repository located at /Volumes/Macintosh HD/Users/tom/src/myrepository:
- this bug does not appear when the working directory is the root of the git repository ( e.g. /Volumes/Macintosh HD/Users/tom/src/myrepository ), as $git_dir returns ".git"
- the bug only appears if the directory is changed to one other than the root of the repository ( e.g. /Volumes/Macintosh HD/Users/tom/src/myrepository/DIRECTORY ), as $git_dir will then return the full path "/Volumes/Macintosh HD/Users/tom/src/myrepository/.git". The space between "Macintosh" and "HD" will cause 'grep "^ref:" $git_dir/HEAD' to fail. Adding quotation marks around $git_dir/HEAD allows the grep test to succeed, even when the path includes space character(s).
Diffstat (limited to 'git-prompt.conf')
0 files changed, 0 insertions, 0 deletions