quoted
quoted
quoted
quoted
"PB" == Petr Baudis [off-list ref] writes:
quoted
$ pwd
/usr/src/linux/fs
$ git-run-with-user-path cg-commit -- ext?/Makefile
would work.
PB> Yes. But if you do just cg-commit in the subdirectory, it won't work.
The point of git-run-with-user-path is that it canonicalizes and
filters the paths, chdir(2)'s to GIT_PROJECT_TOP before running
cg-commit. So when cg-commit starts in the above example,
(1) its $cwd is /usr/src/linux and your .git subdirectory is
right there in ./.git/
(2) it gets fs/ext2/Makefile and fs/ext3/Makefile as arguments.
quoted
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 ;-)?
PB> It was completely innocent. :-) How would it be a flamebait?
<http://members.cox.net/junkio/per-file-commit.txt> ;-).
Dear diary, on Thu, May 19, 2005 at 12:41:38AM CEST, I got a letter
where Junio C Hamano [off-list ref] told me that...
quoted
quoted
quoted
quoted
quoted
"PB" == Petr Baudis [off-list ref] writes:
quoted
quoted
$ pwd
/usr/src/linux/fs
$ git-run-with-user-path cg-commit -- ext?/Makefile
would work.
PB> Yes. But if you do just cg-commit in the subdirectory, it won't work.
The point of git-run-with-user-path is that it canonicalizes and
filters the paths, chdir(2)'s to GIT_PROJECT_TOP before running
cg-commit. So when cg-commit starts in the above example,
(1) its $cwd is /usr/src/linux and your .git subdirectory is
right there in ./.git/
(2) it gets fs/ext2/Makefile and fs/ext3/Makefile as arguments.
Yes. My point is that sometimes the Cogito commands have
directory-specific functionality even when called without any arguments.
$ pwd
/usr/src/linux
$ date >>README
$ cd fs
$ date >>Makefile
$ cg-commit
will commit only the fs/Makefile change.
quoted
quoted
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 ;-)?
PB> It was completely innocent. :-) How would it be a flamebait?
<http://members.cox.net/junkio/per-file-commit.txt> ;-).
JIT's snapshotting makes up for it, I think. It has some beauty. :-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Hello,
quoted
<http://members.cox.net/junkio/per-file-commit.txt> ;-).
I think the workflow that involves per-file commit is
fundamentally broken at two levels.
I disagree here. We at FAUmachine often have FLAGS to turn on specific
features or debugging output by tweaking a headerfile. However we commit
often and work in small steps (at the moment using CVS because every
developer has write access). And we definitely don't want to tweak the
header file every time we commit, so I often do a:
cvs diff > diff
vim diff
lsdiff diff
cvs commit <interesting files here>
Thomas