Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t5520: check reflog action in fast-forward merge
author
Paul Tan
<pyokagan@gmail.com>
Fri, 29 May 2015 11:44:45 +0000
(19:44 +0800)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 29 May 2015 16:16:11 +0000
(09:16 -0700)
When testing a fast-forward merge with git-pull, check to see if the
reflog action is "pull" with the arguments passed to git-pull.
While we are in the vicinity, remove the empty line as well.
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5520-pull.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
5504f13
)
diff --git
a/t/t5520-pull.sh
b/t/t5520-pull.sh
index a04f55c40ab9d1d2fcddf85dcd866db5b5bbe52a..af31f04c285c0a89af25353aba857a42bcc01124 100755
(executable)
--- a/
t/t5520-pull.sh
+++ b/
t/t5520-pull.sh
@@
-86,7
+86,6
@@
test_expect_success 'pulling into void must not create an octopus' '
'
test_expect_success 'test . as a remote' '
'
test_expect_success 'test . as a remote' '
-
git branch copy master &&
git config branch.copy.remote . &&
git config branch.copy.merge refs/heads/master &&
git branch copy master &&
git config branch.copy.remote . &&
git config branch.copy.merge refs/heads/master &&
@@
-95,7
+94,11
@@
test_expect_success 'test . as a remote' '
git checkout copy &&
test "$(cat file)" = file &&
git pull &&
git checkout copy &&
test "$(cat file)" = file &&
git pull &&
- test "$(cat file)" = updated
+ test "$(cat file)" = updated &&
+ git reflog -1 >reflog.actual &&
+ sed "s/^[0-9a-f][0-9a-f]*/OBJID/" reflog.actual >reflog.fuzzy &&
+ echo "OBJID HEAD@{0}: pull: Fast-forward" >reflog.expected &&
+ test_cmp reflog.expected reflog.fuzzy
'
test_expect_success 'the default remote . should not break explicit pull' '
'
test_expect_success 'the default remote . should not break explicit pull' '
@@
-106,7
+109,11
@@
test_expect_success 'the default remote . should not break explicit pull' '
git reset --hard HEAD^ &&
test "$(cat file)" = file &&
git pull . second &&
git reset --hard HEAD^ &&
test "$(cat file)" = file &&
git pull . second &&
- test "$(cat file)" = modified
+ test "$(cat file)" = modified &&
+ git reflog -1 >reflog.actual &&
+ sed "s/^[0-9a-f][0-9a-f]*/OBJID/" reflog.actual >reflog.fuzzy &&
+ echo "OBJID HEAD@{0}: pull . second: Fast-forward" >reflog.expected &&
+ test_cmp reflog.expected reflog.fuzzy
'
test_expect_success 'fail if wildcard spec does not match any refs' '
'
test_expect_success 'fail if wildcard spec does not match any refs' '