Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse revision specifications #428

Merged
merged 75 commits into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
29ab704
A basis for 'pure' parsing of rev-specs (#427)
Byron May 24, 2022
8ddbc76
update crate status (#427)
Byron May 24, 2022
efc05e1
refactor (#427)
Byron May 25, 2022
5bd4863
prepare range parsing (#427)
Byron May 25, 2022
91e2c43
refactor (#427)
Byron May 25, 2022
7182d88
Some more thought about whitespace and empty input (#427)
Byron May 25, 2022
8573c8e
parse initial carets (#427)
Byron May 25, 2022
0c1c48c
basic range parsing (#427)
Byron May 25, 2022
2bc1acc
thanks clippy
Byron May 25, 2022
8c5f4be
adjust size limit (#427)
Byron May 25, 2022
5ada481
support for range parsing with range in the middle (#427)
Byron May 25, 2022
e059bd3
refactor (#427)
Byron May 26, 2022
d16a4e8
refactor (#427)
Byron May 28, 2022
2d9465f
Allow delegates to refuse spec kind changes (#427)
Byron May 28, 2022
d6a4838
decide to not implement regex support (yet) (#427)
Byron May 29, 2022
13c07f4
Tiny steps towards understanding rev-parsing better (#427)
Byron May 29, 2022
9866986
half-decent parsing of ref-names with preparation for parenthesis han…
Byron May 29, 2022
db97a2e
refactor (#427)
Byron May 29, 2022
1f0545f
thanks clippy
Byron May 29, 2022
652f228
feat: expose `Prefix::MIN_HEX_LEN`. (#427)
Byron May 29, 2022
16945ed
Support for hex-lookups by prefix (#427)
Byron May 29, 2022
2e49831
refactor (#427)
Byron May 29, 2022
bb0a554
more varied range testing (#427)
Byron May 29, 2022
4f53dc3
refactor (#427)
Byron May 29, 2022
5be4ad8
tests for parsing describe output (#427)
Byron May 30, 2022
e1e369f
finalize git-describe parsing (#427)
Byron May 30, 2022
826f964
also handle short decribe output with dirty suffix (#427)
Byron May 30, 2022
6d08d5f
thanks clippy
Byron May 30, 2022
b2c80ee
refactor (#427)
Byron May 30, 2022
c3b03a2
refactor (#427)
Byron May 30, 2022
d6781da
prevent double-kind calls on parser level (#427)
Byron May 30, 2022
ad4d8af
refactor (#427)
Byron May 30, 2022
43e4cc1
basic brace parsing (#427)
Byron May 30, 2022
418360c
show that we can already parse ranged rev-specs better than git (#427)
Byron May 30, 2022
d82b21f
more information on how anchors work (#427)
Byron May 30, 2022
1b40259
thanks clippy
Byron May 30, 2022
bff11a0
refactor (#427)
Byron May 30, 2022
3fedcc0
basic number parsing for '@' navigation (#427)
Byron May 30, 2022
a5f8f58
refactor (#427)
Byron May 30, 2022
faa9914
Allow parsing `@{-n}` (#427)
Byron May 30, 2022
b50d099
refname reflog entries (#427)
Byron May 30, 2022
0d3fb7a
Sibling branch support (#427)
Byron May 30, 2022
ec0ff74
thanks clippy
Byron May 30, 2022
cfb6a72
feat: Add `Time` type. (#427)
Byron May 30, 2022
59b3ff8
Replace `Time` with `git-date::Time`. (#427)
Byron May 30, 2022
2267b2b
prepare for date based reflog lookups. (#427)
Byron May 30, 2022
b3d009e
reflog lookup by date is complete (#427)
Byron May 30, 2022
9b0e2a4
refactor (#427)
Byron Jun 2, 2022
c064135
basic caret parsing (#427)
Byron Jun 2, 2022
fa7790b
handle special case `@^0` (#427)
Byron Jun 2, 2022
d83937b
navigation doesn't stack yet (#427)
Byron Jun 2, 2022
6f00e33
refactor (#427)
Byron Jun 3, 2022
76f7c4d
proper stacking/consumption of navigation items (#427)
Byron Jun 3, 2022
6dc9c44
thanks clippy
Byron Jun 3, 2022
a52244b
refactor (#427)
Byron Jun 4, 2022
4d2dd56
parsing of `^{commit}` etc. (#427)
Byron Jun 5, 2022
f11916a
parseing of 'follow tags recursively' (#427)
Byron Jun 6, 2022
6638040
refactor (#427)
Byron Jun 6, 2022
159a482
provide a marker for the delegate to know parsing is done (#427)
Byron Jun 6, 2022
18d9331
A sketch of the regex parsing API for the delegate (#427)
Byron Jun 6, 2022
7a3a5fa
fix regex API and first ignored test (#427)
Byron Jun 6, 2022
1caeae9
basic regex parsing (#427)
Byron Jun 6, 2022
8c5d87b
handle braces within braces and support escaping them (#427)
Byron Jun 6, 2022
edd36ba
More regex error handling (#427)
Byron Jun 6, 2022
b93fa40
thanks clippy
Byron Jun 6, 2022
a958edd
more specific backslash testing (#427)
Byron Jun 6, 2022
840d9d0
prepare for being able to escape backslashes properly (#427)
Byron Jun 6, 2022
f3eaff6
more testing of escaping (#427)
Byron Jun 6, 2022
1bbd3f4
thanks clippy
Byron Jun 6, 2022
546f4df
greatly improve brace handling (#427)
Byron Jun 7, 2022
e8a16c9
Implement tilde handling (#427)
Byron Jun 8, 2022
beb6e25
More thorough tests using more complex specs (#427)
Byron Jun 8, 2022
68b843b
Ignore all Cargo.lock files of experiemnts
Byron Jun 8, 2022
d51e438
tests for path parsing (#427)
Byron Jun 9, 2022
74e7a46
Implement :<path> parsing (#427)
Byron Jun 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ check: ## Build all code in suitable configurations
cd git-mailmap && cargo check --features serde1
cd git-worktree && cargo check --features serde1
cd git-actor && cargo check --features serde1
cd git-date && cargo check --features serde1
cd git-pack && cargo check --features serde1 \
&& cargo check --features pack-cache-lru-static \
&& cargo check --features pack-cache-lru-dynamic \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ Crates that seem feature complete and need to see some more use before they can
* [git-index](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-index)
* [git-worktree](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-worktree)
* [git-bitmap](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-bitmap)
* [git-revision](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-revision)
* [git-attributes](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-attributes)
* [git-revision](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-revision)
* [git-date](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-date)
* **idea**
* [git-note](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-note)
* [git-filter](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-filter)
* [git-date](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-date)
* [git-lfs](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-lfs)
* [git-rebase](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-rebase)
* [git-sequencer](https://github.com/Byron/gitoxide/blob/main/crate-status.md#git-sequencer)
Expand Down
11 changes: 11 additions & 0 deletions cargo-smart-release/Cargo.lock

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

10 changes: 8 additions & 2 deletions crate-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ A mechanism to associate metadata with any object, and keep revisions of it usin

### git-date
* [ ] parse git dates
* [ ] serialize `Time`

### git-credentials
* [x] launch git credentials helpers with a given action
Expand Down Expand Up @@ -310,8 +311,11 @@ Make it the best-performing implementation and the most convenient one.
* [ ] access to all attributes information

### git-revision
* find specifications for revisions (like `git name-rev`)
* parse specifications into revisions (like `git rev-parse`)
* [x] `describe()` (similar to `git name-rev`)
* parse specifications
* [ ] parsing and navigation
* [ ] full date parsing support (depends on `git-date`)
* [ ] revision ranges

### git-submodule
* CRUD for submodules
Expand Down Expand Up @@ -413,6 +417,8 @@ See its [README.md](https://github.com/Byron/gitoxide/blob/main/git-lock/README.
* [ ] support for `GIT_CEILING_DIRECTORIES` environment variable
* [ ] handle other non-discovery modes and provide control over environment variable usage required in applications
* [ ] rev-parse
- **unsupported**
* regex
* [x] instantiation
* [x] access to refs and objects
* **traverse**
Expand Down
2 changes: 1 addition & 1 deletion etc/check-package-size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ echo "in root: gitoxide CLI"
(enter git-index && indent cargo diet -n --package-size-limit 30KB)
(enter git-worktree && indent cargo diet -n --package-size-limit 30KB)
(enter git-quote && indent cargo diet -n --package-size-limit 5KB)
(enter git-revision && indent cargo diet -n --package-size-limit 10KB)
(enter git-revision && indent cargo diet -n --package-size-limit 15KB)
(enter git-bitmap && indent cargo diet -n --package-size-limit 5KB)
(enter git-tempfile && indent cargo diet -n --package-size-limit 25KB)
(enter git-lock && indent cargo diet -n --package-size-limit 15KB)
Expand Down
1 change: 1 addition & 0 deletions experiments/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/Cargo.lock
Loading