diff options
Diffstat (limited to 't/t3514-revert-shorthand.sh')
-rwxr-xr-x | t/t3514-revert-shorthand.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t3514-revert-shorthand.sh b/t/t3514-revert-shorthand.sh new file mode 100755 index 0000000000..b802e1d367 --- /dev/null +++ b/t/t3514-revert-shorthand.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +test_description='log can show previous branch using shorthand - for @{-1}' + +. ./test-lib.sh + +test_expect_success 'setup' ' + test_commit first +' + +test_expect_success 'setup branches' ' + echo "hello" >hello && + cat hello >expect && + git add hello && + git commit -m "hello first commit" && + echo "world" >>hello && + git commit -am "hello second commit" && + git checkout -b testing-1 && + git checkout master && + git revert --no-edit - && + cat hello >actual && + test_cmp expect actual +' + +test_done |