Re: [PATCH] added -C option to chdir() into another directory first

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] added -C option to chdir() into another directory first

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:17

kevin brintnall [off-list ref] writes:
This allows things like 'git -C /somewhere pull' without specifying both
--work-tree and --git-dir.
Where should "git -C sub/dir apply this.patch" find the file "this.patch"?

More generally, when "git -C there cmd arg1 arg2 arg3..." is run, how
should the implementation of cmd learn what to prefix arg$N with?

Re: [PATCH] added -C option to chdir() into another directory first

From: kevin brintnall <hidden>
Date: 2016-06-15 22:46:17

On Thu, Feb 26, 2009 at 12:35:57PM -0800, Junio C Hamano wrote:
kevin brintnall [off-list ref] writes:
quoted
This allows things like 'git -C /somewhere pull' without specifying both
--work-tree and --git-dir.
Where should "git -C sub/dir apply this.patch" find the file "this.patch"?
Good question..  It should probably come from the original $PWD.  Maybe we
should have "-C $DIR" simulate "--work-tree=$DIR --git=dir=$DIR/.git" ?
More generally, when "git -C there cmd arg1 arg2 arg3..." is run, how
should the implementation of cmd learn what to prefix arg$N with?
I envisioned these two as equivalent:

	git -C $DIR something
	cd $DIR ; git something

-- 
 kevin brintnall =~ /kbrint@rufus.net/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help