Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-08 Thread karthik nayak
On 03/08/2015 12:44 PM, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: Also *(*argv)[1] seems more readable to me, maybe more of a perspective? I also had considered suggesting (*argv)[1][0]

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: Also *(*argv)[1] seems more readable to me, maybe more of a perspective? I also had considered suggesting (*argv)[1][0] as more readable, but it is primarily personal

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread karthik nayak
This iteration looks sensible, except that the Subject reads strange. Will queue with minor tweaks to the log message, and perhaps with a fix to unreadable *(*argv)[1] that was mentioned elsewhere. Thanks. Hey could you tell me what seems strange, so I can improve on it the next time.

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread karthik nayak
On 03/08/2015 10:08 AM, Eric Sunshine wrote: On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: This iteration looks sensible, except that the Subject reads strange. Will queue with minor tweaks to the log message, and perhaps with a fix to unreadable *(*argv)[1]

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-07 Thread Eric Sunshine
On Sat, Mar 7, 2015 at 5:49 AM, karthik nayak karthik@gmail.com wrote: This iteration looks sensible, except that the Subject reads strange. Will queue with minor tweaks to the log message, and perhaps with a fix to unreadable *(*argv)[1] that was mentioned elsewhere. Hey could you tell

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-06 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: 'git -C ' unhelpfully dies with error Cannot change to '', whereas the shell treats `cd ' as a no-op. Taking the shell's behavior as a precedent, teach git to treat `-C ' as a no-op, as well. Test to check the no-op behaviour of -C path when path

Re: [PATCH v4] git: treat -C treat as a no-op when path is empty

2015-03-06 Thread Eric Sunshine
On Fri, Mar 6, 2015 at 6:18 AM, Karthik Nayak karthik@gmail.com wrote: 'git -C ' unhelpfully dies with error Cannot change to '', whereas the shell treats `cd ' as a no-op. Taking the shell's behavior as a precedent, teach git to treat `-C ' as a no-op, as well. Test to check the no-op