summaryrefslogtreecommitdiff
path: root/builtin-for-each-ref.c
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2008-09-25 08:27:53 -0700
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2008-09-25 08:27:53 -0700
commitc9c6cc8d7db312b9e8502f8d55422b8309cde2f3 (patch)
treef13048eaaa0dd450171d2bce68ebe17e7c3a1847 /builtin-for-each-ref.c
parentFix submodule sync with relative submodule URLs (diff)
parentUpdate release notes for 1.6.0.3 (diff)
downloadtgif-c9c6cc8d7db312b9e8502f8d55422b8309cde2f3.tar.xz
Merge branch 'maint'
* maint: Update release notes for 1.6.0.3 checkout: Do not show local changes when in quiet mode for-each-ref: Fix --format=%(subject) for log message without newlines git-stash.sh: don't default to refs/stash if invalid ref supplied maint: check return of split_cmdline to avoid bad config strings
Diffstat (limited to 'builtin-for-each-ref.c')
-rw-r--r--builtin-for-each-ref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 9b44092671..e59bd8075e 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -321,8 +321,8 @@ static const char *find_wholine(const char *who, int wholen, const char *buf, un
static const char *copy_line(const char *buf)
{
const char *eol = strchr(buf, '\n');
- if (!eol)
- return "";
+ if (!eol) // simulate strchrnul()
+ eol = buf + strlen(buf);
return xmemdupz(buf, eol - buf);
}