Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
for-each-ref: Field with abbreviated objectname
[gitweb.git]
/
builtin
/
for-each-ref.c
diff --git
a/builtin/for-each-ref.c
b/builtin/for-each-ref.c
index 62be1bbfd6659f9dfac73a17acd1e2d5322dac66..3a97953177eee234c310bbf37bab5f2d7e03e5aa 100644
(file)
--- a/
builtin/for-each-ref.c
+++ b/
builtin/for-each-ref.c
@@
-227,6
+227,9
@@
static void grab_common_values(struct atom_value *val, int deref, struct object
strcpy(s, sha1_to_hex(obj->sha1));
v->s = s;
}
+ else if (!strcmp(name, "objectname:short")) {
+ v->s = find_unique_abbrev(obj->sha1, DEFAULT_ABBREV);
+ }
}
}