Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333429 - Previous Commit Messages drop-down, for convenience (like other team providers)
Summary: Previous Commit Messages drop-down, for convenience (like other team providers)
Status: CLOSED DUPLICATE of bug 342590
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement with 4 votes (vote)
Target Milestone: 1.3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 352310 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-03 10:29 EST by Michael Vorburger CLA
Modified: 2018-09-17 04:57 EDT (History)
8 users (show)

See Also:


Attachments
Screenshot of how e.g. Subclipse does this (but I'm sure you knew what I meant) (30.59 KB, image/png)
2011-01-03 10:32 EST, Michael Vorburger CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Vorburger CLA 2011-01-03 10:29:20 EST
Build Identifier: eGit 0.10.1

It would be great if eGit's Commit Changes UI dialog had a drop-down (ideallyjust under the big Commit Message box) listing previous commits messages, to be able to pick from them.

This is simply for convenience of course, and in line with what other Eclipse Team Providers such as Subversive (and presumably even the good ol' CVS Team provider?) and e.g. TortoiseSVN do.

It would copy what is picked in the Commit Message box (for the user to then often further edit it).  The label for the drop-down could be e.g. "Choose a previously entered message:" (copied from Subversive's).

PS: Subversive seems to have support for some (standard Eclipse Team?) 'Comment Templates' & 'Log Template Properties'. IMHO those aren't frequently used and would't necessarily have to be supported by eGit in this feature.

Reproducible: Always
Comment 1 Michael Vorburger CLA 2011-01-03 10:32:15 EST
Created attachment 185961 [details]
Screenshot of how e.g. Subclipse does this (but I'm sure you knew what I meant)
Comment 2 Robin Rosenberg CLA 2011-01-05 18:21:14 EST
That goes a bit against the recommended work flow in Git, so I'm not sure we should encourage that too much. If you need the same message twice, you would normally squash those commits together, before publishing them to others. With subversion you cannot do that, which is an obvious reason for wanting the exact same message again.

I usually set a comment that starts like "..." to indicate a commit is meant for squashing before publishing.
Comment 3 Michael Vorburger CLA 2011-01-06 06:09:21 EST
Typically I don't need the SAME message twice, but start and then edit it; UC: You have e.g. an issue tracker reference in the previous commit and would like to re-use, as on a feature branch I'll do many smalls commits, all starting with the same e.g. JIRA key, with different detailed messages (squashing then when merging the FB into a master).  Granted that's a "convention" and may be influenced by an old SVN reflex (could just start a FB branch with issue tracker key in first commit message, then use "...").  

Agreed this is a low priority optional "nice to have"; bugs go first! ;)
Comment 4 Peter Stibrany CLA 2011-07-12 07:52:32 EDT
+1 ... it's not about reusing previous commit messages, but using them as template for new commit message. It's super convenient :)
Comment 5 Benjamin Muskalla CLA 2011-07-12 10:00:32 EDT
Peter, people with an @foglyn.com adress should use the Mylyn Bridge for EGit to get the active task as commit template ;)
Comment 6 Marc-André Laperle CLA 2011-07-18 03:58:36 EDT
*** Bug 352310 has been marked as a duplicate of this bug. ***
Comment 7 Robin Stocker CLA 2013-05-03 12:44:58 EDT
The previous commit messages are available via content assist (Ctrl+Space) in the commit message fields in the commit dialog and Git Staging view. I don't think we will additionally provide a dropdown, content assist is enough.

*** This bug has been marked as a duplicate of bug 342590 ***
Comment 8 Dag Rende CLA 2013-05-05 14:49:56 EDT
This discussion misses another aspect of this function in subclipse, subversive and CVS. It is that if you have written a long commit comment and find that you have to cancel the dialog in order to check something, then the written message is still available when you reenter the dialog. This will save any users a lot of time. Then it doesn't matter so much if the text is accessible by a drop-down or ctrl-space.
Comment 9 Robin Rosenberg CLA 2013-05-05 15:50:15 EDT
(In reply to comment #8)
> This discussion misses another aspect of this function in subclipse,
> subversive and CVS. It is that if you have written a long commit comment and
> find that you have to cancel the dialog in order to check something, then
> the written message is still available when you reenter the dialog. This
> will save any users a lot of time. Then it doesn't matter so much if the
> text is accessible by a drop-down or ctrl-space.

That's another (reasonable) request, please open one.
Comment 10 Robin Stocker CLA 2013-05-06 06:34:24 EDT
(In reply to comment #8)
> This discussion misses another aspect of this function in subclipse,
> subversive and CVS. It is that if you have written a long commit comment and
> find that you have to cancel the dialog in order to check something, then
> the written message is still available when you reenter the dialog. This
> will save any users a lot of time. Then it doesn't matter so much if the
> text is accessible by a drop-down or ctrl-space.

You can use the "Git Staging" view, which is non-modal and remembers the commit message per repository (I always use it instead of the commit dialog):

http://wiki.eclipse.org/EGit/User_Guide#Git_Staging_View

Or, as Robin Rosenberg wrote, please open a new enhancement request.
Comment 11 Dmitry Katsubo CLA 2018-09-13 10:56:06 EDT
I vote for this feature. In my case I need to commit the same fix to several Git repositories (and re-use the same message). At least what I find beneficial is to check the history of previous commits to pickup/refresh the issue number previous commits where made for (currently I need to switch to "History" view).

Also closing as duplicate of bug #342590 is not appropriate for this ticket, as it assumes that the functionality was implemented within the scope of that ticket, but in fact it is not.
Comment 12 Thomas Wolf CLA 2018-09-13 11:05:38 EDT
Use content assist in the commit message text viewer.
Comment 13 Matthias Sohn CLA 2018-09-13 19:18:48 EDT
Open the staging view and click Ctrl-Space in the commit message editor to access recently used commit messages. By default the last 10 commit messages are kept in the history, you can change this in "Preferences > Team > Git > Committing > Maximum number of commit messages in history".
Comment 14 Michael Vorburger CLA 2018-09-14 05:52:54 EDT
Dmitry Katsubo, the Ctrl-Space in Git Staging does work great (I still regularly use this, in the 7 years since I filed this issue, OMG!), so as the original reporter of this issue, the CLOSED DUPLICATE seems "fair" to me.

PS: I've also just noticed that the the Commit Changes UI dialog pop-up which EGit used to have, years ago, seems to have gone away - apparently now Team > Commit... jumps into the Git Staging view (and opens it, if you never used it before) - this is great!

EGit is amazing - thanks a lot to all of its contributors.
Comment 15 Matthias Sohn CLA 2018-09-14 09:56:35 EDT
if someone really still wants the commit dialog this can be enabled by unchecking the option "Preferences > Team > Git > Committing > Use Staging View to commit instead of Commit dialog"
Comment 16 Dmitry Katsubo CLA 2018-09-14 10:28:01 EDT
Ahh, that's the point! Indeed, after I unchecked "Use Staging View to commit instead of Commit dialog" and opened the "Commit Changes" *dialog*, I could use the Ctrl-Space to see all previous commit messages. It works! Great!

However: My question was about "Git Staging" *view*. There Ctrl-Space does not work for me. (Link to how the view looks like is in comment #10). Can anybody confirm that Ctrl-Space works in view?
Comment 17 Thomas Wolf CLA 2018-09-14 10:39:46 EDT
(In reply to Dmitry Katsubo from comment #16)
> However: My question was about "Git Staging" *view*. There Ctrl-Space does
> not work for me. (Link to how the view looks like is in comment #10). Can
> anybody confirm that Ctrl-Space works in view?

Works for me. However, we've had one other report where it didn't work for someone, but then the problem went away: bug 536645.
Comment 18 Matthias Sohn CLA 2018-09-14 10:42:02 EDT
For me this also works in staging view, maybe you have some other plugins installed interfering with their shortcuts or you have manually tweaked shortcuts ?

Open "Preferences > General > Keys" and search for "Content Assist" to see if you have a keybinding for this action
Comment 19 Dmitry Katsubo CLA 2018-09-17 04:57:57 EDT
Thanks for comment. I have "Content Assist" bound to Ctrl-Space in Preferences, so that one looks good. I agree that there is a conflict with some plugin, as Ctrl-Space works OK in vanilla Spring STS 3.9.5 (Eclipse 4.8.0).