Skip to content

Commit 4086335

Browse files
author
Alex Zepeda
committed
Merge branch 'main' into repo-status
2 parents 499c811 + 16570ef commit 4086335

File tree

48 files changed

+2013
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2013
-343
lines changed

Cargo.lock

+19-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repository = "https://github.com/Byron/gitoxide"
55
authors = ["Sebastian Thiel <[email protected]>"]
66
edition = "2018"
77
license = "MIT OR Apache-2.0"
8-
version = "0.12.0"
8+
version = "0.13.0"
99
default-run = "gix"
1010
include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"]
1111
resolver = "2"
@@ -82,9 +82,9 @@ cache-efficiency-debug = ["git-features/cache-efficiency-debug"]
8282
[dependencies]
8383
anyhow = "1.0.42"
8484

85-
gitoxide-core = { version = "^0.14.0", path = "gitoxide-core" }
85+
gitoxide-core = { version = "^0.15.0", path = "gitoxide-core" }
8686
git-features = { version = "^0.20.0", path = "git-features" }
87-
git-repository = { version = "^0.16.0", path = "git-repository", default-features = false }
87+
git-repository = { version = "^0.17.0", path = "git-repository", default-features = false }
8888

8989
git-transport-for-configuration-only = { package = "git-transport", optional = true, version = "^0.16.0", path = "git-transport" }
9090

