Skip to content

Commit 93baadb

Browse files
committed
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
2 parents 2fc85f0 + 66ec904 commit 93baadb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wt-status.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ static char *read_and_strip_branch(const char *path)
11401140
if (strbuf_read_file(&sb, git_path("%s", path), 0) <= 0)
11411141
goto got_nothing;
11421142

1143-
while (&sb.len && sb.buf[sb.len - 1] == '\n')
1143+
while (sb.len && sb.buf[sb.len - 1] == '\n')
11441144
strbuf_setlen(&sb, sb.len - 1);
11451145
if (!sb.len)
11461146
goto got_nothing;

0 commit comments

Comments
 (0)