diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-17 13:54:00 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-17 13:54:00 -0700 |
commit | d39cab3989f9e660cae124f78143369b13ad2901 (patch) | |
tree | c7968b5d7ff14c5d4a2207e101a92e17cbbbc964 /t/t5612-clone-refspec.sh | |
parent | 1c515bf7e2b395509a122fb92cd6f925bf09a6fe (diff) | |
parent | 0bc8d71b99e91c9e90b519073b639a5066119591 (diff) | |
download | git-d39cab3989f9e660cae124f78143369b13ad2901.tar.gz |
Merge branch 'ab/fetch-tags-noclobber'
The rules used by "git push" and "git fetch" to determine if a ref
can or cannot be updated were inconsistent; specifically, fetching
to update existing tags were allowed even though tags are supposed
to be unmoving anchoring points. "git fetch" was taught to forbid
updates to existing tags without the "--force" option.
* ab/fetch-tags-noclobber:
fetch: stop clobbering existing tags without --force
fetch: document local ref updates with/without --force
push doc: correct lies about how push refspecs work
push doc: move mention of "tag <tag>" later in the prose
push doc: remove confusing mention of remote merger
fetch tests: add a test for clobbering tag behavior
push tests: use spaces in interpolated string
push tests: make use of unused $1 in test description
fetch: change "branch" to "reference" in --force -h output
Diffstat (limited to 't/t5612-clone-refspec.sh')
-rwxr-xr-x | t/t5612-clone-refspec.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5612-clone-refspec.sh b/t/t5612-clone-refspec.sh index 5582b3d5fd..e36ac01661 100755 --- a/t/t5612-clone-refspec.sh +++ b/t/t5612-clone-refspec.sh @@ -103,7 +103,7 @@ test_expect_success 'clone with --no-tags' ' test_expect_success '--single-branch while HEAD pointing at master' ' ( cd dir_master && - git fetch && + git fetch --force && git for-each-ref refs/remotes/origin | sed -e "/HEAD$/d" \ -e "s|/remotes/origin/|/heads/|" >../actual @@ -114,7 +114,7 @@ test_expect_success '--single-branch while HEAD pointing at master' ' test_cmp expect actual && ( cd dir_master && - git fetch --tags && + git fetch --tags --force && git for-each-ref refs/tags >../actual ) && git for-each-ref refs/tags >expect && |