-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi~
Is it possible to include filenames of all staged files in the commit message?
What I've tried
- read related issue: Feature request: preview of file list #8 (reply)
- tried the following config
{
"vscodeGitCommit.variables": {
"prefix": "keke",
"files.add": "files",
"files.edit": "files.staged.modified",
"files.del": "files.staged.deleted",
},
"vscodeGitCommit.template": [
"{prefix}: {message}",
"- [ADDED] {files.add}",
"- [EDITED] {files.edit}",
"- [RMVED] {files.del}"
],
}
with files:
.env.prod
: added and stagedmanual.service.ts
,create-asset-profile-dialog.componenr.ts
: modified and stage- another one modified but NOT staged
Expected behaviour
- with some new macros (
"files.add": "<some.new.macro>"
), after entering{message}
and pressing ENTER, filenames concatnated with ", " are auto generated for variablefiles.add, files.edit, files.del
- final output may be like:
<icon> feature: a sample output
- [ADDED] .env.prod
- [EDITED] manual.service.ts, create-asset-profile-dialog.componenr.ts
- [RMVED]
Why it fails
-
"files.edit": "files.staged.modified"
does NOT show filenames on the "drop-down". The number of elements is INCORRECT(should be 2,manual.service.ts, create-asset-profile-dialog.componenr.ts
, instead of 3).
-
BTW
"files.add": "files"
(deliberately not as "files.staged.added" to test) do show filenames. The number is correct (as 4).
-
when multiple files are edited (and staged), only ONE file can be selected in
{files.staged.modified}
to fill{files.edit}
. -
it is not possible to determine the number of added/edited/deleted files beforehand. neither is changing the template everytime
Thanks!
Metadata
Metadata
Assignees
Labels
No labels