diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-04-17 23:14:33 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-17 23:27:03 -0700 |
commit | 664059fb624467975da5c9a4bf6053c83126eaa7 (patch) | |
tree | 7f01a0081438385c561d336ae2db4b85d4fe27fd /t/t5801-remote-helpers.sh | |
parent | 9c51558cfb6ffe104da45d324194d9f1ebf9bc65 (diff) | |
download | git-664059fb624467975da5c9a4bf6053c83126eaa7.tar.gz |
transport-helper: update remote helper namespace
When pushing, the remote namespace is updated correctly
(e.g. refs/origin/master), but not the remote helper's
(e.g. refs/testgit/origin/master), which currently is only
updated while fetching.
Since the remote namespace is used to tell fast-export which commits
to avoid (because they were already imported/exported), it makes
sense to have them in sync so they don't get generated twice. If the
remote helper was implemented properly, they would be ignored, if
not, they probably would end up repeated.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5801-remote-helpers.sh')
-rwxr-xr-x | t/t5801-remote-helpers.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index f572271941..4dcf744f97 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -153,6 +153,18 @@ test_expect_success 'push ref with existing object' ' compare_refs local dup server dup ' +test_expect_success 'push update refs' ' + (cd local && + git checkout -b update master && + echo update >>file && + git commit -a -m update && + git push origin update + git rev-parse --verify remotes/origin/update >expect && + git rev-parse --verify testgit/origin/heads/update >actual && + test_cmp expect actual + ) +' + test_expect_success 'proper failure checks for fetching' ' (GIT_REMOTE_TESTGIT_FAILURE=1 && export GIT_REMOTE_TESTGIT_FAILURE && |