Merge branch 'fc/random-cleanup'

Random cleanup.

* fc/random-cleanup:
  gitignore: remove entry for git serve
  gitignore: drop duplicate entry for git-sh-i18n
  tests: lib-functions: trivial style cleanups
  test: completion: fix typos
  .gitignore: remove dangling file
  refspec: trivial cleanup
maint
Junio C Hamano 2020-12-08 15:11:21 -08:00
commit 75827da103
4 changed files with 16 additions and 18 deletions

3
.gitignore vendored
View File

@ -134,7 +134,6 @@
/git-remote-ftps /git-remote-ftps
/git-remote-fd /git-remote-fd
/git-remote-ext /git-remote-ext
/git-remote-testpy
/git-repack /git-repack
/git-replace /git-replace
/git-request-pull /git-request-pull
@ -147,11 +146,9 @@
/git-rm /git-rm
/git-send-email /git-send-email
/git-send-pack /git-send-pack
/git-serve
/git-sh-i18n /git-sh-i18n
/git-sh-i18n--envsubst /git-sh-i18n--envsubst
/git-sh-setup /git-sh-setup
/git-sh-i18n
/git-shell /git-shell
/git-shortlog /git-shortlog
/git-show /git-show

View File

@ -272,7 +272,9 @@ void refspec_ref_prefixes(const struct refspec *rs,
else if (item->src && !item->exact_sha1) else if (item->src && !item->exact_sha1)
prefix = item->src; prefix = item->src;


if (prefix) { if (!prefix)
continue;

if (item->pattern) { if (item->pattern) {
const char *glob = strchr(prefix, '*'); const char *glob = strchr(prefix, '*');
strvec_pushf(ref_prefixes, "%.*s", strvec_pushf(ref_prefixes, "%.*s",
@ -283,4 +285,3 @@ void refspec_ref_prefixes(const struct refspec *rs,
} }
} }
} }
}

View File

@ -906,7 +906,7 @@ test_expect_success '__git_refs - after --opt= - full refs' '
test_cmp expected "$actual" test_cmp expected "$actual"
' '


test_expect_success '__git refs - exluding refs' ' test_expect_success '__git refs - excluding refs' '
cat >expected <<-EOF && cat >expected <<-EOF &&
^HEAD ^HEAD
^master ^master
@ -922,7 +922,7 @@ test_expect_success '__git refs - exluding refs' '
test_cmp expected "$actual" test_cmp expected "$actual"
' '


test_expect_success '__git refs - exluding full refs' ' test_expect_success '__git refs - excluding full refs' '
cat >expected <<-EOF && cat >expected <<-EOF &&
^refs/heads/master ^refs/heads/master
^refs/heads/matching-branch ^refs/heads/matching-branch