Skip to content

git-gui: automatically select staged file before writing the commit msg #2341

@birgersp

Description

@birgersp
  • I was not able to find an open or closed issue matching what I'm seeing

Hi all,

I've raised the following issue in the git mailing list, already. So far 2 people have replied, but they didn't really voice their opinion whether this is a good idea or not. So I'd like to hear your thoughts

(copy-paste from the mail)

I personally prefer to have the changes I am about to commit visible
in the diff view, while I write my commit message. So usually I do
this:

  1. Stage the file(s) I've been working on.
  2. Select a file I just staged, so I can see the changes in the diff widget.
  3. Jump to the "Commit Message" widget to type up my commit message.
    Basically, I would like to be able to skip step 2. When the user
    stages the last file in the "Unstaged Changes" widget, no file is
    selected and the diff view becomes blank. When this is the case, I
    would prefer that git-gui automatically selects one of the staged
    files and shows it in the diff widget before I type up my commit
    message. Naturally, this automatic selection should only happen
    when the user chooses focus the "Commit Message" widget.

I propose:
(When the user focuses the "Commit Message" widget, if no file is
currently selected (i.e. diff widget shows no text))
automatically select the first file listed in the "Staged Changes"
widget so the changes of that file show up in the diff widget.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions