summaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
AgeCommit message (Collapse)AuthorFilesLines
2007-07-04Fix t5516 to create test repo without hooksLibravatar Alex Riesen1-1/+2
Otherwise the hooks will be executed on cygwin and the test will fail because of the contributed hooks. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-01Fix t5516-fetch for systems where `wc -l` outputs whitespace.Libravatar Brian Gernhardt1-2/+2
When wc outputs whitespace, the test "$(command | wc -l)" = 1 is broken because " 1" != "1". Let the shell eat the whitespace by using test 1 = $(command | wc -l) instead. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-09remote.c: "git-push frotz" should update what matches at the source.Libravatar Junio C Hamano1-0/+52
Earlier, when the local repository has a branch "frotz" and the remote repository has a tag "frotz" (but not branch "frotz"), "git-push frotz" mistakenly updated the tag at the remote side. This was because the partial refname matching code was applied independently on both source and destination side. With this fix, when a colon-less refspec is given to git-push, we first match it with the refs in the source repository, and update the matching ref in the destination repository. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-09remote.c: fix "git push" weak match disambiguationLibravatar Junio C Hamano1-0/+112
When "git push A:B" is given, and A (or B) is not a full refname that begins with refs/, we require an unambiguous match with an existing ref. For this purpose, a match with a local branch or a tag (i.e. refs/heads/A and refs/tags/A) is called a "strong match", and any other match is called a "weak match". A partial refname is unambiguous when there is only one strong match with any number of weak matches, or when there is only one weak match and no other match. However, as reported by Sparse with Ramsay Jones recently, count_refspec_match() function had a bug where a variable in an inner block masked a different variable of the same name, which caused the weak matches to be ignored. This fixes it, and adds tests for the fix. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08Test wildcard push/fetchLibravatar Junio C Hamano1-0/+82
Signed-off-by: Junio C Hamano <gitster@pobox.com>