Git development
 help / color / mirror / Atom feed
From: kevin brintnall <kbrint@rufus.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] added -C option to chdir() into another directory first
Date: Thu, 26 Feb 2009 14:44:23 -0600	[thread overview]
Message-ID: <20090226204423.GA34377@rufus.net> (raw)
In-Reply-To: <7vr61lq6ky.fsf@gitster.siamese.dyndns.org>

On Thu, Feb 26, 2009 at 12:35:57PM -0800, Junio C Hamano wrote:
> kevin brintnall <kbrint@rufus.net> 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"?

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/

  reply	other threads:[~2009-02-26 20:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 20:11 [PATCH] added -C option to chdir() into another directory first kevin brintnall
2009-02-26 20:35 ` Junio C Hamano
2009-02-26 20:44   ` kevin brintnall [this message]
2009-02-26 21:50     ` Junio C Hamano
2009-02-27 14:21 ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090226204423.GA34377@rufus.net \
    --to=kbrint@rufus.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox