Skip to content

Commit

Permalink
Merge branch 'main' into repo-status
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Zepeda committed Apr 14, 2022
2 parents 499c811 + 16570ef commit 4086335
Show file tree
Hide file tree
Showing 48 changed files with 2,013 additions and 343 deletions.
23 changes: 19 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository = "https://github.com/Byron/gitoxide"
authors = ["Sebastian Thiel <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
version = "0.12.0"
version = "0.13.0"
default-run = "gix"
include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"]
resolver = "2"
Expand Down Expand Up @@ -82,9 +82,9 @@ cache-efficiency-debug = ["git-features/cache-efficiency-debug"]
[dependencies]
anyhow = "1.0.42"

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

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

Expand Down Expand Up @@ -135,6 +135,7 @@ members = [
"git-chunk",
"git-quote",
"git-object",
"git-glob",
"git-diff",
"git-traverse",
"git-index",
Expand All @@ -156,6 +157,7 @@ members = [
"git-repository",
"gitoxide-core",
"git-tui",
"git-tix",

"experiments/object-access",
"experiments/diffing",
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ check: ## Build all code in suitable configurations
cd git-index && cargo check --features serde1
cd git-revision && cargo check --features serde1
cd git-attributes && cargo check --features serde1
cd git-glob && cargo check --features serde1
cd git-mailmap && cargo check --features serde1
cd git-worktree && cargo check --features serde1
cd git-actor && cargo check --features serde1
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,16 @@ Follow linked crate name for detailed status. Please note that all crates follow
Crates that seem feature complete and need to see some more use before they can be released as 1.0.

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

### Initial Development
* **usable**
* [git-actor](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-actor)
* [git-hash](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-hash)
* [git-chunk](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-chunk)
* [git-object](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-object)
* [git-validate](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-validate)
* [git-url](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-url)
* [git-glob](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-glob)
* [git-packetline](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-packetline)
* [git-transport](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-transport)
* [git-protocol](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-protocol)
Expand All @@ -124,6 +125,7 @@ Crates that seem feature complete and need to see some more use before they can
* [git-pathspec](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-pathspec)
* [git-subomdule](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-submodule)
* [git-tui](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tui)
* [git-tix](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-tix)
* [git-bundle](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-bundle)

### Stress Testing
Expand Down
2 changes: 1 addition & 1 deletion cargo-smart-release/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test = false
cache-efficiency-debug = ["git-repository/cache-efficiency-debug"]

[dependencies]
git-repository = { version = "^0.16.0", path = "../git-repository", features = ["unstable"] }
git-repository = { version = "^0.17.0", path = "../git-repository", features = ["unstable"] }
anyhow = "1.0.42"
clap = { version = "3.0.0", features = ["derive", "cargo"] }
env_logger = { version = "0.9.0", default-features = false, features = ["humantime", "termcolor", "atty"] }
Expand Down
20 changes: 10 additions & 10 deletions crate-status.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
### git-actor

* [x] read and write a signature that uniquely identifies an actor within a git repository

### git-hash
Expand All @@ -9,8 +8,8 @@
* [ ] Some examples

### git-chunk
* [ ] decode the chunk file table of contents and provide convenient API
* [ ] write the table of contents
* [x] decode the chunk file table of contents and provide convenient API
* [x] write the table of contents

### git-object
* *decode (zero-copy)* borrowed objects
Expand All @@ -28,7 +27,6 @@
* [ ] Some examples

### git-pack

* **packs**
* [x] traverse pack index
* [x] 'object' abstraction
Expand Down Expand Up @@ -73,7 +71,6 @@
* [ ] Some examples

### git-odb

* **loose object store**
* [x] traverse
* [x] read
Expand Down Expand Up @@ -210,25 +207,21 @@ Check out the [performance discussion][git-traverse-performance] as well.
* [ ] Some examples

### git-attributes

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

### git-quote

* **ansi-c**
* [x] quote
* [ ] unquote

### git-mailmap

* [x] parsing
* [x] lookup and mapping of author names

### git-pathspec

* [ ] parse
* [ ] check for match

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

* [ ] CRUD for git notes

### git-glob
* [x] parse pattern
* [x] a type for pattern matching of paths and non-paths, optionally case-insensitively.

### git-worktree
* handle the working tree/checkout
- [x] checkout an index of files, executables and symlinks just as fast as git
Expand All @@ -263,7 +260,6 @@ A mechanism to associate metadata with any object, and keep revisions of it usin
* parse specifications into revisions (like `git rev-parse`)

### git-submodule

* CRUD for submodules
* 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.

Expand Down Expand Up @@ -488,6 +484,10 @@ See its [README.md](https://github.com/Byron/gitoxide/blob/main/git-lock/README.
### git-tui
* _a terminal user interface seeking to replace and improve on `tig`_
* Can display complex history in novel ways to make them graspable. Maybe [this post] can be an inspiration.

### git-tix

A re-implementation of a minimal `tig` like UI that aims to be fast and to the point.

[tagname-validation]: https://github.com/git/git/blob/master/Documentation/technical/protocol-common.txt#L23:L23
[this post]: http://blog.danieljanus.pl/2021/07/01/commit-groups/
2 changes: 1 addition & 1 deletion experiments/diffing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false

[dependencies]
anyhow = "1"
git-repository = { version = "^0.16.0", path = "../../git-repository", features = ["unstable"] }
git-repository = { version = "^0.17.0", path = "../../git-repository", features = ["unstable"] }
git-features-for-config = { package = "git-features", version = "^0.20.0", path = "../../git-features", features = ["cache-efficiency-debug"] }
git2 = "0.14"
rayon = "1.5.0"
Expand Down
2 changes: 1 addition & 1 deletion experiments/object-access/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish = false

[dependencies]
anyhow = "1"
git-repository = { path = "../../git-repository", version = "^0.16.0", features = ["unstable"] }
git-repository = { path = "../../git-repository", version = "^0.17.0", features = ["unstable"] }
git2 = "0.14"
rayon = "1.5.0"
parking_lot = { version = "0.12.0", default-features = false }
2 changes: 1 addition & 1 deletion experiments/traversal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false

[dependencies]
anyhow = "1"
git-repository = { version = "^0.16.0", path = "../../git-repository", features = ["unstable"] }
git-repository = { version = "^0.17.0", path = "../../git-repository", features = ["unstable"] }
git2 = "0.14"
rayon = "1.5.0"
dashmap = "5.1.0"
3 changes: 2 additions & 1 deletion git-actor/src/signature/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
mod _ref {
use crate::{signature::decode, Signature, SignatureRef};
use bstr::ByteSlice;

use crate::{signature::decode, Signature, SignatureRef};

impl<'a> SignatureRef<'a> {
/// Deserialize a signature from the given `data`.
pub fn from_bytes<E>(data: &'a [u8]) -> Result<SignatureRef<'a>, nom::Err<E>>
Expand Down
4 changes: 2 additions & 2 deletions git-attributes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ doctest = false

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

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

[dependencies]
git-quote = { version = "^0.2.0", path = "../git-quote" }
git-glob = { version = "^0.2.0", path = "../git-glob" }

bstr = { version = "0.2.13", default-features = false, features = ["std"]}
bitflags = "1.3.2"
unicode-bom = "1.1.4"
quick-error = "2.0.0"
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]}
Expand Down
16 changes: 0 additions & 16 deletions git-attributes/src/ignore.rs

This file was deleted.

2 changes: 0 additions & 2 deletions git-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub enum State<'a> {
Unspecified,
}

pub mod ignore;

pub mod parse;

pub fn parse(buf: &[u8]) -> parse::Lines<'_> {
Expand Down
9 changes: 5 additions & 4 deletions git-attributes/src/parse/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ use bstr::{BStr, BString, ByteSlice};
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
pub enum Kind {
/// A pattern to match paths against
Pattern(BString, crate::ignore::pattern::Mode),
Pattern(git_glob::Pattern),
/// The name of the macro to define, always a valid attribute name
// TODO: turn it into its own type for maximum safety
Macro(BString),
}

Expand Down Expand Up @@ -162,14 +163,14 @@ fn parse_line(line: &BStr, line_number: usize) -> Option<Result<(Kind, Iter<'_>,
_ => unreachable!("BUG: check_attr() must only return attribute errors"),
}),
None => {
let (pattern, flags) = super::ignore::parse_line(line.as_ref())?;
if flags.contains(crate::ignore::pattern::Mode::NEGATIVE) {
let pattern = git_glob::Pattern::from_bytes(line.as_ref())?;
if pattern.mode.contains(git_glob::pattern::Mode::NEGATIVE) {
Err(Error::PatternNegation {
line: line.into_owned(),
line_number,
})
} else {
Ok(Kind::Pattern(pattern, flags))
Ok(Kind::Pattern(pattern))
}
}
};
Expand Down
Loading

0 comments on commit 4086335

Please sign in to comment.