author | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 May 2011 21:01:19 +0000 (14:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 11 May 2011 21:43:56 +0000 (14:43 -0700) | ||
commit | 4da5af3151301d25a25d60a90b8275eaca13de86 | |
tree | a7973fe80bb83266276853456cc84b0a08667578 | tree | snapshot |
parent | 902f235378cb2b2f6dd5dd664b9630c95321f0ae | commit | diff |
setup_revisions(): take pathspec from command line and --stdin correctly
When the command line has "--" disambiguator, we take the remainder of
argv[] as "prune_data", but when --stdin is given at the same time,
we need to append to the existing prune_data and end up attempting to
realloc(3) it. That would not work.
Fix it by consistently using append_prune_data() throughout the input
processing. Also avoid counting the number of existing paths in the
function over and over again.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When the command line has "--" disambiguator, we take the remainder of
argv[] as "prune_data", but when --stdin is given at the same time,
we need to append to the existing prune_data and end up attempting to
realloc(3) it. That would not work.
Fix it by consistently using append_prune_data() throughout the input
processing. Also avoid counting the number of existing paths in the
function over and over again.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c | diff | blob | history | |
t/t6017-rev-list-stdin.sh | diff | blob | history |