Re: [PATCH 1/2] Introduce git-run-with-user-path helper program.
- From
Petr Baudis <pasky@ucw.cz>
- Date
- May 18, 2005, 21:33 UTC
- Message-ID
- <20050518213309.GD10358@pasky.ji.cz>
- In-Reply-To
- <7vzmutqz5f.fsf@assigned-by-dhcp.cox.net>
Dear diary, on Wed, May 18, 2005 at 12:13:32AM CEST, I got a letter where Junio C Hamano <junkio@cox.net> told me that...
Show 21 quoted lines
> >>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes: > > PB> But that won't work good enough for me. E.g. when committing in a > PB> subdirectory, I want to commit only changes made in the subdirectory, > PB> etc. > > Assuming that you have something that lets you commit selected > files when you are at the top level (say cg-commit), and further > assuming that today it only works from the toplevel, that is: > > $ pwd > /usr/src/linux > $ cg-commit fs/ext?/Makefile > > works today, what I am saying is: > > $ pwd > /usr/src/linux/fs > $ git-run-with-user-path cg-commit -- ext?/Makefile > > would work.
Yes. But if you do just cg-commit in the subdirectory, it won't work. You could pass the original directory in some environment variable or whatever, but I think that's just not worth the trouble for Cogito - it's much easier for it when you just stay in the directory you are in and instead set the environment variables so that the git toolkit DTRT. (I like this acronym. :-)
> BTW, I am wondering if your choice of cg-commit as an example > (as opposed to something else like diff or add) is a flamebait > or just an innocent random example ;-)?
It was completely innocent. :-) How would it be a flamebait?
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor