Re: mangled file names in git checkout-index --temp output when run in repo subdirectory

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

 



On Tue, Dec 23, 2014 at 11:36 AM, Russ Cox <rsc@xxxxxxxxxx> wrote:
> I am using git checkout-index --temp to obtain copies of files from
> the index, but it does not always print valid file names unless run
> from the repository root.
>
> git checkout-index --temp prints names of files in the index
> interpreted relative to the current directory below the repository
> root.
>
> If you have a git repo in /tmp/gitbug, you are in /tmp/gitbug/dir1,
> and you run git checkout-index --temp /tmp/gitbug/dir1/file1, the file
> listing prints just "file1". So far so good.
>
> However, this file name shortening appears to assume that all file
> names being printed will be within the subtree rooted at the current
> directory, and it just skips over the first N characters in the name,
> where N is the length of the current directory name relative to the
> repo root (in the above example, N = len("dir1/") = 5).

Indeed, although the "checkout" functionality of checkout-index
properly handles relative paths above the current directory, the code
which prints them doesn't. I'm working up a patch.
--
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]