-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit.hb: stop requiring a ChangeLog.txt entry for commits
Editing ChangeLog.txt means to manually maintain a modification history in timestamp order. This isn't practical with the Git model, and blocks handling patches, including PRs. It served well in a the linear development model of CVS and SVN, but no longer with Git. Git also handles the commiter, author, and commit/authoring timestamps automatically, making our existing manual method obsolete. Manually keeping a duplicate copy of the commit message also makes working on PRs much complicated, as we need to keep these in sync while making changes. Existing method also made the one-liner commit messages 100% meaningless, repeating the author/timestamp, which is visible there on most UIs already. Git allows to list the changelog with this command, dynamically: `$ git log --pretty=medium --no-merges --date=iso --stat HEAD~50..HEAD` I'm suggesting a new way of keeping history, which solves all these issues and makes working with the codebase simpler and aligns Harbour with most other projects over the internet: In the top line, put a one-liner description of the changes, prefixed with the module where the change happened, e.g.: hbmk2: add support for Windows ARM64 This replaces the existing manual author/timestamp header. Then an empty line, followed by the description of the changes, and/or here we can use the existing format: * filename1.ext: ! fix foo bar * filename2.ext: + add foo baz Full commit message: ``` hbmk2: add support for Windows ARM64 * filename1.ext: ! fix foo bar * filename2.ext: + add foo baz ``` Because the filenames are also redundant and shown by Git, I suggest replacing the actual filenames with module names or other, less-specific, but descriptive, short and recognizable pointer: Further streamlined commit message: ``` hbmk2: add support for Windows ARM64 - fix foo bar - add foo baz Ref: <commit> #<pr> Fixes #<issue> Closes #<pr> ``` This also drop the `!`, `+`, `%`, `*`, `;` list marker in favour of `-`. The text describes the nature of the change in more universal way anyway. I suggest wrapping the message body at 72 characters. Using Markdown markup is fine. Adding pointers to commit hashes and/or GitHub issues/ PRs helps to put a commit in context. When moving around patches made in the old way, I recommend stripping the hunk dealing with `ChangeLog.txt` to ease the process. Manually of e.g. with this command: `$ filterdiff -p1 --exclude=ChangeLog.txt`
- Loading branch information
Showing
2 changed files
with
24 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters