On Friday, February 15, 2013 9:04:25 PM UTC+1, Matt Neuburg wrote:

>
> On Feb 15, 2013, at 9:24 AM, Bob Hiestand <bob.hi...@gmail.com<javascript:>> 
> wrote: 
>
> > your post didn't restrict the use to only filtering by path 
>
> It did; it showed an example of what I'm having to do, where I'm 
> explicitly comparing HEAD:newfile with oldCommit:oldfile. That is what I 
> need to do: compare a particular file with its version in the past. The 
> question is, is there a way to do this without my having to supply the old 
> name of the same file, every darned time. One thinks there should be, 
> because, after all, git does know the old name (as is proved by its ability 
> to log backwards through it). 
>
> Whenever one has to do something dumb and repetitive, a computer should be 
> doing it for you. That's what I'm asking for in this case. I have dozens of 
> these files to do these comparisons with, a lot. m. 
>
> PS It isn't my fault that the files were all renamed. Orders from on high, 
> don't you know.


If you are comparing many files in one diff, have a look 
at http://stackoverflow.com/questions/7759193/git-diff-renamed-file

If you want to single down to the diff on a single file, there is no first 
class way to do this in Git. You could do a feature request to the Git 
developer list <https://gist.github.com/tfnico/4441562>, and argue that it 
belongs in git diff. I agree that it would be useful, but not sure the 
developers will feel the same way.

Some GUI tools support showing the history of a single file. You can then 
select two revisions and do a compare between the two.

I guess you could script it by parsing the output of a git log with the two 
revisions and the filename in one of them, finding the old file-name, and 
then using it in a second diff call.

-- 
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/groups/opt_out.


Reply via email to