-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for cross git branch diffs #25
Comments
I came here to open an issue for what I think is similar, but I'm not sure what you had in mind so let me clarify. Git has multiple ways of integrating with external diff tools. The current way this can be done given the way [difftools]
prompt = false
[difftool "fdiff"]
cmd = fdiff "$LOCAL" "$REMOTE This allows usage such as To do this it has to work as a git diff driver, which would be setup like this: [diff "fdiff"]
command = fdiff Then in atttributes: *.otf diff=fdiff Now just doing
I suggest modifying Is that what you had in mind with this issue or should I open another? |
I was thinking that fdiff might perform the cross-branch diff comparisons by invoking git but this approach could definitely work. My goal here was to support local cross-branch binary diffs. At the moment, to perform a cross-branch diff, you need to push to a remote that exposes the files through URL (e.g., GitHub) and add URL for the left and right side of the diff. Is it possible to set the command so that it uses an fdiff flag to set the git style argument invocation?: [diff "fdiff"]
command = fdiff --git I'd like to keep support for a simple |
Invoking I'll mess around and see it it will take that first arg and then append its 7. There should be no reason to ditch the simple two argument mode you have now, you just neet to catch the case where there are exactly 7 arguments and extract the two you need in addition to just accepting two as currently implemented. |
Yes, you can use |
Just by the by since most people don't seem to know this, Git supports global and user attribute defaults (just like repo, user, and global configs), so you don't have to set attributes up in every repository. The default is I mentioned implementing this yourself would be complicated ... one of the complicated scenarios is handling when a single diff between two commit points actually has several different file types involved. Implementing it yourself you could filter through looking for fonts, but letting git handle it the diffs will be seamlessly mixed in with everything else. |
Interested in preparing a PR for this support and/or the documentation that you included in #25 (comment)? |
It would be helpful to be able to diff font files with the same file path locally across git branches rather than relying on remote pushes and comparisons with remote hosting service URL.
The text was updated successfully, but these errors were encountered: