Merge branch 'ls/p4-empty-file-on-lfs'
[gitweb.git] / builtin / rev-parse.c
index c352f2f8b25b0bce7d3c9f2dc48eeb7f9cce0e7c..ff13e59e1dbd200b6e7cf7d1c508b620b19e8cc7 100644 (file)
@@ -676,8 +676,9 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
                                filter &= ~(DO_FLAGS|DO_NOREV);
                                verify = 1;
                                abbrev = DEFAULT_ABBREV;
-                               if (arg[7] == '=')
-                                       abbrev = strtoul(arg + 8, NULL, 10);
+                               if (!arg[7])
+                                       continue;
+                               abbrev = strtoul(arg + 8, NULL, 10);
                                if (abbrev < MINIMUM_ABBREV)
                                        abbrev = MINIMUM_ABBREV;
                                else if (40 <= abbrev)