git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-gui blame: show previous commit

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 30, 2007, 03:43 UTC
Message-ID
<20070730034314.GQ20052@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0707291238230.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 10 quoted lines
> On Sun, 29 Jul 2007, Florian Weimer wrote:
> 
> > How can I view the previous commit touching a specific line, so that I
> > can see what was there before?  For instance, the change could be
> > whitespace-only, so that I want to dig deeper.
> 
> If you want to ignore whitespace changes, try the option "-w" to "git 
> blame".  I have no idea if "git-gui blame" can use that option, but it 
> should not be hard for you to find out, and provide a patch if it does 
> not yet.

gitgui-0.7.4-35-ga840566 is a change from Junio to enable the -w flag to git-blame if the underlying git is 1.5.3 or later. So you'd need a pretty recent git-gui and a 1.5.3-rc0 or later git binary underneath of it to get -w enabled in blame. But it is there for the original line annotation pass (the second blame pass but first column displayed).

I keep meaning to add a "Show parent commit" in the context menu of the blame viewer, but I haven't gotten around to it yet. It has been requested a few times, just hasn't been done yet. Maybe someone who wants it will submit a patch. ;-)

In really recent git-gui (gitgui-0.7.5-76-g8e891fa and later) you can browse any revision you want, so you could copy the commit SHA-1 from the lower pane and paste it in as "$sha1^" into the revision expression field of the browse dialog, navigate to the file and open the blame viewer. That is really annoying, and doesn't jump you to the correct lines automatically. But it is possible to view the parent.

-- 
Shawn.
Previous: Johannes SchindelinNext: Jakub Narebski
Message 3 of 4 in “git-gui blame: show previous commit”
  1. Florian WeimerJul 29, 2007
  2. Johannes SchindelinJul 29, 2007
  3. Shawn O. PearceJul 30, 2007
  4. Jakub NarebskiJul 29, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.