On Tue, Jan 6, 2015 at 4:03 AM, Amit Bansal <amitbansal...@gmail.com> wrote:

> Hi,
>
>
>
> The problem statement is:
>
> Given 2 python files 'A.py' (in git repo) and 'B.py' (modified A.py -
> local repo), i am trying to find out the:
>
> 1. Added methods
>
> 2. Removed methods
>
> 3. Modified methods: (a) Change in method prototype (b) Change in method
> content
>
>
> Similarly for classes(changed/removed/modified) as well.
>
>
> Can i somehow tweak git diff to solve this problem?
>
> Any other suggestions on this will be helpful as well.
>
> Regards,
> Amit Bansal.
>

​Do you have a command which does this type of diff for "normal" files? I
will guess you do. I will _assume_ for the example, that it is call
"diff4python". In this case, what you want is the "git difftool" command.
You might use it something like:

export GIT_​DIFFTOOL_NO_PROMPT=true #values doesn't matter, turns off prompt
git difftool -x diff4python <commit> <commit> -- <filename>

Now the problem that I see is that I can't figure out a way to compare A.py
with B.py. Git assumes you want to compare the changes to a single file
between different <commit> points. But maybe what I've posted will be of
some help anyway.





-- 
​
While a transcendent vocabulary is laudable, one must be eternally careful
so that the calculated objective of communication does not become ensconced
in obscurity.  In other words, eschew obfuscation.

111,111,111 x 111,111,111 = 12,345,678,987,654,321

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to