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

Edit commit message with current message as placeholder #126

Open
dimateos opened this issue Nov 29, 2024 · 3 comments
Open

Edit commit message with current message as placeholder #126

dimateos opened this issue Nov 29, 2024 · 3 comments

Comments

@dimateos
Copy link
Contributor

Would be nice to get the message your are going to edit as placeholder instead of a general one:
image

For example when I undo a commit with the vscode "Git: Undo Last Commit" I get the commit message used:
image

For comparison the edit branch name does provide the previous name as placeholder:
image

Regards

@dimateos
Copy link
Contributor Author

Just saw #87, which I did not in my initial basic search about "commit message" or whatever.

Feel free to close this one, although has images for reference.


About complexity (and unforeseen required necessities) VS utility tradeoff, totally understandable.
I might end up using the UNDO command and editing it there anyway out of habit.

I saw https://github.com/phil294/GitLG/blob/master/web/src/state/default-git-actions.json with id string such as "{COMMIT_HASHES}" so I wonder if something like "{COMMIT_MESSAGE}" could be cached and used in the action titled "title": "Edit message"

@phil294
Copy link
Owner

phil294 commented Nov 29, 2024

Yup, and it's good to have an issue for this now. {COMMIT_MESSAGE} would be the way to go, but the thing is the full message is not available, it's only fetched on demand for the commit detail view. So we'll need some logic that detects the COMMIT_MESSAGE and when it's there, will query for it, before the git action can be executed (but already modified). And then it'll still have to be loaded for the commit details view because the two logic pieces don't have anything in common, really. so maybe some sort of commit message cache.. yeah that's why I haven't done it so far.

@phil294
Copy link
Owner

phil294 commented Nov 29, 2024

and then there's also the need to make the input field a multi-line textarea instead if some default value contains a newline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants