Skip to content

Commit 07a3e93

Browse files
committed
feat: export gix-attributes as attributes to make gix-glob and gix-attribute types available.
1 parent f8fc662 commit 07a3e93

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

gix-pathspec/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ use bitflags::bitflags;
77
use bstr::BString;
88
use std::path::PathBuf;
99

10+
/// `gix-glob` types are available through [`attributes::glob`].
11+
pub use gix_attributes as attributes;
12+
1013
///
1114
pub mod normalize {
1215
use std::path::PathBuf;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:343ad9b362536abf88d6fc4519b6532e53e53f8a1b94436c9ec3f88b6874e4df
3-
size 15972
2+
oid sha256:742241f4ea290fc9088fd5e32423859929bc4b39dccd31d205c67fe3ac9128c0
3+
size 16028

gix-pathspec/tests/fixtures/match_baseline_dirs.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ git init parent
3131
} >> baseline.git
3232
}
3333

34+
cat <<EOF >.gitattributes
35+
bb bb-file
36+
bb/ bb-dir
37+
/bb/ bb-dir-from-top
38+
EOF
39+
3440
for p in a bb dir/b dir/bb dir/nested/c cc; do
3541
git submodule add ../sub $p
3642
git config --unset submodule.$p.active
@@ -42,6 +48,11 @@ git init parent
4248
baseline ':'
4349
baseline ':!'
4450
baseline 'a'
51+
baseline ':(attr:bb-file)'
52+
# :(attr:bb-dir) - ["bb", "dir/bb"] == []
53+
baseline ':(attr:bb-dir)' git-inconsistency # bb/ matches recursively, git doesn't get it
54+
# :(attr:bb-dir-from-top) - ["bb"] == []
55+
baseline ':(attr:bb-dir-from-top)' git-inconsistency # probably git doesn't really care about correctness here
4556
baseline ':(icase)A'
4657
baseline ':(icase,exclude)A'
4758
baseline ':(icase,exclude)*/B*'

0 commit comments

Comments
 (0)