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

Re: [PATCH] git-gui: Don't select the wrong file if the last listed file is staged.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jun 25, 2008, 20:57 UTC
Message-ID
<20080625205702.GN11793@spearce.org>
In-Reply-To
<486222A6.70205@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 12 quoted lines
> Abhijit Menon-Sen schrieb:
> > Johannes Sixt noticed that if the last file in the list was staged, my
> > earlier patch would display the diff for the penultimate file, but show
> > the file _before_ that as being selected.
> > 
> > This was due to my misunderstanding the lno argument to show_diff.
> > 
> > This patch fixes the problem: lno is not decremented in the special case
> > to handle the last item in the list (though we still need to use $lno-1
> > to find the right path for the next diff).
> 
> Thanks. It works here, too:
Thanks, both.  Its in my tree.
 
-- 
Shawn.
Previous: Johannes Sixt
Message 4 of 4 in “git-gui: Move on to the next filename after staging/unstaging a change”
  1. git-gui: Move on to the next filename after staging/unstaging a changeAbhijit Menon-Sen, Jun 12, 2008
  2. git-gui: Don't select the wrong file if the last listed file is staged.Abhijit Menon-Sen, Jun 25, 2008
  3. Johannes SixtJun 25, 2008
  4. Shawn O. PearceJun 25, 2008

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.