summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 356af64)
raw | patch | inline | side by side (parent: 356af64)
author | Alex Riesen <raa.lkml@gmail.com> | |
Sun, 26 Oct 2008 22:08:52 +0000 (23:08 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 27 Oct 2008 05:25:09 +0000 (22:25 -0700) |
Replace them with mksnpath/git_snpath and a local buffer
for the resulting string.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
for the resulting string.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
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 fa6c1ed75285649943e0e62ee0b66ef146dda517..e46b7adc9719e147536398e8e365d6d3e65a4ba7 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
for (j = 0; j < i; j++) {
const char *rule = ref_rev_parse_rules[j];
unsigned char short_objectname[20];
+ char refname[PATH_MAX];
/*
* the short name is ambiguous, if it resolves
* (with this previous rule) to a valid ref
* read_ref() returns 0 on success
*/
- if (!read_ref(mkpath(rule, short_name_len, short_name),
- short_objectname))
+ mksnpath(refname, sizeof(refname),
+ rule, short_name_len, short_name);
+ if (!read_ref(refname, short_objectname))
break;
}