aboutsummaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-02-24 22:10:21 -0800
committerJunio C Hamano <gitster@pobox.com>2015-02-24 22:10:22 -0800
commit93baadb138846320e049999c551ed02020662e3f (patch)
tree120c88bade1489d0de1704816220af2dfd3b3284 /wt-status.c
parent2fc85f05452087298023519cf95e04c9343ec69d (diff)
parent66ec904b4e5779c2ffd68d3bb8071cc15b2287c7 (diff)
downloadgit-93baadb138846320e049999c551ed02020662e3f.tar.gz
git-93baadb138846320e049999c551ed02020662e3f.tar.xz
Merge branch 'jk/status-read-branch-name-fix' into maint
Code to read branch name from various files in .git/ directory would have misbehaved if the code to write them left an empty file. * jk/status-read-branch-name-fix: read_and_strip_branch: fix typo'd address-of operator
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c
index b54eac5af..29666d0db 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1140,7 +1140,7 @@ static char *read_and_strip_branch(const char *path)
if (strbuf_read_file(&sb, git_path("%s", path), 0) <= 0)
goto got_nothing;
- while (&sb.len && sb.buf[sb.len - 1] == '\n')
+ while (sb.len && sb.buf[sb.len - 1] == '\n')
strbuf_setlen(&sb, sb.len - 1);
if (!sb.len)
goto got_nothing;