From f54ad389f0e60e6a9701350b14df05ff0c5969ed Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 29 May 2022 13:38:16 +0800 Subject: [PATCH] decide to not implement regex support (yet) (#427) This is something for git-repository anyway, but it seems like a lot of work for a rarely used feature and a big dependency which might not ever be faithfully implemented as the regex engines will probably differ. --- crate-status.md | 2 ++ git-revision/tests/spec/parse.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/crate-status.md b/crate-status.md index 87b054027c..c9fcb65ea2 100644 --- a/crate-status.md +++ b/crate-status.md @@ -416,6 +416,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** diff --git a/git-revision/tests/spec/parse.rs b/git-revision/tests/spec/parse.rs index 04dd3f26c8..33673b7421 100644 --- a/git-revision/tests/spec/parse.rs +++ b/git-revision/tests/spec/parse.rs @@ -105,6 +105,14 @@ mod revision { assert!(rec.kind.is_none()); assert_eq!(rec.resolve_ref_input.unwrap(), "HEAD"); } + + #[test] + #[ignore] + fn refname_with_head_prefix() { + let rec = parse("HEADfake"); + assert!(rec.kind.is_none()); + assert_eq!(rec.resolve_ref_input.unwrap(), "HEADfake"); + } } mod range {