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

Re: git-gui: automatically move focus to staged file before typing commit message?

From
Birger Skogeng Pedersen <birger.sp@gmail.com>
Date
Oct 8, 2019, 19:46 UTC
Message-ID
<CAGr--=JM2uTyyymUxHw6vhE9H=bzAO_E_yzrmuOhuuk-td02CA@mail.gmail.com>
In-Reply-To
<20191008175938.iqibournnxam4r6d@yadavpratyush.com>
Hi Pratyush,
On Tue, Oct 8, 2019 at 7:59 PM Pratyush Yadav <me@yadavpratyush.com> wrote:
Show 7 quoted lines
> On 07/10/19 06:52PM, Birger Skogeng Pedersen wrote:
> > So I kinda got this working, but only when focusing the commit message widget.
>
> Isn't this the point of your feature? You change the view when focusing
> the commit message widget. I remember you were explicitly against doing
> it as soon as all unstaged files were staged. Did you change your point
> of view on that?

Yes, kindof. Sorry for not being more clear about the intent. I would prefer that the automatic selection of a staged file happens also when adding files while the Commit Message widget is in focused. For instance, if the user focuses the Commit Message widget and then hits CTRL/CMD+i a staged file should be selected (if it isn't already).

Show 13 quoted lines
> > I did not manage to get it working when invoking "do_add_all", (e.g.
> > when pressing CTRL/CMD+i). I added this:
> >
> > bind $ui_comm <$M1B-Key-i> {do_add_all;select_staged_file;break}
> > bind $ui_comm <$M1B-Key-I> {do_add_all;select_staged_file;break}
> >
> > But it seems that the "select_staged_file" procedure is invoked
> > _before_ "do_add_all" finishes. So that's not working. All changes
> > gets staged, but no staged change is selected.
>
> Hmm, that shouldn't happen. select_staged_file should be executed
> _after_ do_add_all, not before. I haven't looked into your patches yet
> though.
I don't understand why it doesn't work. I'll play around some more with it.
Show 9 quoted lines
> > And I'm quite stuck. Do I send the unfinished patch, so maybe I can
> > get some advice? Or is it better to just wait until I have the perfect
> > patch ready?
>
> If you are stuck on something, and want to share the WIP feature to get
> help/comments, you should mark your patches as "RFC" (Request For
> Comments). This can be done by passing the option '-rfc' to
> `git-format-patch`. This will make your subject prefix to "RFC PATCH"
> instead of just "PATCH".
Sorry for not doing that, I'll take not and do that next time.

Thanks! Birger

Previous: Pratyush Yadav
Message 22 of 22 in “git-gui: automatically move focus to staged file before typing commit message?”
  1. Birger Skogeng PedersenSep 14, 2019
  2. Pratyush YadavSep 14, 2019
  3. Johannes SixtSep 14, 2019
  4. Pratyush YadavSep 14, 2019
  5. Birger Skogeng PedersenSep 15, 2019
  6. Pratyush YadavSep 16, 2019
  7. Birger Skogeng PedersenSep 26, 2019
  8. Pratyush YadavSep 26, 2019
  9. Birger Skogeng PedersenSep 26, 2019
  10. Birger Skogeng PedersenOct 7, 2019
  11. 1/2 git-gui: implement proc select_path_in_widgetBirger Skogeng Pedersen, Oct 7, 2019
  12. 2/2 git-gui: select staged on ui_comm focusBirger Skogeng Pedersen, Oct 7, 2019
  13. Pratyush YadavOct 16, 2019
  14. Pratyush YadavOct 13, 2019
  15. Birger Skogeng PedersenOct 15, 2019
  16. Pratyush YadavOct 16, 2019
  17. Birger Skogeng PedersenOct 17, 2019
  18. Johannes SixtOct 17, 2019
  19. Birger Skogeng PedersenOct 17, 2019
  20. Pratyush YadavOct 17, 2019
  21. Pratyush YadavOct 8, 2019
  22. Birger Skogeng PedersenOct 8, 2019

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.