summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2244eab)
raw | patch | inline | side by side (parent: 2244eab)
author | Jay Soffian <jaysoffian@gmail.com> | |
Thu, 26 Aug 2010 21:34:29 +0000 (17:34 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Aug 2010 23:42:25 +0000 (16:42 -0700) |
When objectname:short was introduced, it forgot to copy the result of
find_unique_abbrev. Because the result of find_unique_abbrev is a
pointer to static buffer, this resulted in the same value being
substituted in for each ref.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
find_unique_abbrev. Because the result of find_unique_abbrev is a
pointer to static buffer, this resulted in the same value being
substituted in for each ref.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/for-each-ref.c | patch | blob | history |
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index a2b28c6962be8ea6f8882bae3d4fde9d972e78d2..89e75c6894e6fdb2abbe464d825f5c7186a14141 100644 (file)
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
v->s = s;
}
else if (!strcmp(name, "objectname:short")) {
- v->s = find_unique_abbrev(obj->sha1, DEFAULT_ABBREV);
+ v->s = xstrdup(find_unique_abbrev(obj->sha1,
+ DEFAULT_ABBREV));
}
}
}