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

Re: [PATCH] git-gui: Fast staging/unstaging of hunks/lines

From
Johannes Sixt <j6t@kdbg.org>
Date
Apr 11, 2010, 19:01 UTC
Message-ID
<201004112101.54908.j6t@kdbg.org>
In-Reply-To
<x2o36ca99e91004110038oce1ffa15jc49244f228ce218@mail.gmail.com>
On Sonntag, 11. April 2010, Bert Wesarg wrote:
> On Mon, Apr 5, 2010 at 11:01, Bert Wesarg <bert.wesarg@googlemail.com> 
wrote:
Show 6 quoted lines
> > This adds a shortcut to stage/unstage hunks or a range of lines. Which is
> > done on a mouse button 1 release event and holding the control key in the
> > diff view. If there is currently a selection only the selected lines will
> > be staged/unstaged. Otherwise the hunk will be staged/unstaged.
>
> Ping.
I gave the patch a quick try.

I don't think that I would use it a lot because it is very easy to mess up a staged change: The problem is that a click without anything selected will stage an entire hunk. I frequently use "Stage Line(s)" to separate neighboring changes that must go to separate commits, but with you feature it is very easy to forget to select something and, hence, to stage the entire hunk accidentally - which means that I would have to start over with the hunk and all the "quick" aspects of the feature would be lost.

That said, since I don't have Ctrl pressed very often while working in git-gui, the patch wouldn't hurt me, I think.

-- Hannes
Previous: Bert WesargNext: Bert Wesarg
Message 3 of 6 in “git-gui: Fast staging/unstaging of hunks/lines”
  1. git-gui: Fast staging/unstaging of hunks/linesBert Wesarg, Apr 5, 2010
  2. Bert WesargApr 11, 2010
  3. Johannes SixtApr 11, 2010
  4. Bert WesargApr 12, 2010
  5. Johannes SixtApr 12, 2010
  6. Bert WesargApr 12, 2010

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.