X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Ffor-each-ref.c;h=a2b28c6962be8ea6f8882bae3d4fde9d972e78d2;hb=5df16453d4da41e5a36de536acf9acc8aab98041;hp=7f5011f75ef9eb549b33861d9546f3d18a94c256;hpb=d0780b0643123dcf68639ac9fc4d79da4e41e6da;p=git.git diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index 7f5011f75..a2b28c696 100644 --- 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); + } } }