# Re: [PATCH] gitweb: Add "next" link to commitdiff view

6 messages from 2006-10-28 to 2006-10-29. Participants: Luben Tuikov, Jakub Narebski, Junio C Hamano.
Thread: https://gitlist.dev/t/43138

## Jakub Narebski, 2006-10-28 16:10

Subject: Re: [PATCH] gitweb: Add "next" link to commitdiff view
Message-ID: <200610281810.36892.jnareb@gmail.com>
URL: https://gitlist.dev/e/200610281810.36892.jnareb%40gmail.com
In-Reply-To: <200610230037.57183.jnareb@gmail.com>

```
Jakub Narebski wrote:
> Add a kind of "next" view in the bottom part of navigation bar for
> "commitdiff" view.
> 
> For commitdiff between two commits:
>   (from: _commit_)
> For commitdiff for one single parent commit:
>   (parent: _commit_)
> For commitdiff for one merge commit
>   (merge: _commit_ _commit_ ...)
> For commitdiff for root (parentless) commit
>   (initial)
> where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
> display, everything is perhaps unnecessary esc_html on display.
> 
> Signed-off-by: Jakub Narebski <jnareb@gmail.com>
> ---
> 
> Junio (and others), is it what you wanted? The idea was to change
> "commitdiff" view only in minimal way, and preserve similarity
> to "commit" format.

Any reasons not to accept this patch? I find it very useful.

The idea to use fixed string instead of shortened SHA-1 of commit
was abandoned after some discussion in this thread.
-- 
Jakub Narebski

```

## Junio C Hamano, 2006-10-28 19:00

Subject: Re: [PATCH] gitweb: Add "next" link to commitdiff view
Message-ID: <7vzmbg8dum.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vzmbg8dum.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <200610281810.36892.jnareb@gmail.com>

```
Jakub Narebski <jnareb@gmail.com> writes:

> Jakub Narebski wrote:
>> Add a kind of "next" view in the bottom part of navigation bar for
>> "commitdiff" view.
>> 
>> For commitdiff between two commits:
>>   (from: _commit_)
>> For commitdiff for one single parent commit:
>>   (parent: _commit_)
>> For commitdiff for one merge commit
>>   (merge: _commit_ _commit_ ...)
>> For commitdiff for root (parentless) commit
>>   (initial)
>> where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
>> display, everything is perhaps unnecessary esc_html on display.
>> 
>> Signed-off-by: Jakub Narebski <jnareb@gmail.com>
>> ---
>> 
>> Junio (and others), is it what you wanted? The idea was to change
>> "commitdiff" view only in minimal way, and preserve similarity
>> to "commit" format.
>
> Any reasons not to accept this patch?

Nothing other than it was lost in the noise (I am partly
responsible for) that followed the patch.

	Message-ID: <200610230037.57183.jnareb@gmail.com>

Who acked this in the discussion?  I'd like to add "Acked-by:"
for them when I make the commit.

```

## Luben Tuikov, 2006-10-29 01:50

Subject: Re: [PATCH] gitweb: Add "next" link to commitdiff view
Message-ID: <196807.75961.qm@web31801.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/196807.75961.qm%40web31801.mail.mud.yahoo.com
In-Reply-To: <200610281810.36892.jnareb@gmail.com>

```
--- Jakub Narebski <jnareb@gmail.com> wrote:
> Jakub Narebski wrote:
> > Add a kind of "next" view in the bottom part of navigation bar for
> > "commitdiff" view.
> > 
> > For commitdiff between two commits:
> >   (from: _commit_)
> > For commitdiff for one single parent commit:
> >   (parent: _commit_)
> > For commitdiff for one merge commit
> >   (merge: _commit_ _commit_ ...)
> > For commitdiff for root (parentless) commit
> >   (initial)
> > where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
> > display, everything is perhaps unnecessary esc_html on display.
> > 
> > Signed-off-by: Jakub Narebski <jnareb@gmail.com>
> > ---
> > 
> > Junio (and others), is it what you wanted? The idea was to change
> > "commitdiff" view only in minimal way, and preserve similarity
> > to "commit" format.
> 
> Any reasons not to accept this patch? I find it very useful.
> 
> The idea to use fixed string instead of shortened SHA-1 of commit
> was abandoned after some discussion in this thread.

I prefer using the commit-8 without any "..." postfixed.  Anyone who
knows squat about git knows very well what a commit-8 is when they
see one -- the first 8 hexadecimal digits of the full SHA-1.

I like using "next" only when there is a "prev" right next to it,
i.e. based on _context_, something like this:
   << prev next >>
where "<< prev" is hyperlinked, and "next >>" is also.

I looked at your patch (first email in this thread) and from
what I gathered that it does, I like it (haven't tried it yet).

What I like about it is the clear information it conveys:
it gives me both the commit-8 and what that commit-8 _is_.

I sometimes remember commit-8s and this helps me a lot when
I move the mouse pointer to an xterm and want to do
git-show <commit-8>, and it futhermore helps me _know_ the
relationship between that commit-8 and the rest of the
information in the window frame gitweb is showing, (parent, etc).

Acked-by: Luben Tuikov <ltuikov@yahoo.com>
(not that it matters in any way ;-) )

   Luben



```

## Jakub Narebski, 2006-10-29 01:58

Subject: Re: [PATCH] gitweb: Add "next" link to commitdiff view
Message-ID: <200610290258.31771.jnareb@gmail.com>
URL: https://gitlist.dev/e/200610290258.31771.jnareb%40gmail.com
In-Reply-To: <196807.75961.qm@web31801.mail.mud.yahoo.com>

```
Luben Tuikov wrote:
> --- Jakub Narebski <jnareb@gmail.com> wrote:
>> Jakub Narebski wrote:
>>> Add a kind of "next" view in the bottom part of navigation bar for
>>> "commitdiff" view.
>>> 
>>> For commitdiff between two commits:
>>>   (from: _commit_)
>>> For commitdiff for one single parent commit:
>>>   (parent: _commit_)
>>> For commitdiff for one merge commit
>>>   (merge: _commit_ _commit_ ...)
>>> For commitdiff for root (parentless) commit
>>>   (initial)
>>> where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
>>> display, everything is perhaps unnecessary esc_html on display.
[...]
>> 
>> Any reasons not to accept this patch? I find it very useful.
>> 
>> The idea to use fixed string instead of shortened SHA-1 of commit
>> was abandoned after some discussion in this thread.
> 
> I prefer using the commit-8 without any "..." postfixed.  Anyone who
> knows squat about git knows very well what a commit-8 is when they
> see one -- the first 8 hexadecimal digits of the full SHA-1.
> 
> I like using "next" only when there is a "prev" right next to it,
> i.e. based on _context_, something like this:
>    << prev next>>
> where "<< prev" is hyperlinked, and "next>>" is also.

Unfortunately this is simply not possible in this case, as links in git
are only from commit to paren(a), in one direction only.

Besides as you can see we can have more than one "next>>" link: for merge
commit there are multiple parents. Well, for branch points there are
multiple commits which have given commit as (one of) its parent(s), so
there can be multiple "<<prev" links as well.

> I looked at your patch (first email in this thread) and from
> what I gathered that it does, I like it (haven't tried it yet).
> 
> What I like about it is the clear information it conveys:
> it gives me both the commit-8 and what that commit-8 _is_.

It is commit-7, but that can be easily changed.

> Acked-by: Luben Tuikov <ltuikov@yahoo.com>
> (not that it matters in any way ;-) )

IIRC Junio asked for ACKs.
-- 
Jakub Narebski

```

## Luben Tuikov, 2006-10-29 02:04

Subject: Re: [PATCH] gitweb: Add "next" link to commitdiff view
Message-ID: <672246.46875.qm@web31808.mail.mud.yahoo.com>
URL: https://gitlist.dev/e/672246.46875.qm%40web31808.mail.mud.yahoo.com
In-Reply-To: <200610290258.31771.jnareb@gmail.com>

```
--- Jakub Narebski <jnareb@gmail.com> wrote:
> Luben Tuikov wrote:
> > --- Jakub Narebski <jnareb@gmail.com> wrote:
> >> Jakub Narebski wrote:
> >>> Add a kind of "next" view in the bottom part of navigation bar for
> >>> "commitdiff" view.
> >>> 
> >>> For commitdiff between two commits:
> >>>   (from: _commit_)
> >>> For commitdiff for one single parent commit:
> >>>   (parent: _commit_)
> >>> For commitdiff for one merge commit
> >>>   (merge: _commit_ _commit_ ...)
> >>> For commitdiff for root (parentless) commit
> >>>   (initial)
> >>> where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
> >>> display, everything is perhaps unnecessary esc_html on display.
> [...]
> >> 
> >> Any reasons not to accept this patch? I find it very useful.
> >> 
> >> The idea to use fixed string instead of shortened SHA-1 of commit
> >> was abandoned after some discussion in this thread.
> > 
> > I prefer using the commit-8 without any "..." postfixed.  Anyone who
> > knows squat about git knows very well what a commit-8 is when they
> > see one -- the first 8 hexadecimal digits of the full SHA-1.
> > 
> > I like using "next" only when there is a "prev" right next to it,
> > i.e. based on _context_, something like this:
> >    << prev next>>
> > where "<< prev" is hyperlinked, and "next>>" is also.
> 
> Unfortunately this is simply not possible in this case, as links in git
> are only from commit to paren(a), in one direction only.

I was not suggesting that.  I simply saw a "next" suggestion in this
thread and wanted to mention about "next", "prev" and context.

> It is commit-7, but that can be easily changed.

Please do change it to "commit-8" -- it'd be consistent with the rest
of GIT.

> > Acked-by: Luben Tuikov <ltuikov@yahoo.com>
> > (not that it matters in any way ;-) )
> 
> IIRC Junio asked for ACKs.

In this email, it seems that he's asking for, quoting,
 "Acked-by:":
http://marc.theaimsgroup.com/?l=git&m=116206206008374&w=2

      Luben

```

## Jakub Narebski, 2006-10-29 02:10

Subject: Re: [PATCH] gitweb: Add "next" link to commitdiff view
Message-ID: <200610290310.30265.jnareb@gmail.com>
URL: https://gitlist.dev/e/200610290310.30265.jnareb%40gmail.com
In-Reply-To: <672246.46875.qm@web31808.mail.mud.yahoo.com>

```
Luben Tuikov wrote:
> --- Jakub Narebski <jnareb@gmail.com> wrote:
>>
>> It is commit-7, but that can be easily changed.
> 
> Please do change it to "commit-8" -- it'd be consistent with the rest
> of GIT.

Well, some parts of GIT use "commit-8" (for example git-describe),
other use "commit-7...": this includes git-diff both in --raw
(git diff --raw, as opposed to git-diff-tree), git-diff in it's patch 
format in "index <hash>..<hash>" extended header, in "Merge:" line for 
merges in git-show output.

-- 
Jakub Narebski

```
