summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-19 13:40:13 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-19 13:40:13 -0700
commit8d41addacbf210038f929dfad4b0c7829392366c (patch)
treef1f77b1685c45188d4e5726250458c0108fe2268 /revision.c
parentde91daf5e6c9346a54ec8afd331017470d280b12 (diff)
parent70d26c6e76d91c04ec53001a21f405b9883e3e3f (diff)
downloadgit-8d41addacbf210038f929dfad4b0c7829392366c.tar.gz
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
Diffstat (limited to 'revision.c')
-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)