Re: [PATCH 2/2] Handle invalid argc gently

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/2] Handle invalid argc gently

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:40

"Dmitry V. Levin" [off-list ref] writes:
On Wed, Sep 13, 2006 at 06:12:02PM -0700, Junio C Hamano wrote:
quoted
"Dmitry V. Levin" [off-list ref] writes:
quoted
describe, git: Handle argc==0 case the same way as argc==1.
When does one get (ac == 0)?
When one executes something like
execlp("git", NULL, NULL);
Fair enough.

What is the valid reason to do execlp("git", NULL, NULL)?

Re: [PATCH 2/2] Handle invalid argc gently

From: Dmitry V. Levin <hidden>
Date: 2016-06-15 22:42:40

On Wed, Sep 13, 2006 at 11:34:05PM -0700, Junio C Hamano wrote:
"Dmitry V. Levin" [off-list ref] writes:
quoted
On Wed, Sep 13, 2006 at 06:12:02PM -0700, Junio C Hamano wrote:
quoted
"Dmitry V. Levin" [off-list ref] writes:
quoted
describe, git: Handle argc==0 case the same way as argc==1.
When does one get (ac == 0)?
When one executes something like
execlp("git", NULL, NULL);
Fair enough.

What is the valid reason to do execlp("git", NULL, NULL)?
Personally I do not plan to execute git this way on regular basis, indeed. :)

But argc == 0 is allowed, so why should git crash?


-- 
ldv
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help