Re: [PATCH v3] git: make git -C '' cmd not to barf

2015-03-06 Thread karthik nayak
On 03/06/2015 02:23 PM, Eric Sunshine wrote: On Fri, Mar 6, 2015 at 2:05 AM, Karthik Nayak karthik@gmail.com wrote: It now acts like cd '' and does not barf and treats it as a no-op. What does barf mean in this context? Does the program crash? Spit out nonsensical messages? Misbehave in

Re: [PATCH v3] git: make git -C '' cmd not to barf

2015-03-06 Thread Andreas Schwab
Karthik Nayak karthik@gmail.com writes: + if (*((*argv)[1]) == 0) IMHO (*argv)[1][0] is easier to understand. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely

Re: [PATCH v3] git: make git -C '' cmd not to barf

2015-03-06 Thread Junio C Hamano
Andreas Schwab sch...@linux-m68k.org writes: Karthik Nayak karthik@gmail.com writes: +if (*((*argv)[1]) == 0) IMHO (*argv)[1][0] is easier to understand. Thanks for saying that. I had to scratch my head every time I had to see this change from various people ;-) --

Re: [PATCH v3] git: make git -C '' cmd not to barf

2015-03-06 Thread Eric Sunshine
On Fri, Mar 6, 2015 at 2:05 AM, Karthik Nayak karthik@gmail.com wrote: It now acts like cd '' and does not barf and treats it as a no-op. What does barf mean in this context? Does the program crash? Spit out nonsensical messages? Misbehave in some fashion? A good commit message should

[PATCH v3] git: make git -C '' cmd not to barf

2015-03-05 Thread Karthik Nayak
It now acts like cd '' and does not barf and treats it as a no-op. This is useful if a caller function does not want to change directory and hence gives no path value, which would have generally caused git to output an undesired error message. Included a simple test to check the same, as