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