* difftool, open all diff files immediately, not in serial
@ 2009-08-04 20:49 Seba Illingworth
2009-08-04 21:47 ` Thomas Rast
0 siblings, 1 reply; 6+ messages in thread
From: Seba Illingworth @ 2009-08-04 20:49 UTC (permalink / raw)
To: git
The default git diff behavior is to open each diff file in serial
(wait for previous file to be closed before opening next file).
I'm looking for a way to open all the files at once - in BeyondCompare
for example this would open all the files in tabs within the same BC window.
This would make it easier to review a complex set of changes;
flick back and forwards between the diff files and ignore
unimportant files.
Here's my same question on StackOverflow with a couple of ideas
I have found (copy files to temp dir and do folder diff, Araxis
has 'nowait' option):
http://stackoverflow.com/questions/1220309
--Seba
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: difftool, open all diff files immediately, not in serial
2009-08-04 20:49 difftool, open all diff files immediately, not in serial Seba Illingworth
@ 2009-08-04 21:47 ` Thomas Rast
2009-08-04 22:52 ` Seba Illingworth
2009-08-20 1:39 ` difftool, open all diff files immediately, not in serial Seba Illingworth
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Rast @ 2009-08-04 21:47 UTC (permalink / raw)
To: Seba Illingworth; +Cc: git
Seba Illingworth wrote:
> The default git diff behavior is to open each diff file in serial
> (wait for previous file to be closed before opening next file).
>
> I'm looking for a way to open all the files at once - in BeyondCompare
> for example this would open all the files in tabs within the same BC window.
I posted the script below on IRC the other week[1] in reply to someone
looking for a way to do this for 'meld'. I'm not sure this is the
*fastest* way to do this, but I'm at least trying to take a few
shortcuts ;-)
Since this is now the second request for such a tool, it would be nice
if you could at least shape this as a contrib/ patch (if it fits your
needs, of course).
[1] http://colabti.org/irclogger/irclogger_log/git?date=2009-07-14#l2180
-- 8< --
#!/bin/sh
. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel # for the tar below
pre="${1-HEAD}"
post="$2"
tmp="$(mktemp -d)"
cleanup () {
rm -rf $tmp
}
trap cleanup EXIT
mkdir "$tmp"/a "$tmp"/b
if [ -n "$post" ]; then
git diff --name-only "$pre" "$post" > "$tmp"/filelist
while read name; do
mkdir -p "$tmp"/b/"$(dirname "$name")"
git show "$post":"$name" > "$tmp"/b/"$name"
done < "$tmp"/filelist
else
git diff --name-only "$pre" > "$tmp"/filelist
tar -c -T "$tmp"/filelist | (cd "$tmp"/b && tar -x)
fi
while read name; do
mkdir -p "$tmp"/a/"$(dirname "$name")"
git show "$pre":"$name" > "$tmp"/a/"$name"
done < "$tmp"/filelist
cd "$tmp"
#meld a b
diff -ur a b
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: difftool, open all diff files immediately, not in serial
2009-08-04 21:47 ` Thomas Rast
@ 2009-08-04 22:52 ` Seba Illingworth
2010-04-14 2:16 ` My solution Seb
2009-08-20 1:39 ` difftool, open all diff files immediately, not in serial Seba Illingworth
1 sibling, 1 reply; 6+ messages in thread
From: Seba Illingworth @ 2009-08-04 22:52 UTC (permalink / raw)
To: git
Thomas Rast <trast <at> student.ethz.ch> writes:
>
> I posted the script below on IRC the other week[1] in reply to someone
> looking for a way to do this for 'meld'.
...
Thanks Thomas, I'll take a few days to digest/test this
(I'm new to bash and git) and give feedback.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: difftool, open all diff files immediately, not in serial
2009-08-04 21:47 ` Thomas Rast
2009-08-04 22:52 ` Seba Illingworth
@ 2009-08-20 1:39 ` Seba Illingworth
1 sibling, 0 replies; 6+ messages in thread
From: Seba Illingworth @ 2009-08-20 1:39 UTC (permalink / raw)
To: git
Thomas Rast <trast <at> student.ethz.ch> writes:
> I posted the script below on IRC the other week[1] in reply to someone
> looking for a way to do this for 'meld'. I'm not sure this is the
> *fastest* way to do this, but I'm at least trying to take a few
> shortcuts...
I've come up with a simple script that diffs the files in a background task:
for name in $(git diff --name-only $1); do git difftool $1 $name & done
Then aliased the script for usage:
git diffall [--staged]
Being a bash newbie, I'd appreciate any feedback on what seems to be
a simple solution...??
^ permalink raw reply [flat|nested] 6+ messages in thread
* My solution
2009-08-04 22:52 ` Seba Illingworth
@ 2010-04-14 2:16 ` Seb
2010-04-14 6:41 ` David Aguilar
0 siblings, 1 reply; 6+ messages in thread
From: Seb @ 2010-04-14 2:16 UTC (permalink / raw)
To: git
Seba Illingworth <seba.illingworth <at> gmail.com> writes:
>
> Thomas Rast <trast <at> student.ethz.ch> writes:
>
> >
> > I posted the script below on IRC the other week[1] in reply to someone
> > looking for a way to do this for 'meld'.
> ...
Just realised I never posted my solution. This works great for me, I wouldn't do
without it:
http://blog.codefarm.co.nz/2009/08/git-diff-and-difftool-open-all-files.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: My solution
2010-04-14 2:16 ` My solution Seb
@ 2010-04-14 6:41 ` David Aguilar
0 siblings, 0 replies; 6+ messages in thread
From: David Aguilar @ 2010-04-14 6:41 UTC (permalink / raw)
To: Seb; +Cc: git
On Wed, Apr 14, 2010 at 02:16:07AM +0000, Seb wrote:
> Seba Illingworth <seba.illingworth <at> gmail.com> writes:
>
> >
> > Thomas Rast <trast <at> student.ethz.ch> writes:
> >
> > >
> > > I posted the script below on IRC the other week[1] in reply to someone
> > > looking for a way to do this for 'meld'.
> > ...
>
> Just realised I never posted my solution. This works great for me, I wouldn't do
> without it:
> http://blog.codefarm.co.nz/2009/08/git-diff-and-difftool-open-all-files.html
Thanks. We should add git difftool --all, what do you think?
Do you have any thoughts about difftool's defaults?
I've always kind of felt that --no-prompt was a possible candidate...
--
David
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-04-14 6:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 20:49 difftool, open all diff files immediately, not in serial Seba Illingworth
2009-08-04 21:47 ` Thomas Rast
2009-08-04 22:52 ` Seba Illingworth
2010-04-14 2:16 ` My solution Seb
2010-04-14 6:41 ` David Aguilar
2009-08-20 1:39 ` difftool, open all diff files immediately, not in serial Seba Illingworth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.