# [Announce] gitview-0.1

9 messages from 2006-02-01 to 2006-02-01. Participants: Aneesh Kumar, Dave Jones, Junio C Hamano, Linus Torvalds, Alex Riesen, Fernando J. Pereda.
Thread: https://gitlist.dev/t/3206

## Aneesh Kumar, 2006-02-01 04:16

Subject: [Announce] gitview-0.1
Message-ID: <cc723f590601312016vabba201ye6d3739b3927f1a@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590601312016vabba201ye6d3739b3927f1a%40mail.gmail.com

```
Hi,

Gnome based git repository browser. The code is derived from bazaar-ng
repository browser.

To see how it looks

http://www.flickr.com/photos/17388011@N00/92918446/

I don't have a web location where i can host it so i am attaching it below.
It would be great if we can get it added to git repository

sample usage
takes same argument as git rev-list

gitview --since=2.week.ago

-aneesh

```

## Dave Jones, 2006-02-01 04:29

Subject: Re: [Announce] gitview-0.1
Message-ID: <20060201042930.GV16557@redhat.com>
URL: https://gitlist.dev/e/20060201042930.GV16557%40redhat.com
In-Reply-To: <cc723f590601312016vabba201ye6d3739b3927f1a@mail.gmail.com>

```
On Wed, Feb 01, 2006 at 09:46:59AM +0530, Aneesh Kumar wrote:

 > I don't have a web location where i can host it so i am attaching it below.
 > It would be great if we can get it added to git repository
 > 
 > sample usage
 > takes same argument as git rev-list
 > 
 > gitview --since=2.week.ago

Nice, here's your first patch against it :-)

The one thing I like about gitk over this though is that with gitk
you don't have to click a button to see the diff.
For casual history browsing, it's much nicer to just scroll the bottom
window. Making it pop up a new window for each diff is just irritating.

		Dave


--- gitview~	2006-01-31 23:24:36.000000000 -0500
+++ gitview	2006-01-31 23:24:49.000000000 -0500
@@ -254,7 +254,7 @@ class DiffWindow:
 	def __init__(self):
 		self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
 		self.window.set_border_width(0)
-		self.window.set_title("Git reposotiry browser diff window")
+		self.window.set_title("Git repository browser diff window")
 
 		# Use two thirds of the screen by default
 		screen = self.window.get_screen()

```

## Aneesh Kumar, 2006-02-01 04:41

Subject: Re: [Announce] gitview-0.1
Message-ID: <cc723f590601312041o1dc594c7t69418b735ef29ee@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590601312041o1dc594c7t69418b735ef29ee%40mail.gmail.com
In-Reply-To: <20060201042930.GV16557@redhat.com>

```
On 2/1/06, Dave Jones <davej@redhat.com> wrote:
> On Wed, Feb 01, 2006 at 09:46:59AM +0530, Aneesh Kumar wrote:
>
>  > I don't have a web location where i can host it so i am attaching it below.
>  > It would be great if we can get it added to git repository
>  >
>  > sample usage
>  > takes same argument as git rev-list
>  >
>  > gitview --since=2.week.ago
>
> Nice, here's your first patch against it :-)
>
> The one thing I like about gitk over this though is that with gitk
> you don't have to click a button to see the diff.
> For casual history browsing, it's much nicer to just scroll the bottom
> window. Making it pop up a new window for each diff is just irritating.
>

I always browse the repository looking at the commit message and only
if interested i look at the changes.  That's why i made it look that
way.

-aneesh

```

## Aneesh Kumar, 2006-02-01 11:28

Subject: Re: [Announce] gitview-0.1
Message-ID: <cc723f590602010328w7b4a7befr40a76620e197d00c@mail.gmail.com>
URL: https://gitlist.dev/e/cc723f590602010328w7b4a7befr40a76620e197d00c%40mail.gmail.com
In-Reply-To: <cc723f590601312041o1dc594c7t69418b735ef29ee@mail.gmail.com>

```
On 2/1/06, Aneesh Kumar <aneesh.kumar@gmail.com> wrote:
> On 2/1/06, Dave Jones <davej@redhat.com> wrote:

[..snip...]

> >
> > The one thing I like about gitk over this though is that with gitk
> > you don't have to click a button to see the diff.
> > For casual history browsing, it's much nicer to just scroll the bottom
> > window. Making it pop up a new window for each diff is just irritating.
> >
>
> I always browse the repository looking at the commit message and only
> if interested i look at the changes.  That's why i made it look that
> way.


with gitview  (attached) I have added an option --with-diff. That will
add the diff details. Now I would like somebody with good git
knowledge to review the different  commands that i am using to get
information out of git  For example with --with-diff option i am
getting the complete diff by

for parent_id in  parent_sha1 parent_sha2 parent_sha3 .......
commit_diff = commit_diff + git diff tree -p parent_id commit_sha1

is this the correct way ?

-aneesh

```

## Junio C Hamano, 2006-02-01 20:01

Subject: Re: [Announce] gitview-0.1
Message-ID: <7v3bj2df1b.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v3bj2df1b.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <cc723f590602010328w7b4a7befr40a76620e197d00c@mail.gmail.com>

```
Aneesh Kumar <aneesh.kumar@gmail.com> writes:

> for parent_id in  parent_sha1 parent_sha2 parent_sha3 .......
> commit_diff = commit_diff + git diff tree -p parent_id commit_sha1
>
> is this the correct way ?

Are parent_sha$N true parents of commit_sha1?  If you want to
get three independent diffs, "git diff-tree -m -p $commit_sha1"
would give that to you in one go.

```

