Re: [PATCH] Teach 'git apply' to look at $GIT_DIR/config

From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Date: 2007-02-18 11:53:52
Hi,

On Sat, 17 Feb 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > ... However, I suspect you have to 'cd' back to prefix, or else the 
> > patch gets applied in the repo root, right? (Disclaimer: I did not 
> > read the patch.)
> 
> Actually, not cd-ing up was a bug, since git diff is always relative to 
> root.  The behaviour to apply the same file was inconsistent between 
> with --index and without as far as I can tell.

For the same reason that I like git-merge-file, and git-diff2, namely to 
have a _sane_ tool with a lot of options, which works the same everywhere 
I have git, I also like git-apply.

And I use git-apply to apply patches way more often than "patch" these 
days. And I _think_ that it is a feature that it does not cd-up before 
trying to apply the stuff. In git.git, I cannot think of a reasonable use 
case for applying something not relative-to-root, but I had that use case 
in some other (git-tracked) project.

So my vote is to leave the cwd where it is in git-apply.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Feb 18 11:54:40 2007

This archive was generated by hypermail 2.1.8 : 2007-02-18 11:56:35 EST