[RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Linus Torvalds
This does only git-diff-cache and git-diff-files, but the concept should work for any command that uses the working tree. Signed-off-by: Linus Torvalds [EMAIL PROTECTED] --- This is really partly a serious patch, but also just a query whether people would want git to work in subdirectories,

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Yasushi SHOJI
At Tue, 16 Aug 2005 15:45:35 -0700 (PDT), Linus Torvalds wrote: This is really partly a serious patch, but also just a query whether people would want git to work in subdirectories, not just the top-level directory. So you can be in linux/drivers, and if you do a git-diff-files

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Junio C Hamano
Linus Torvalds [EMAIL PROTECTED] writes: If you use the GIT_DIR environment variable approach, it assumes that all filenames you give it are absolute and acts the way it always did before. Comments? Like? Dislike? Comments: Wouldn't that mean git-*-scripts would not benefit from this

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Linus Torvalds
On Tue, 16 Aug 2005, Junio C Hamano wrote: Comments: Wouldn't that mean git-*-scripts would not benefit from this because git-sh-setup would set GIT_DIR for you even if you don't? As it stands now, yes. But the point being that if people like this, then I'll just

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Junio C Hamano
Linus Torvalds [EMAIL PROTECTED] writes: Do you want to take the current patch (which buys you very little because not a lot of stuff has been set up to deal with it, but is the basis for all future work anyway) or do you want me to polish it up a bit and re-submit the whole thing? The

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Daniel Barkalow
On Tue, 16 Aug 2005, Linus Torvalds wrote: If you use the GIT_DIR environment variable approach, it assumes that all filenames you give it are absolute and acts the way it always did before. Comments? Like? Dislike? I'm all in favor, at least in the general case. I suspect there'll be some

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Linus Torvalds
On Tue, 16 Aug 2005, Junio C Hamano wrote: The developement history would look nicer if you did the latter, but I am easy and can go either way. Here is. I'd do at least the git-diff-tree part and the ./ and ../ handling, and convert at least the git diff thing to the new world order

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Junio C Hamano
Linus Torvalds [EMAIL PROTECTED] writes: Mostly done. It actually works from inside subdirectories, but . at the top-level is still not done. Small detail. Will fix later. But it would help if you would apply this, since I'm going to be off for dinner.. Merged, pushed out, and tested. Ouch.

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Linus Torvalds
On Tue, 16 Aug 2005, Junio C Hamano wrote: Merged, pushed out, and tested. Ouch. Fails on t test. It's because the new git-diff-files expects there to be a valid readable .git/HEAD, and is unhappy since the test hasn't updated HEAD. This trivial patch fixes it. Linus

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

2005-08-16 Thread Junio C Hamano
Linus Torvalds [EMAIL PROTECTED] writes: On Tue, 16 Aug 2005, Junio C Hamano wrote: Merged, pushed out, and tested. Ouch. Fails on t test. It's because the new git-diff-files expects there to be a valid readable .git/HEAD, and is unhappy since the test hasn't updated HEAD. Ah, good