All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Maciej Pasternacki <maciej@pasternacki.net>, git@vger.kernel.org
Subject: Re: [PATCH] -C/--chdir command line option
Date: Sun, 19 Oct 2008 21:55:57 -0700	[thread overview]
Message-ID: <7vr66b50gy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20081019141634.GA8997@coredump.intra.peff.net> (Jeff King's message of "Sun, 19 Oct 2008 10:16:34 -0400")

Jeff King <peff@peff.net> writes:

> On Sun, Oct 19, 2008 at 03:47:04PM +0200, Maciej Pasternacki wrote:
>
>> As for -C being superfluous: --git-dir and --work-tree seem to support  
>> weird usage patterns (like work tree separate from git-dir), but it seems 
>
> Hmm. Yeah, thinking about it more, -C is not really superfluous with
> respect to those options. You don't want to say "here is the work-tree,
> and here is the git-dir". You want to say "find the work-tree and
> git-dir for me using the usual rules, as if I were in this directory."

I think that interpretation of -C, if the option existed, makes sense, but
I do not understand why the tool that drives git refuses to chdir to the
repository for itself in the first place.

The only excuse I remember seeing in the thread was that "make has '-C'
option, so let's have it, because it is similar", which does not justfiy
addition of that option to git at all to me.

With "make", the -C option can be justified as a necessary tool to write a
recursive Makefile that can be sanely and easily processed without
actually executing any commands (iow, imaging implementing "make" that
allows you to write "cd there && $(MAKE)" in the toplevel Makefile and
tells the users what would happen in "there" when run as "make -n").

And even in "make" context, not all implementations have it.  I think it
is only GNU and fairly recent BSDs.

  parent reply	other threads:[~2008-10-20  5:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-19  0:02 [PATCH] -C/--chdir command line option Maciej Pasternacki
2008-10-19 13:17 ` Jeff King
2008-10-19 13:47   ` Maciej Pasternacki
2008-10-19 14:16     ` Jeff King
2008-10-19 15:24       ` Maciej Pasternacki
2008-10-20  4:55       ` Junio C Hamano [this message]
2008-10-20  5:41         ` Junio C Hamano
2008-10-20  6:26           ` Alex Riesen
2008-10-20 12:57         ` Michael J Gruber
2008-10-20 13:59   ` Nguyen Thai Ngoc Duy
     [not found] <DDFCD680-C477-4BE5-AB71-3F26048E26D1@pasternacki.net>
2008-10-20  7:28 ` Maciej Pasternacki

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=7vr66b50gy.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=maciej@pasternacki.net \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.