Re: [RFC/PATCH] ls-files: fix pathspec display on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clemens Buchacher <drizzd@xxxxxx> writes:

> The following sequence of commands reveals an issue with error
> reporting of relative paths:
>
>  $ mkdir sub
>  $ cd sub
>  $ git ls-files --error-unmatch ../bbbbb
>  error: pathspec 'b' did not match any file(s) known to git.
>  $ git commit --error-unmatch ../bbbbb
>  error: pathspec 'b' did not match any file(s) known to git.
>
> This bug is visible only if the normalized path (i.e., the relative
> path from the repository root) is longer than the prefix.
> Otherwise, the code skips over the normalized path and reads from
> an unused memory location which still contains a leftover of the
> original command line argument.
>
> So instead, use the existing facilities to deal with relative paths
> correctly.

Sounds sane; tests?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]