]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1_name.c
git-status: use ls-files --others --directory for untracked list.
[thirdparty/git.git] / sha1_name.c
index 67b69a54fb730548f668d274ec58ff4ffc544f37..b13ed78cee0ee7f6d5ed3b45acee7b308a02c3f6 100644 (file)
@@ -188,7 +188,10 @@ const char *find_unique_abbrev(const unsigned char *sha1, int len)
 {
        int status;
        static char hex[41];
+
        memcpy(hex, sha1_to_hex(sha1), 40);
+       if (len == 40)
+               return hex;
        while (len < 40) {
                unsigned char sha1_ret[20];
                status = get_short_sha1(hex, len, sha1_ret, 1);