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 9, 2013, 18:43 UTC
Message-ID
<CAPig+cTLnMqcemMRn+fDZJDP6KH6Qn5HwKUbRViRhc60fMqfHw@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 12 quoted lines
>> +     echo "initial in dir1/dir2" >expected &&
>> +     git -C dir1/dir2 commit -m "initial in dir1/dir2" &&
>
> to reduce possibilities of breaking this test in the future due to
> typos (e.g. somebody may want to say "initial commit in dir1/dir2"),
> doing this may be a better idea:
>
>         msg="initial in dir1/dir2" &&
>         echo "$msg" >expected &&
>         git -C dir1/dir2 commit -m "$msg" &&
>
> The same comment applies to the previous one.

In his original submission, Nazri actually had it the way you suggest for this test (though not the preceding test), but changed it in response to a silly parenthetical "IMHO" in my review [1].

[1]: http://thread.gmane.org/gmane.comp.version-control.git/233636/focus=233704
Previous: Junio C Hamano
Message 14 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.