-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Support for using .git/SQUASH_MSG in Git commit message box #101078
Comments
@joaomoreno I wouldn't mind taking this on, and I've looked through the code so I have a pretty good idea of what's required to implement this. Just one question, though — is there any situation where |
@daniel-j-davis my suggestion would be to follow what git-gui does since it's bundled with git. Looks like it preferences MERGE_MSG over SQUASH_MSG (see here) |
That makes sense, and that's what I was thinking too. I'll put a PR in shortly! |
…-message Adding .git/SQUASH_MSG detection to commit message auto-fill #101078
I got this to partially work by:
Reopening this for discussion. I also might be doing something wrong.
|
It worked fine (and always displayed the intended (?) squash msg), but maybe it's because I was only squashing another branch that only had one commit? I concur that it seems like the contents of SQUASH_MSG aren't always consistent though, now that I've tried with a branch with more than one commit. EDIT: It seems like it displays all of the squashed commits in one message, prefaced by
As for the bonus bug, is that issue exclusive to SQUASH_MSG or does it also happen if you change the contents of MERGE_MSG? @isidorn |
@isidorn You're not supposed to manually create or edit the Thanks for the input box issue though, will try to repro. |
This was the intended behaviour behind this feature request. I'm not expecting VS Code to do anything magical here with SQUASH_MSG. It should just be taking the entire contents of the file as other graphical git tools do (and as a command line call to I do not think the PR needs reverting. |
Added another commit, since the @isidorn Please verify once again, now the feature is clearer. |
Sorry for the confusion, just was not very clear to me. |
Adding verified label since the git commit gets nicely preopulated with the squash message. |
Currently the VS Code Git commit message box automatically synchronises with the contents of .git/MERGE_MSG (provided you have not entered your own commit message yet into VS Code).
I would like to request support for VS Code to do the same with .git/SQUASH_MSG (produced when running
git merge <branch> --squash
). This would provide better integration between VS code git related VS Code extensions which often have the ability to perform a squash merge via the extension GUI but do not typically replicate any of the existing VS Code git interface (commit message box and changed file list).The text was updated successfully, but these errors were encountered: