-
Notifications
You must be signed in to change notification settings - Fork 13
Message output samples
Sample output for what the tool will produce when it is finished and working.
See my Project board https://github.com/users/MichaelCurrin/projects/4
Note that semantic commit messages are easy to add with a command-line choice but practical or IDE. They can be inferred in some cases. Included here for full context but not needed for the first pass. The bigger win is without the prefix for now.
feat: Create foo.txt
docs: Create README.md
Is this even needed? It's obvious when there are no more commits.
Initial commit
Create empty file(s) FILE[,..FILE,...]
All in same directory
ACTION FILENAME
Create foo.txt
Update foo.txt
# Same dir
Rename foo.txt to bar.txt
Removed foo.txt
Leave out nature of changes e.g. style for now
Use git status/staged description - added, modified, moved, rename, deleted. Keep those on first pass.
In case of move:
Move foo/bar.txt to fizz/buzz/bar.txt
Don't check if also renaming.
Combinations are limited. You could do unlike combinations like delete and create same filename when you meant to modify or move. These can be covered later by treating all actions as the same rather than rules for each. Be guided by git st
Common cases
Update and rename foo.txt
Update and move fizz/buzz.txt to buzz.txt
Advanced form of update
Look at what changed
Add X lines to FILENAME
# OR
Remove X lines in FILENAME
# OR
Update X lines in FILENAME # for add and remove
Change permissions on FILENAME # executable
Change permissions and update FILENAME
See One file spec.
Update foo.txt and bar.txt
Delete foo.txt and bar.txt
3 or more up to maybe 5
Update foo.txt, bar.txt and baz.txt
Repeats
If the filenames are repeated, then add parent directory for as many levels as needed (maybe excluding common base). This could get long but is description and works for 2 files.
Update /foo.txt and /docs/foo.txt
TBD on path - this can come later full path is too long, but it can be used as dir if common. The top level folder could be used. Or the folder of each file could be used.
Update foo.txt and fizz/bar.txt
Update fizz/foo.txt and fizz/bar.txt
Update foo.txt and bar.txt in fizz
Mixed modified - mix add, remove lines and modified together
Update foo.txt, bar.txt, fizz/foo.txt
Collapse update and permission
Create foo.txt and update bar.txt and buzz.txt
This can be long - leave out combining for now
Note in DIR is add-on and not needed for first pass. but adds more meaning
Single common action.
ACTION X files
Create 5 files
Create 5 files in DIR
Create 5 files in DIR and DIR
Rename 10 files
Rename 10 files in DIR
Modified files or mixed updates (create/remove/rename)
Update X files in DIR # highest common path as long as possible e.g. /foo/bar
Update X files in DIR and Y files in DIR
Mixing multiple actions on one or multiple lines is hard - is it the same files in Create X files and rename Y files
? What is overlap in X and Y?
Don't need to go to check if lines were only added to each file -- too much to check