• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applying changes in diff view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applying changes in diff view?


  • Subject: Re: Applying changes in diff view?
  • From: John Daniel <email@hidden>
  • Date: Thu, 01 Oct 2015 14:28:39 -0400


On Oct 1, 2015, at 10:58 AM, email@hidden wrote:

When using Xcode 7.0.1 to diff between git branches, is there a way to take each diff in turn and selectively apply it (or ignore it) from the right pane to the left?

The old FileMerge tool still exists and works great. 

I prefer to do most of my SCM work from the command line. Here is a rather crude script that I haven’t changed since CVS days:

#!/bin/bash

# Delete any old files.
rm -Rf /tmp/gitdiff_*
mkdir -p /tmp/gitdiff_$$

# Do the diff.
git diff ${*} > /tmp/gitdiff_$$/patch

# Get a hold of the last parameter.
eval LAST=\${$#}

# Copy the file to /tmp, append the process ID, and .gitdiff to the file name.
mkdir -p /tmp/gitdiff_$$/$LAST
rm -Rf /tmp/gitdiff_$$/$LAST

cp "$LAST" "/tmp/gitdiff_$$/$LAST"

# Now patch the temp file to the previous version.
patch -s -R "/tmp/gitdiff_$$/$LAST" < /tmp/gitdiff_$$/patch

# Now run opendiff with the previous version and the current version.
opendiff "/tmp/gitdiff_$$/$LAST" "$LAST" -merge "$LAST”



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Xcode 7.0.1 and Base SDK
  • Next by Date: Re: Xcode 7.0.1 and Base SDK
  • Previous by thread: Re: Applying changes in diff view?
  • Next by thread: Xcode 7.0.1 and Base SDK
  • Index(es):
    • Date
    • Thread