summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-04-19 13:40:13 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-19 13:40:13 -0700
commit8d41addacbf210038f929dfad4b0c7829392366c (patch)
treef1f77b1685c45188d4e5726250458c0108fe2268
parentMerge branch 'jn/add-2.0-u-A-sans-pathspec' (early part) (diff)
parentread_revisions_from_stdin: make copies for handle_revision_arg (diff)
downloadtgif-8d41addacbf210038f929dfad4b0c7829392366c.tar.xz
Merge branch 'tr/copy-revisions-from-stdin'
A fix to a long-standing issue in the command line parser for revisions, which was triggered by mv/sequence-pick-error-diag topic. * tr/copy-revisions-from-stdin: read_revisions_from_stdin: make copies for handle_revision_arg
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index eb98128868..56d666d69a 100644
--- a/revision.c
+++ b/revision.c
@@ -1276,7 +1276,8 @@ static void read_revisions_from_stdin(struct rev_info *revs,
}
die("options not supported in --stdin mode");
}
- if (handle_revision_arg(sb.buf, revs, 0, REVARG_CANNOT_BE_FILENAME))
+ if (handle_revision_arg(xstrdup(sb.buf), revs, 0,
+ REVARG_CANNOT_BE_FILENAME))
die("bad revision '%s'", sb.buf);
}
if (seen_dashdash)