You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
xcdiff can diff two standalone Xcode Projects. An interesting use case that can be extended from this is using xcdiff as a git difftool to allow comparing an Xcode project against itself within source control.
Describe the solution you'd like
There a few bits needed to make this work:
Support diffing .pbxproj files directly (not just .xcodeproj)
Difftools are passed two files to diff, in for Xcode project files this will be the underlying .pbxproj files
Add a new renderer that uses terms like "Removed" / "Added" rather than "Only in first" / "Only in second"
Optionally this renderer could use terminal colors, green text for added items, red for removed, yellow for modified
Update documentation with instructions on how to add xcdiff as a diff tool
Another alternative could be to add an additional executable target xcgitdiff that manages some of this under the hood and uses a special renderer that is more suitable for this use case.
Additional context
I have a prototype of a custom renderer that replaces terms:
"Only in first" > "Removed"
"Only in second" > "Added"
"Value mismatch" > "Modified" or "Changed"
xcdiff --format git
Not sure how useful this feature is, but posting here to collect ideas and see if there's interest to pursue this further.
The text was updated successfully, but these errors were encountered:
the || true is because it looks like xcdiff returns exit codes when the project has diffs? Anyway it causes git diff to abort and not show changes to other files unless xcdiff.sh returns exit code 0
Might be good by default to adjust the script to use -d as well to minimize the spew when doing a git diff - removes a thousand "nothing changed" green checkboxes that way...
Is your feature request related to a problem? Please describe.
xcdiff
can diff two standalone Xcode Projects. An interesting use case that can be extended from this is usingxcdiff
as a git difftool to allow comparing an Xcode project against itself within source control.Describe the solution you'd like
There a few bits needed to make this work:
Support diffing
.pbxproj
files directly (not just.xcodeproj
).pbxproj
filesAdd a new renderer that uses terms like "Removed" / "Added" rather than "Only in first" / "Only in second"
Update documentation with instructions on how to add
xcdiff
as a diff toole.g.
git config --local difftool.xcdiff.cmd 'xcdiff -p1 $(dirname "$LOCAL") -p2 $(dirname "$REMOTE") -d -v
There might be a way to make git automatically select a diff tool for certain file extensions which we could leverage as well (needs more research).
Describe alternatives you've considered
Instead of extending
xcdiff
itself, we can leverage a bash script to marshal the.pbxproj
files to the desired format that enablesxcdiff
to read it.e.g.
Another alternative could be to add an additional executable target
xcgitdiff
that manages some of this under the hood and uses a special renderer that is more suitable for this use case.Additional context
I have a prototype of a custom renderer that replaces terms:
xcdiff --format git
Not sure how useful this feature is, but posting here to collect ideas and see if there's interest to pursue this further.
The text was updated successfully, but these errors were encountered: