ls-files --error-unmatch pathspec error reporting fix.
authorJunio C Hamano <junkio@cox.net>
Wed, 15 Feb 2006 09:10:13 +0000 (01:10 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 15 Feb 2006 09:10:13 +0000 (01:10 -0800)
Earlier patch mistakenly used prefix_len when it meant
prefix_offset.  The latter is to strip the leading directories
when run from a subdirectory.

Signed-off-by: Junio C Hamano <junkio@cox.net>
ls-files.c

index a716e5f..df93cf2 100644 (file)
@@ -757,7 +757,7 @@ int main(int argc, const char **argv)
                        if (ps_matched[num])
                                continue;
                        error("pathspec '%s' did not match any.",
-                             pathspec[num] + prefix_len);
+                             pathspec[num] + prefix_offset);
                }
                return errors ? 1 : 0;
        }