Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mv/commit-tree'
[gitweb.git]
/
builtin-for-each-ref.c
diff --git
a/builtin-for-each-ref.c
b/builtin-for-each-ref.c
index 9b44092671118e34b3b9c38a91f8330d8b3d95a5..e59bd8075e44a8de23503a8a59c5fdd2575a9243 100644
(file)
--- 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);
}