diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-02-17 10:15:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-17 10:15:29 -0800 |
commit | fccf4a05675b9da0feb8a2f3d11fb53eb44d7dae (patch) | |
tree | fdb6cad982fd40627af93d18d9f17e0c3a6b16b1 | |
parent | Merge branch 'jk/remote-curl-an-array-in-struct-cannot-be-null' (diff) | |
parent | read_and_strip_branch: fix typo'd address-of operator (diff) | |
download | tgif-fccf4a05675b9da0feb8a2f3d11fb53eb44d7dae.tar.xz |
Merge branch 'jk/status-read-branch-name-fix'
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
-rw-r--r-- | wt-status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index b54eac5af6..29666d0dba 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; |