* Using kdiff3 to compare two different revisions of a folder
@ 2008-02-13 1:44 André Goddard Rosa
2008-02-13 17:44 ` Brian Downing
2008-02-13 22:38 ` Robin Rosenberg
0 siblings, 2 replies; 7+ messages in thread
From: André Goddard Rosa @ 2008-02-13 1:44 UTC (permalink / raw)
To: Git Mailing List
Hi, all!
I would like to use kdiff3 to compare some folder like "include"
between two different revisions.
It would be something like "git diff v2.5:makefile HEAD:makefile",
but for an entire folder.
Kdiff3 give me a quick glance of its nice graphical output of the
differences, without have to resort to looking/parsing 'git log'
output.
For now, easiest way for me is to keep my tree replicated in two
different folders pointing to different revisions then use it.
Is there a better way to do this kind of comparison?
Thanks in advance,
--
[]s,
André Goddard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using kdiff3 to compare two different revisions of a folder
2008-02-13 1:44 Using kdiff3 to compare two different revisions of a folder André Goddard Rosa
@ 2008-02-13 17:44 ` Brian Downing
2008-02-14 0:37 ` André Goddard Rosa
2008-02-13 22:38 ` Robin Rosenberg
1 sibling, 1 reply; 7+ messages in thread
From: Brian Downing @ 2008-02-13 17:44 UTC (permalink / raw)
To: André Goddard Rosa; +Cc: Git Mailing List
On Tue, Feb 12, 2008 at 11:44:07PM -0200, André Goddard Rosa wrote:
> I would like to use kdiff3 to compare some folder like "include"
> between two different revisions.
> It would be something like "git diff v2.5:makefile HEAD:makefile",
> but for an entire folder.
>
> Kdiff3 give me a quick glance of its nice graphical output of the
> differences, without have to resort to looking/parsing 'git log'
> output.
> For now, easiest way for me is to keep my tree replicated in two
> different folders pointing to different revisions then use it.
>
> Is there a better way to do this kind of comparison?
Maybe you want something like this? This uses kdiff3 to compare two
full commits, by extracting the changed files into a temporary location.
Modifying it so it can work with path limiters and/or take arguments
exactly like 'git diff' is left as an excercise for the reader.
-bcd
#!/bin/sh -e
# usage: git-kdiff3 commit1 commit2
SUBDIRECTORY_OK=1
. git-sh-setup
cd_to_toplevel
O=".git-kdiff3-tmp-$$"
list="$O/list"
trap "rm -rf $O" 0
mkdir $O
git diff --name-only -z $1 $2 > $list
cat $list | xargs -0 git archive --prefix=a/ $1 | tar xf - -C $O
cat $list | xargs -0 git archive --prefix=b/ $2 | tar xf - -C $O
kdiff3 $O/a $O/b
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using kdiff3 to compare two different revisions of a folder
2008-02-13 17:44 ` Brian Downing
@ 2008-02-14 0:37 ` André Goddard Rosa
0 siblings, 0 replies; 7+ messages in thread
From: André Goddard Rosa @ 2008-02-14 0:37 UTC (permalink / raw)
To: Brian Downing; +Cc: Git Mailing List
On Feb 13, 2008 3:44 PM, Brian Downing <bdowning@lavos.net> wrote:
>
> On Tue, Feb 12, 2008 at 11:44:07PM -0200, André Goddard Rosa wrote:
> > I would like to use kdiff3 to compare some folder like "include"
> > between two different revisions.
> > It would be something like "git diff v2.5:makefile HEAD:makefile",
> > but for an entire folder.
> >
> > Kdiff3 give me a quick glance of its nice graphical output of the
> > differences, without have to resort to looking/parsing 'git log'
> > output.
> > For now, easiest way for me is to keep my tree replicated in two
> > different folders pointing to different revisions then use it.
> >
> > Is there a better way to do this kind of comparison?
>
> Maybe you want something like this? This uses kdiff3 to compare two
> full commits, by extracting the changed files into a temporary location.
> Modifying it so it can work with path limiters and/or take arguments
> exactly like 'git diff' is left as an excercise for the reader.
>
> -bcd
>
> #!/bin/sh -e
>
> # usage: git-kdiff3 commit1 commit2
>
> SUBDIRECTORY_OK=1
> . git-sh-setup
> cd_to_toplevel
>
> O=".git-kdiff3-tmp-$$"
> list="$O/list"
> trap "rm -rf $O" 0
> mkdir $O
>
> git diff --name-only -z $1 $2 > $list
>
> cat $list | xargs -0 git archive --prefix=a/ $1 | tar xf - -C $O
> cat $list | xargs -0 git archive --prefix=b/ $2 | tar xf - -C $O
>
> kdiff3 $O/a $O/b
>
Thanks a lot, it works like a charm! :)
--
[]s,
André Goddard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using kdiff3 to compare two different revisions of a folder
2008-02-13 1:44 Using kdiff3 to compare two different revisions of a folder André Goddard Rosa
2008-02-13 17:44 ` Brian Downing
@ 2008-02-13 22:38 ` Robin Rosenberg
2008-02-14 0:36 ` André Goddard Rosa
1 sibling, 1 reply; 7+ messages in thread
From: Robin Rosenberg @ 2008-02-13 22:38 UTC (permalink / raw)
To: André Goddard Rosa; +Cc: Git Mailing List
onsdagen den 13 februari 2008 skrev André Goddard Rosa:
> Hi, all!
>
> I would like to use kdiff3 to compare some folder like "include"
> between two different revisions.
> It would be something like "git diff v2.5:makefile HEAD:makefile",
> but for an entire folder.
>
> Kdiff3 give me a quick glance of its nice graphical output of the
> differences, without have to resort to looking/parsing 'git log'
> output.
> For now, easiest way for me is to keep my tree replicated in two
> different folders pointing to different revisions then use it.
>
> Is there a better way to do this kind of comparison?
Yes.
git diff <whatever options> | kompare -
-- robin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using kdiff3 to compare two different revisions of a folder
2008-02-13 22:38 ` Robin Rosenberg
@ 2008-02-14 0:36 ` André Goddard Rosa
2008-02-17 10:51 ` Jan Hudec
0 siblings, 1 reply; 7+ messages in thread
From: André Goddard Rosa @ 2008-02-14 0:36 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: Git Mailing List
> > Is there a better way to do this kind of comparison?
>
> Yes.
> git diff <whatever options> | kompare -
>
Thanks, Robin! It works too.
--
[]s,
André Goddard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using kdiff3 to compare two different revisions of a folder
2008-02-14 0:36 ` André Goddard Rosa
@ 2008-02-17 10:51 ` Jan Hudec
2008-02-17 11:35 ` André Goddard Rosa
0 siblings, 1 reply; 7+ messages in thread
From: Jan Hudec @ 2008-02-17 10:51 UTC (permalink / raw)
To: André Goddard Rosa; +Cc: Robin Rosenberg, Git Mailing List
On Wed, Feb 13, 2008 at 22:36:34 -0200, André Goddard Rosa wrote:
> > > Is there a better way to do this kind of comparison?
> >
> > Yes.
> > git diff <whatever options> | kompare -
> >
>
> Thanks, Robin! It works too.
It should be noted, that kompare seems to be the only graphical tool willing
to accept patch instead of two trees. Unfortunately it does not seem possible
to install it without KDE, not to speak about Windows (where kdiff3 works
quite well).
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Using kdiff3 to compare two different revisions of a folder
2008-02-17 10:51 ` Jan Hudec
@ 2008-02-17 11:35 ` André Goddard Rosa
0 siblings, 0 replies; 7+ messages in thread
From: André Goddard Rosa @ 2008-02-17 11:35 UTC (permalink / raw)
To: Jan Hudec; +Cc: Robin Rosenberg, Git Mailing List
On Feb 17, 2008 8:51 AM, Jan Hudec <bulb@ucw.cz> wrote:
> On Wed, Feb 13, 2008 at 22:36:34 -0200, André Goddard Rosa wrote:
> > > > Is there a better way to do this kind of comparison?
> > >
> > > Yes.
> > > git diff <whatever options> | kompare -
> > >
> >
> > Thanks, Robin! It works too.
>
> It should be noted, that kompare seems to be the only graphical tool willing
> to accept patch instead of two trees. Unfortunately it does not seem possible
> to install it without KDE, not to speak about Windows (where kdiff3 works
> quite well).
>
Yes, it is true. Patch support is not yet implemented on kdiff3.
Best regards,
--
[]s,
André Goddard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-02-17 11:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 1:44 Using kdiff3 to compare two different revisions of a folder André Goddard Rosa
2008-02-13 17:44 ` Brian Downing
2008-02-14 0:37 ` André Goddard Rosa
2008-02-13 22:38 ` Robin Rosenberg
2008-02-14 0:36 ` André Goddard Rosa
2008-02-17 10:51 ` Jan Hudec
2008-02-17 11:35 ` André Goddard Rosa
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).