4
$ git log --name-status -M -C -1
commit 6348fc30be8c7eda09220c8f36468678dcb73837 (HEAD -> 256818)
Author: Qiqi Gu <gqqnb@gmail.com>
Date:   Tue Nov 14 14:15:10 2017 -0800

    - Extract controls so that they can be reused in ReviewApplication.aspx and viewSummary.aspx.
    - Revise to link to avoid an extra postback
    BugzID: 256818

M       App_LocalResources/viewSummary.aspx.pl.resx
M       App_LocalResources/viewSummary.aspx.resx
M       Xpress/LoanApp/App_LocalResources/ReviewApplication.aspx.pl.resx
M       Xpress/LoanApp/App_LocalResources/ReviewApplication.aspx.resx
M       Xpress/LoanApp/ReviewApplication.aspx
M       Xpress/LoanApp/ReviewApplication.aspx.vb
C093    App_LocalResources/viewSummary.aspx.resx        Xpress/inc/App_LocalResources/ReviewApplication.ascx.resx
C065    Xpress/LoanApp/ReviewApplication.aspx   Xpress/inc/ReviewApplication.ascx
A       Xpress/inc/ReviewApplication.ascx.vb
M       inc/LoanAppControls/ReturnHome.ascx
M       inc/LoanAppControls/ReturnHome.ascx.vb
M       viewSummary.aspx
M       viewSummary.aspx.vb

How do I use my external difftool to view "C093 App_LocalResources/viewSummary.aspx.resx Xpress/inc/App_LocalResources/ReviewApplication.ascx.resx" ?

This command works, but I have to manually specify the path of the old and the new file. I hope to only specify the new file, and git figures out the original one, and lanuch the comparision in my external diff.

$ git difftool HEAD^:App_LocalResources/viewSummary.aspx.resx HEAD:Xpress/inc/App_LocalResources/ReviewApplication.ascx.resx
Gqqnbig
  • 5,845
  • 10
  • 45
  • 86

1 Answers1

3

I figured out.. Just need to use difftool and give the same option as git show

git difftool  -M -C --find-copies-harder 6348fc^ 6348fc
Gqqnbig
  • 5,845
  • 10
  • 45
  • 86