diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-06-14 00:32:09 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-29 10:36:13 -0700 |
commit | e0ef8495e98ae5ae796ec23bf438eef413557193 (patch) | |
tree | 6a00f01db78ed30adda8fe25d975b020654895d7 /t | |
parent | Merge commit 'v1.7.2-rc0~6^2' into cc/cherry-pick-stdin (diff) | |
download | tgif-e0ef8495e98ae5ae796ec23bf438eef413557193.tar.xz |
revert: do not rebuild argv on heap
Set options in struct rev_info directly so we can reuse the
arguments collected from parse_options without modification.
This is just a cleanup; no noticeable change is intended.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3501-revert-cherry-pick.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh index 7f858151d4..f61c54dfe2 100755 --- a/t/t3501-revert-cherry-pick.sh +++ b/t/t3501-revert-cherry-pick.sh @@ -41,6 +41,24 @@ test_expect_success setup ' git tag rename2 ' +test_expect_success 'cherry-pick --nonsense' ' + + pos=$(git rev-parse HEAD) && + git diff --exit-code HEAD && + test_must_fail git cherry-pick --nonsense 2>msg && + git diff --exit-code HEAD "$pos" && + grep '[Uu]sage:' msg +' + +test_expect_success 'revert --nonsense' ' + + pos=$(git rev-parse HEAD) && + git diff --exit-code HEAD && + test_must_fail git revert --nonsense 2>msg && + git diff --exit-code HEAD "$pos" && + grep '[Uu]sage:' msg +' + test_expect_success 'cherry-pick after renaming branch' ' git checkout rename2 && |