Re: [PATCH] git-archive: document CWD effect

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

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

> But just because there is currently no way (that I know of) to change
> the working directory on the remote end that doesn't mean the command
> needs to ignore the working directory when operating locally, where it
> can be changed easily.

I do not think it has much to do with "working directory".  The
remote one would most often be bare, and especially the public
ones are so.  I think the issue is if I ask a tarball of this
commit without giving any specific parameters, what should
happen.

And I think most people find it natural if you give them the
whole tree no matter where they start from.

You could:

        $ git archive HEAD -- t/howto

to have a narrowed tarball, and even if you make:

	$ cd t/howto
	$ git archive HEAD

to produce the whole tree, the user can still do:

	$ cd t/howto
        $ git archive HEAD -- .

to get the narrowed tree if the command understands the prefix
it receives from git_setup_directory().

So while I understand when you say this is "another input
method", letting people in a deep directory to abbreviate their
cwd with "." would equally a good input method, and probably
better than the current implementation, which leaves people
without a single way to say "I want the whole tree" without
cd'ing up.

-
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]