aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-05-09 12:42:17 -0700
committerJunio C Hamano <gitster@pobox.com>2013-05-09 12:42:17 -0700
commit07e03d466531397f9a78534ccac98b61bbafbdd6 (patch)
tree6cb08796932c6add7ca6820616303d4ad575cd20
parentea2d20d4c2216faa8ff4525e9e73b26509405766 (diff)
parent70d26c6e76d91c04ec53001a21f405b9883e3e3f (diff)
downloadgit-07e03d466531397f9a78534ccac98b61bbafbdd6.tar.gz
git-07e03d466531397f9a78534ccac98b61bbafbdd6.tar.xz
Merge branch 'tr/copy-revisions-from-stdin' into maint
* 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 cf620c6b3..9df13ca86 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)