Skip to content

feat: support bare paths in gix diff file #1902

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

Merged

Conversation

cruessler
Copy link
Contributor

This is a follow-up to #1880, and, more specifically, an implementation of the suggestion in #1880 (comment). It allows usage of bare paths in gix diff file, e. g. gix diff file HEAD~100:README.md README.md. Currently, both arguments have to be revspecs, so only gix diff file HEAD~100:README.md :README.md works (notice the added : in front of the second argument). I hope I got the suggestion right!

@Byron Byron enabled auto-merge March 22, 2025 02:57
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's it, thanks so much!

❯ cargo run --bin gix -- diff file :README.md README.md
   Compiling gitoxide v0.41.0 (/Users/byron/dev/github.com/Byron/gitoxide)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.75s
     Running `target/debug/gix diff file ':README.md' README.md`
@@ -16,6 +16,8 @@

 ## Development Status

+hello
+
 The command-line tools as well as the status of each crate is described in
 [the crate status document](https://github.com/GitoxideLabs/gitoxide/blob/main/crate-status.md).

@Byron Byron merged commit 40d8033 into GitoxideLabs:main Mar 22, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants