After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700045 - gitg: off-by-one in line numbering of diff in "Changes" tab
gitg: off-by-one in line numbering of diff in "Changes" tab
Status: RESOLVED OBSOLETE
Product: gitg
Classification: Applications
Component: gitg-0.x
0.2.x
Other Linux
: Normal minor
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-10 03:33 UTC by Dmitry Smirnov
Modified: 2013-06-14 17:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing the newer diff view (138.31 KB, image/png)
2013-05-10 16:19 UTC, Sindhu S
Details

Description Dmitry Smirnov 2013-05-10 03:33:33 UTC
Forwarding Debian bug #693430: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693430

A typical content of the "Changes" tab looks like this in ascii art:

      diff --git a/foo b/foo
      index abcde..12345 100644
3  5  @@ -3,8 +5,7 @@ context
4  6   common context
5  7   common context
6      common context
7     -line only in a/foo
   8  -line only in a/foo
8  9  +line only in b/foo
9  10 common context
10 11 common context
11 12 common context
12 13

Please observe how the @@ line is already numbered. It should have no
numbers instead. As a consequence the last "common context" line is
numbered as the first deleted line.

Also notice how there is an empty line numbered. This seems like a wrong
fix to the wrong numbering.

The corresponding code is in gitg-diff-view.c function ensure_scan, but
I have no idea how to fix this.
Comment 1 Sindhu S 2013-05-10 16:09:31 UTC
Hello, Dmitry,

> A typical content of the "Changes" tab looks like this in ascii art:
> 
>       diff --git a/foo b/foo
>       index abcde..12345 100644
> 3  5  @@ -3,8 +5,7 @@ context

<snip>
 
> Please observe how the @@ line is already numbered. It should have no
> numbers instead. 

Am reporting that @@ line is no more numbered in the diff view (the part of gitg where a commit's details are shown) in the current git master code and hence all other repercussion as a result are also fixed.

Please confirm if this bug could be closed.
Comment 2 Sindhu S 2013-05-10 16:19:14 UTC
Created attachment 243804 [details]
Screenshot showing the newer diff view
Comment 3 Sindhu S 2013-06-14 17:11:42 UTC
This bug report was filed against an older version of gitg (C-version). Moving bug to gitg-0.x.

As per previous comments, the bug is no longer reproducible against the current git master version of gitg (written in vala).

Closing bug as RESOLVED and OBSOLETE.