git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-difftool
@ 2008-12-26  1:30 David Aguilar
  2008-12-31 16:04 ` git-difftool Matthieu Moy
  0 siblings, 1 reply; 16+ messages in thread
From: David Aguilar @ 2008-12-26  1:30 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Several co-workers have found this script useful.
It's basically git-mergetool modified to operate on the git
index/worktree.  There's some things about the script that
aren't very gitish (for example, the way revargs are
processed) but it's useful nonetheless.

The usual use case for this script is when you have either
staged or unstaged changes and you'd like to see the changes
in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).

	git difftool [<filename>*]

Another use case is when you'd like to see the same
information but are comparing arbitrary commits
(this is the part where the revarg parsing could be better)

	git difftool --start=HEAD^ --end=HEAD [-- <filename>*]

The last use case is when you'd like to compare your current
worktree to something other than HEAD (e.g. a tag)

	git difftool --commit=v1.0.0 [-- <filename>*]

It's a generally useful script so I thought I'd share it here.
If others find it useful then maybe we can fix it up and ship
it along with the other useful goodies in contrib/.


enjoy,

-- 

	David



[-- Attachment #2: git-difftool.sh --]
[-- Type: application/x-sh, Size: 12218 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-01-17 14:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-26  1:30 git-difftool David Aguilar
2008-12-31 16:04 ` git-difftool Matthieu Moy
2008-12-31 20:11   ` git-difftool David Aguilar
2008-12-31 21:20     ` git-difftool Boyd Stephen Smith Jr.
2009-01-01 17:58     ` git-difftool Matthieu Moy
2009-01-02  0:13       ` git-difftool Markus Heidelberg
2009-01-02 16:10         ` git-difftool Matthieu Moy
2009-01-02 17:39           ` git-difftool David Aguilar
2009-01-15 22:26             ` git-difftool Markus Heidelberg
2009-01-16  5:05               ` git-difftool David Aguilar
2009-01-01  7:38   ` git-difftool Ping Yin
2009-01-02  0:04     ` git-difftool Markus Heidelberg
2009-01-02  1:59       ` git-difftool Ping Yin
2009-01-17  3:47         ` git-difftool enso
2009-01-17  4:41           ` git-difftool David Aguilar
2009-01-17 14:17           ` git-difftool Ping Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).