@@ -135,6 +135,7 @@ members = [
135135
"git-chunk",
136136
"git-quote",
137137
"git-object",
138+
"git-glob",
138139
"git-diff",
139140
"git-traverse",
140141
"git-index",
@@ -156,6 +157,7 @@ members = [
156157
"git-repository",
157158
"gitoxide-core",
158159
"git-tui",
160+
"git-tix",
159161

160162
"experiments/object-access",
161163
"experiments/diffing",

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ check: ## Build all code in suitable configurations
9191
cd git-index && cargo check --features serde1
9292
cd git-revision && cargo check --features serde1
9393
cd git-attributes && cargo check --features serde1
94+
cd git-glob && cargo check --features serde1
9495
cd git-mailmap && cargo check --features serde1
9596
cd git-worktree && cargo check --features serde1
9697
cd git-actor && cargo check --features serde1

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,16 @@ Follow linked crate name for detailed status. Please note that all crates follow
9090
Crates that seem feature complete and need to see some more use before they can be released as 1.0.
9191

9292
* [git-mailmap](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-mailmap)
93+
* [git-chunk](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-chunk)
9394

9495
### Initial Development
9596
* **usable**
9697
* [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor)
9798
* [git-hash](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-hash)
98-
* [git-chunk](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-chunk)
9999
* [git-object](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-object)
100100
* [git-validate](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-validate)
101101
* [git-url](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-url)
102+
* [git-glob](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-glob)
102103
* [git-packetline](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-packetline)
103104
* [git-transport](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-transport)
104105
* [git-protocol](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-protocol)
@@ -124,6 +125,7 @@ Crates that seem feature complete and need to see some more use before they can
124125
* [git-pathspec](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-pathspec)
125126
* [git-subomdule](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-submodule)
126127
* [git-tui](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tui)
128+
* [git-tix](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tix)
127129
* [git-bundle](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-bundle)
128130

129131
### Stress Testing

cargo-smart-release/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test = false
2626
cache-efficiency-debug = ["git-repository/cache-efficiency-debug"]
2727

2828
[dependencies]
29-
git-repository = { version = "^0.16.0", path = "../git-repository", features = ["unstable"] }
29+
git-repository = { version = "^0.17.0", path = "../git-repository", features = ["unstable"] }
3030
anyhow = "1.0.42"
3131
clap = { version = "3.0.0", features = ["derive", "cargo"] }
3232
env_logger = { version = "0.9.0", default-features = false, features = ["humantime", "termcolor", "atty"] }

crate-status.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
### git-actor
2-
32
* [x] read and write a signature that uniquely identifies an actor within a git repository
43

54
### git-hash
@@ -9,8 +8,8 @@
98
* [ ] Some examples
109

1110
### git-chunk
12-
* [ ] decode the chunk file table of contents and provide convenient API
13-
* [ ] write the table of contents
11+
* [x] decode the chunk file table of contents and provide convenient API
12+
* [x] write the table of contents
1413

1514
### git-object
1615
* *decode (zero-copy)* borrowed objects
@@ -28,7 +27,6 @@
2827
* [ ] Some examples
2928

3029
### git-pack
31-
3230
* **packs**
3331
* [x] traverse pack index
3432
* [x] 'object' abstraction
@@ -73,7 +71,6 @@
7371
* [ ] Some examples
7472

7573
### git-odb
76-
7774
* **loose object store**
7875
* [x] traverse
7976
* [x] read
@@ -210,25 +207,21 @@ Check out the [performance discussion][git-traverse-performance] as well.
210207
* [ ] Some examples
211208

212209
### git-attributes
213-
214210
* [x] parse git-ignore files (aka git-attributes without the attributes or negation)
215211
* [x] parse git-attributes files
216212
* [ ] create an attributes stack, ideally one that includes 'ignored' status from .gitignore files.
217213
* [ ] support for built-in `binary` macro for `-text -diff -merge`
218214

219215
### git-quote
220-
221216
* **ansi-c**
222217
* [x] quote
223218
* [ ] unquote
224219

225220
### git-mailmap
226-
227221
* [x] parsing
228222
* [x] lookup and mapping of author names
229223

230224
### git-pathspec
231-
232225
* [ ] parse
233226
* [ ] check for match
234227

@@ -238,6 +231,10 @@ A mechanism to associate metadata with any object, and keep revisions of it usin
238231

239232
* [ ] CRUD for git notes
240233

234+
### git-glob
235+
* [x] parse pattern
236+
* [x] a type for pattern matching of paths and non-paths, optionally case-insensitively.
237+
241238
### git-worktree
242239
* handle the working tree/checkout
243240
- [x] checkout an index of files, executables and symlinks just as fast as git
@@ -263,7 +260,6 @@ A mechanism to associate metadata with any object, and keep revisions of it usin
263260
* parse specifications into revisions (like `git rev-parse`)
264261

265262
### git-submodule
266-
267263
* CRUD for submodules
268264
* try to handle with all the nifty interactions and be a little more comfortable than what git offers, lay a foundation for smarter git submodules.
269265

@@ -488,6 +484,10 @@ See its [README.md](https://github.com/Byron/gitoxide/blob/main/git-lock/README.
488484
### git-tui
489485
* _a terminal user interface seeking to replace and improve on `tig`_
490486
* Can display complex history in novel ways to make them graspable. Maybe [this post] can be an inspiration.
487+
488+
### git-tix
489+
490+
A re-implementation of a minimal `tig` like UI that aims to be fast and to the point.
491491

492492
[tagname-validation]: https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt#L23:L23
493493
[this post]: http://blog.danieljanus.pl/2021/07/01/commit-groups/

experiments/diffing/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99

1010
[dependencies]
1111
anyhow = "1"
12-
git-repository = { version = "^0.16.0", path = "../../git-repository", features = ["unstable"] }
12+
git-repository = { version = "^0.17.0", path = "../../git-repository", features = ["unstable"] }
1313
git-features-for-config = { package = "git-features", version = "^0.20.0", path = "../../git-features", features = ["cache-efficiency-debug"] }
1414
git2 = "0.14"
1515
rayon = "1.5.0"

experiments/object-access/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ publish = false
1111

1212
[dependencies]
1313
anyhow = "1"
14-
git-repository = { path = "../../git-repository", version = "^0.16.0", features = ["unstable"] }
14+
git-repository = { path = "../../git-repository", version = "^0.17.0", features = ["unstable"] }
1515
git2 = "0.14"
1616
rayon = "1.5.0"
1717
parking_lot = { version = "0.12.0", default-features = false }

experiments/traversal/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ publish = false
99

1010
[dependencies]
1111
anyhow = "1"
12-
git-repository = { version = "^0.16.0", path = "../../git-repository", features = ["unstable"] }
12+
git-repository = { version = "^0.17.0", path = "../../git-repository", features = ["unstable"] }
1313
git2 = "0.14"
1414
rayon = "1.5.0"
1515
dashmap = "5.1.0"

git-actor/src/signature/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
mod _ref {
2-
use crate::{signature::decode, Signature, SignatureRef};
32
use bstr::ByteSlice;
43

4+
use crate::{signature::decode, Signature, SignatureRef};
5+
56
impl<'a> SignatureRef<'a> {
67
/// Deserialize a signature from the given `data`.
78
pub fn from_bytes<E>(data: &'a [u8]) -> Result<SignatureRef<'a>, nom::Err<E>>

git-attributes/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ doctest = false
1212

1313
[features]
1414
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
15-
serde1 = ["serde", "bstr/serde1"]
15+
serde1 = ["serde", "bstr/serde1", "git-glob/serde1"]
1616

1717
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1818

1919
[dependencies]
2020
git-quote = { version = "^0.2.0", path = "../git-quote" }
21+
git-glob = { version = "^0.2.0", path = "../git-glob" }
2122

2223
bstr = { version = "0.2.13", default-features = false, features = ["std"]}
23-
bitflags = "1.3.2"
2424
unicode-bom = "1.1.4"
2525
quick-error = "2.0.0"
2626
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]}

git-attributes/src/ignore.rs

-16
This file was deleted.

git-attributes/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ pub enum State<'a> {
1818
Unspecified,
1919
}
2020

21-
pub mod ignore;
22-
2321
pub mod parse;
2422

2523
pub fn parse(buf: &[u8]) -> parse::Lines<'_> {

git-attributes/src/parse/attribute.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ use bstr::{BStr, BString, ByteSlice};
66
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
77
pub enum Kind {
88
/// A pattern to match paths against
9-
Pattern(BString, crate::ignore::pattern::Mode),
9+
Pattern(git_glob::Pattern),
1010
/// The name of the macro to define, always a valid attribute name
11+
// TODO: turn it into its own type for maximum safety
1112
Macro(BString),
1213
}
1314

@@ -162,14 +163,14 @@ fn parse_line(line: &BStr, line_number: usize) -> Option<Result<(Kind, Iter<'_>,
162163
_ => unreachable!("BUG: check_attr() must only return attribute errors"),
163164
}),
164165
None => {
165-
let (pattern, flags) = super::ignore::parse_line(line.as_ref())?;
166-
if flags.contains(crate::ignore::pattern::Mode::NEGATIVE) {
166+
let pattern = git_glob::Pattern::from_bytes(line.as_ref())?;
167+
if pattern.mode.contains(git_glob::pattern::Mode::NEGATIVE) {
167168
Err(Error::PatternNegation {
168169
line: line.into_owned(),
169170
line_number,
170171
})
171172
} else {
172-
Ok(Kind::Pattern(pattern, flags))
173+
Ok(Kind::Pattern(pattern))
173174
}
174175
}
175176
};

0 commit comments

Comments
 (0)