git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] Teach git to change to a given directory using -C option

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 3, 2013, 23:37 UTC
Message-ID
<CAPig+cR6gsv+D4gu+hWStqp1t2C6ZkeSkqbg9H8UuQtHQhSmNg@mail.gmail.com>
In-Reply-To
<xmqq8uzdplqv.fsf@gitster.dls.corp.google.com>
On Tue, Sep 3, 2013 at 6:46 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> Nazri Ramliy <ayiehere@gmail.com> writes:
>
>> -- >8 --
>> diff --git a/Documentation/git.txt b/Documentation/git.txt
>> index 83edf30..6105cb0 100644
>> --- a/Documentation/git.txt
>> +++ b/Documentation/git.txt
>> @@ -9,7 +9,7 @@ git - the stupid content tracker
>>  SYNOPSIS
>>  --------
>>  [verse]
>> -'git' [--version] [--help] [-c <name>=<value>]
>> +'git' [--version] [--help] [-C <path>] [-c <name>=<value>]
>
> I do not care too deeply either way, but I am curious if there was a
> reason why you changed the earlier <directory> to <path>?  Somehow,
> when we _know_ a path has to be a directory, I find it easier on the
> readers to spell that out, instead of saying "this is a path",
> implying that it could be a directory, a regular file, or even
> non-existent.
That change was in response to my review [1] in which I mentioned:
    Other options which accept a directory, such as --git-dir and
    --work-tree, are documented as accepting <path>, but -C is
    inconsistently documented as accepting <directory>.
>>      [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
>>      [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
>>      [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]

Thus <directory> was inconsistent with existing text in git.txt, such as what is visible here for --git-dir and --work-tree, as well as later in git.txt where --git-dir and --work-tree are described in more detail (also using <path>).

[1]: http://thread.gmane.org/gmane.comp.version-control.git/233441/focus=233564
Previous: Junio C HamanoNext: Nazri Ramliy
Message 3 of 14 in “Teach git to change to a given directory using -C option”
  1. Teach git to change to a given directory using -C optionNazri Ramliy, Sep 3, 2013
  2. Junio C HamanoSep 3, 2013
  3. Eric SunshineSep 3, 2013
  4. Nazri RamliySep 4, 2013
  5. Eric SunshineSep 4, 2013
  6. Nazri RamliySep 4, 2013
  7. Eric SunshineSep 8, 2013
  8. Nazri RamliySep 9, 2013
  9. Eric SunshineSep 9, 2013
  10. Nazri RamliySep 9, 2013
  11. Junio C HamanoSep 9, 2013
  12. Eric SunshineSep 9, 2013
  13. Junio C HamanoSep 9, 2013
  14. Eric SunshineSep 9, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.