Re: [PATCH v3] Teach git to change to a given directory using -C option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Sep 9, 2013, 17:42 UTC
- Message-ID
- <CAPig+cQEor+dBU6Xww25A4Sc-mgEOq1SDmBX-9xM6pKuMqu-NQ@mail.gmail.com>
- In-Reply-To
- <xmqqtxhu3qil.fsf@gitster.dls.corp.google.com>
On Mon, Sep 9, 2013 at 12:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Nazri Ramliy <ayiehere@gmail.com> writes: > >> Subject: git: run in a directory given with -C option >> >> +-C <path>:: >> + Run as if git was started in '<path>' instead of the current working >> + directory. When multiple '-C' options are given, each subsequent > > I think this should be `-C` to typeset it as "typed literally". > >> + non-absolute `-C <path>` is interpreted relative to the preceding `-C >> + <path>`. >> ++ >> +This option affects options that expect path name like '--git-dir' and >> +'--work-tree' in that their interpretations of the path names would be > > Likewise for `--git-dir` and `--work-tree`. > >> +made relative to the working directory caused by the '-C' option. For > > and here.
I agree with all of the above, however, the unfortunate typesetting in these cases was chosen deliberately to be consistent with the immediately surrounding text. A separate typesetting normalization patch, either before or after this patch, would not be unwelcome. (I forgot to make such a suggestion in [1].)
[1]: http://thread.gmane.org/gmane.comp.version-control.git/233719/focus=234234