## Linus Torvalds, 2006-02-01 20:17

Subject: Re: [Announce] gitview-0.1
Message-ID: <Pine.LNX.4.64.0602011206040.21884@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0602011206040.21884%40g5.osdl.org
In-Reply-To: <7v3bj2df1b.fsf@assigned-by-dhcp.cox.net>

```


On Wed, 1 Feb 2006, Junio C Hamano wrote:
> 
> Are parent_sha$N true parents of commit_sha1?  If you want to
> get three independent diffs, "git diff-tree -m -p $commit_sha1"
> would give that to you in one go.

Btw, I think we should change

	git-diff-tree --stdin

to look at the rest of the line.

Right now it _only_ takes the commit from that line, along with possibly 
the first parent if one exists (if one is not listed, the list of parents 
will be correctly taken from the commit).

Which makes it mostly useless for merges with a dense history.

Especially with the new "-cc" flag, using it for merges really does make 
a lot of sense, but it's not workable.

So right now, git-whatchanged does

	git-rev-list | git-diff-tree --stdin <filelist>

which means that it handles merges in a pruned-down history wrong. Now, 
that's ok, because it currently never prunes the history of git-rev-list 
(it instead prunes purely in git-diff-tree). So it works right, and can 
take the -cc flag because it always gets the parent information from the 
commit.

HOWEVER, currently doing the pruning the other way around, ie

	git-rev-list --parents <filelist> | git-diff-tree --stdin

does _not_ work right. It ignores anything but the first parent, because 
"git-diff-tree --stdin" doesn't understand merges.

And doing the pruning the other way around would actually make sense 
sometimes. Not for git-whatchanged (where doing the pruning in 
git-diff-tree means that we don't have to parse the history ahead of time, 
so we get immediate feedback), but in a git-annotate context you want to 
do the pruning ahead-of-time. So git-diff-tree not supporting it is sad ;(

		Linus

```

## Junio C Hamano, 2006-02-01 20:34

Subject: Re: [Announce] gitview-0.1
Message-ID: <7vzmlaakdc.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vzmlaakdc.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0602011206040.21884@g5.osdl.org>

```
Linus Torvalds <torvalds@osdl.org> writes:

> Btw, I think we should change
>
> 	git-diff-tree --stdin
>
> to look at the rest of the line.

Yes it is one of the "broken things I am aware of".  It does not
even show --pretty for the same reason, and I was planning to do
a fake commit objects to handle them (taking the message from
commit, locally grafting the parents from the line to it).

```

## Alex Riesen, 2006-02-01 20:58

Subject: Re: [Announce] gitview-0.1
Message-ID: <20060201205805.GA6384@steel.home>
URL: https://gitlist.dev/e/20060201205805.GA6384%40steel.home
In-Reply-To: <cc723f590601312016vabba201ye6d3739b3927f1a@mail.gmail.com>

```
Aneesh Kumar, Wed, Feb 01, 2006 05:16:59 +0100:
> 
> Gnome based git repository browser. The code is derived from bazaar-ng
> repository browser.
> 
> To see how it looks
> 
> http://www.flickr.com/photos/17388011@N00/92918446/
> 
> I don't have a web location where i can host it so i am attaching it below.
> It would be great if we can get it added to git repository
> 
> sample usage
> takes same argument as git rev-list
> 
> gitview --since=2.week.ago
> 

Doesn't really work here: no tree like on your screenshot, and a lot
of messages like this:

(gitview:14905): GLib-GObject-WARNING **: IA__g_object_set_property: object clas
s `PyGtkGenericCellRenderer' has no property named `out-lines'

(gitview:14905): GLib-GObject-WARNING **: IA__g_object_set_property: object clas
s `PyGtkGenericCellRenderer' has no property named `in-lines'

(gitview:14905): GLib-GObject-WARNING **: IA__g_object_set_property: object clas
s `PyGtkGenericCellRenderer' has no property named `node'

(gitview:14905): GLib-GObject-WARNING **: IA__g_object_set_property: object clas
s `PyGtkGenericCellRenderer' has no property named `out-lines'

(gitview:14905): GLib-GObject-WARNING **: IA__g_object_set_property: object clas
s `PyGtkGenericCellRenderer' has no property named `in-lines'

(gitview:14905): GLib-GObject-WARNING **: IA__g_object_set_property: object clas
s `PyGtkGenericCellRenderer' has no property named `node'
Traceback (most recent call last):
  File "/home/raa/gitview", line 166, in on_render
    ctx = window.cairo_create()
AttributeError: 'gtk.gdk.Window' object has no attribute 'cairo_create'

Gentoo, Python 2.4.2, pycairo 1.0.2.

```

## Fernando J. Pereda, 2006-02-01 21:02

Subject: Re: [Announce] gitview-0.1
Message-ID: <20060201210204.GB15900@ferdyx.org>
URL: https://gitlist.dev/e/20060201210204.GB15900%40ferdyx.org
In-Reply-To: <20060201205805.GA6384@steel.home>

```
On Wed, Feb 01, 2006 at 09:58:05PM +0100, Alex Riesen wrote:
| Gentoo, Python 2.4.2, pycairo 1.0.2.

Just upgrade to a newer pygtk and it'll work fine:

[ebuild   R   ] dev-python/pygtk-2.8.2  -doc +opengl 0 kB

I had the same problem until I installed the above version.

Cheers,
Ferdy

-- 
Fernando J. Pereda Garcimartín
Gentoo Developer (Alpha,net-mail,mutt,git)
20BB BDC3 761A 4781 E6ED  ED0B 0A48 5B0C 60BD 28D4

```
