Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

Re: [PATCH] merge: default to @{upstream}

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:50:28

On Fri, Jan 28, 2011 at 7:56 PM, Jonathan Nieder [off-list ref] wrote:
Other nits: documentation?  tests?  The rest of cmd_merge does not
rely on argv[argc] being NULL, but it might make sense to set argv[1]
to NULL anyway for futureproofing.
Sure, I need to add documentation and tests. I should probably have
sent this as 'RFC'.

Anyway, I don't think we can set argv[1] to NULL, because it's
possible that this is "char *argv[1]", so that would crash. The only
thing the standard ensures, is that the last one would be NULL, so
argv[argc] = NULL, and therefore we can override it, as long as the
rest of the code checks for argc instead of NULL, which AFAIK in the
whole git code it is the case, and certainly in builtin_merge.c
AFAICS.

Cheers.

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