git-log--graph icon indicating copy to clipboard operation
git-log--graph copied to clipboard

Edit commit message with current message as placeholder

Open dimateos opened this issue 1 year ago • 3 comments

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 avatar Nov 29 '24 12:11 dimateos

Just saw https://github.com/phil294/GitLG/issues/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"

dimateos avatar Nov 29 '24 12:11 dimateos

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 avatar Nov 29 '24 21:11 phil294

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

phil294 avatar Nov 29 '24 21:11 phil294

implemented with 0.1.25. param placeholders can be async internally now, so all kinds of arbitrary complex params will be possible to implement in the future

phil294 avatar Jun 29 '25 23:06 phil294