Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM: Support past commit messages navigation #26952

Closed
gotofritz opened this issue May 19, 2017 · 18 comments · Fixed by #107619
Closed

SCM: Support past commit messages navigation #26952

gotofritz opened this issue May 19, 2017 · 18 comments · Fixed by #107619
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities on-release-notes Issue/pull request mentioned in release notes on-testplan scm General SCM compound issues
Milestone

Comments

@gotofritz
Copy link

  • VSCode Version: 1.13.0-insider
  • OS Version: any

This is a feature request.

In the search boxes (both local and multifile) you can use ALT-↑ to navigate through your search history. I suggest the same is implemented for the commit message box in the git sidebar. This should be no cheap git log substitute - you should only see the (last X?) commit messages you have entered yourself on that machine, in the order in which you have entered them. Just a local history of what was entered in that box.

This is somewhat similar to #6190, but different - it has no relation to undoing a commit, it should be there in the commit message box even if there is nothing to commit.

Thanks

@Tyriar Tyriar added the git GIT issues label May 19, 2017
@joaomoreno joaomoreno added this to the Backlog milestone May 24, 2017
@joaomoreno joaomoreno added feature-request Request for new features or functionality scm General SCM compound issues and removed git GIT issues labels May 24, 2017
@joaomoreno joaomoreno removed their assignment Jun 19, 2017
@jnachtigall
Copy link

Even worse, when you (cursor) are in the scm's "Message" input and press ALT-↑ as you are used to it from search input then the text lines in the editor are moved (changed) albeit the text editor is not focussed. To me this makes it an UX bug not just a feature request.

@anatol-grabowski
Copy link

anatol-grabowski commented Feb 11, 2018

I think I can implement it for commit message input using HistoryNavigator as in the search widget (SearchWidget -> RepositoryPanel, SearchViewlet -> SCMViewlet, searchActions -> hardcoded keys in RepositoryPanel). But still have no idea how to fix lines movement in editor.
Not sure how should I go about it though. Just fork and make a pr?

@anatol-grabowski
Copy link

This issue is related to #29445 (request for a way to get the last commit message).

@anatol-grabowski
Copy link

anatol-grabowski commented Feb 11, 2018

Created a branch: https://github.com/grabantot/vscode/tree/26952-commit-message-history
Problems with it:

  1. ALT-↑ gets intercepted by the editor so I used CTRL-↑;
  2. Don't know how to add a new entry to the history on commit by button above the input.
  3. Hotkeys are hardcoded.
    Any suggestions are welcome.

@wildeyes
Copy link

wildeyes commented Mar 7, 2018

Can we also track #45204 here? it was marked as duplicate although it isn't.

@joaomoreno joaomoreno changed the title Navigate through past commit messages, just as search works SCM: Support past commit messages navigation Sep 14, 2018
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Sep 14, 2018
@ssotomayor
Copy link

Any reason why you don't make a PR with that change @grabantot ? I didn't test it but this feature would be quite useful as i usually have to re-type the ticket number when there's JIRA integration :/

@roonie007
Copy link

+1

1 similar comment
@jkatnik
Copy link

jkatnik commented Nov 17, 2018

+1

@klemensz
Copy link

Until this is implemented, the SCM integration of VSCode is not really usable.

@anatol-grabowski
Copy link

sorry. I don't see a way I can do this in foreseeable future. The job and my own projects take too much time. Anyone who is willing to work on the issue is welcome to use my pr in any way that helps

@ghost
Copy link

ghost commented May 22, 2019

+1

@alex473x
Copy link

+1

@alex473x
Copy link

Found this extension which do the trick: Git Last Commit Message (GLCM)

@zbianca
Copy link

zbianca commented Nov 19, 2020

This feature is extremely annoying, specially on projects that require long commit messages (co-authors, etc).
I was searching how to turn it off, when I found the release note and this issue. Good thing is that now I learned I can use cmd + arrows so that I don't go to a previous commit message. But wouldn't it be more intuitive to let the default behavior of the arrow as expected (go up and down on the textarea), and use cmd + arrows to navigate git history?

@djbrown
Copy link

djbrown commented Nov 22, 2020

@zbianca for me the message changes to previous/next only when the caret is on the very start/end. else the arrow keys (up/down) work as usual..
Also ALT + up/down already lets you turn regardless of where the caret is.

@zbianca
Copy link

zbianca commented Nov 22, 2020

@djbrown And when you're in the middle of the first line what does the up-arrow do? On my setup (VSCode on Mac) one press it goes to the beginning of the line and then on the second it goes to the next commit. Now my question to you is: when you navigate a long text, do you count how many times to press the arrows? Or do you hold the keys and have an intuition (internal calculation of speed) of when to stop pressing the key? I can only suposse the use case for longer commit messages was not tested enough (usability).

@madprops
Copy link

Before this I was using the extension mentioned here.
It provides a button above the input that I click to put the last commit message in the input.

2020-11-22_11-09

Maybe instead of the arrows something like this can be used.
Like show a list of recent messages to choose from.
Also I prefer that changing the input places the caret at the end instead of at the start.

@chrisant996
Copy link

The implementation that got released is very disruptive -- now when I use the up arrow to go up to edit the first line of a commit, I almost always overshoot and it starts cycling through commit history.

It should not cycle history on a simple Up arrow with no modifier key, at least not when the commit message edit box is dirty.

This should look and feel like a normal edit box, unless the user does exceptional things. Pressing a simple Up arrow key is not an exceptional gesture, but for example pressing Alt+Up would be exceptional because it's not a key combination normally recognized by edit boxes.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2020
meganrogge referenced this issue in meganrogge/template-string-converter Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities on-release-notes Issue/pull request mentioned in release notes on-testplan scm General SCM compound issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.