Merge branch 'maint'
* maint: Documentation: document show -s dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
This commit is contained in:
commit
6f10c4103d
@ -54,6 +54,10 @@ git show v1.0.0::
|
|||||||
git show v1.0.0^\{tree\}::
|
git show v1.0.0^\{tree\}::
|
||||||
Shows the tree pointed to by the tag `v1.0.0`.
|
Shows the tree pointed to by the tag `v1.0.0`.
|
||||||
|
|
||||||
|
git show -s --format=%s v1.0.0^\{commit\}::
|
||||||
|
Shows the subject of the commit pointed to by the
|
||||||
|
tag `v1.0.0`.
|
||||||
|
|
||||||
git show next~10:Documentation/README::
|
git show next~10:Documentation/README::
|
||||||
Shows the contents of the file `Documentation/README` as
|
Shows the contents of the file `Documentation/README` as
|
||||||
they were current in the 10th last commit of the branch
|
they were current in the 10th last commit of the branch
|
||||||
|
@ -146,6 +146,9 @@ options may be given. See linkgit:git-diff-files[1] for more options.
|
|||||||
-t::
|
-t::
|
||||||
|
|
||||||
Show the tree objects in the diff output. This implies '-r'.
|
Show the tree objects in the diff output. This implies '-r'.
|
||||||
|
|
||||||
|
-s::
|
||||||
|
Suppress diff output.
|
||||||
endif::git-rev-list[]
|
endif::git-rev-list[]
|
||||||
|
|
||||||
Commit Limiting
|
Commit Limiting
|
||||||
|
3
dir.c
3
dir.c
@ -360,7 +360,8 @@ int excluded_from_list(const char *pathname,
|
|||||||
|
|
||||||
if (x->flags & EXC_FLAG_MUSTBEDIR) {
|
if (x->flags & EXC_FLAG_MUSTBEDIR) {
|
||||||
if (!dtype) {
|
if (!dtype) {
|
||||||
if (!prefixcmp(pathname, exclude))
|
if (!prefixcmp(pathname, exclude) &&
|
||||||
|
pathname[x->patternlen] == '/')
|
||||||
return to_exclude;
|
return to_exclude;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
@ -17,17 +17,19 @@ test_expect_success 'setup' '
|
|||||||
cat >expected <<-\EOF &&
|
cat >expected <<-\EOF &&
|
||||||
100644 77f0ba1734ed79d12881f81b36ee134de6a3327b 0 init.t
|
100644 77f0ba1734ed79d12881f81b36ee134de6a3327b 0 init.t
|
||||||
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/added
|
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/added
|
||||||
|
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 subsub/added
|
||||||
EOF
|
EOF
|
||||||
cat >expected.swt <<-\EOF &&
|
cat >expected.swt <<-\EOF &&
|
||||||
H init.t
|
H init.t
|
||||||
H sub/added
|
H sub/added
|
||||||
|
H subsub/added
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_commit init &&
|
test_commit init &&
|
||||||
echo modified >>init.t &&
|
echo modified >>init.t &&
|
||||||
mkdir sub &&
|
mkdir sub subsub &&
|
||||||
touch sub/added &&
|
touch sub/added subsub/added &&
|
||||||
git add init.t sub/added &&
|
git add init.t sub/added subsub/added &&
|
||||||
git commit -m "modified and added" &&
|
git commit -m "modified and added" &&
|
||||||
git tag top &&
|
git tag top &&
|
||||||
git rm sub/added &&
|
git rm sub/added &&
|
||||||
@ -81,6 +83,7 @@ test_expect_success 'match directories with trailing slash' '
|
|||||||
cat >expected.swt-noinit <<-\EOF &&
|
cat >expected.swt-noinit <<-\EOF &&
|
||||||
S init.t
|
S init.t
|
||||||
H sub/added
|
H sub/added
|
||||||
|
S subsub/added
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo sub/ > .git/info/sparse-checkout &&
|
echo sub/ > .git/info/sparse-checkout &&
|
||||||
@ -105,6 +108,7 @@ test_expect_success 'checkout area changes' '
|
|||||||
cat >expected.swt-nosub <<-\EOF &&
|
cat >expected.swt-nosub <<-\EOF &&
|
||||||
H init.t
|
H init.t
|
||||||
S sub/added
|
S sub/added
|
||||||
|
S subsub/added
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo init.t >.git/info/sparse-checkout &&
|
echo init.t >.git/info/sparse-checkout &&
|
||||||
|
Loading…
Reference in New Issue
Block a user