1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-11-29 13:32:20 +03:00
A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️
Go to file
Amin Yahyaabadi 8430c5c539
perf(changelog): cache commit retain checks (258 times faster generation) (#772)
* perf: cache commit retain checks + 87 times faster generation

This caches the commit retain checks whenever include/exclude paths are specified.

This speeds up changelog generation by `87` times in a big repository I have:
```
Now: 0.237 s
Before:  20.633 s
```

* perf: use separate retain_commit cache for each repository

* fix: use cacache for parallel git-local cache - 258 times faster

Sled fails to open the cache if multiple git-cliff processes run on the same repository. This fixes the issue by using cacache which stores the cache locally under .git/git-cliff

* fix: cache changed files of a commit directly

This slows down the retain_commit check by ~2 times, but allows reusing the cache in case the include/exclude patterns change.
This is beneficial for running in monorepos where git-cliff runs multiple times to generate changelog for different subsets of the repo

* fix: consider include/exclude patterns together

* fix: handle first commit for changed_files

* fix: normalize glob patterns to ignore ./

* docs: add docs for retain_commit_check and cache algorithms

* fix: add ** if a pattern represents a directory

* test: add tests for should retain commit checks

* fix: correctly get the files list for the first commit

* test: add test email/name for git commits

* fix: use / for path joining in entries to match the git behaviour

* fix: revert change of include/exclude patterns to slices

The slices are normalized, so an owned pattern is needed to avoid type mismatch between new normalized/unchanged patterns

* refactor: polish implementation

* refactor: apply clippy suggestion

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-08-06 23:04:17 +03:00
.github feat(bump): support bumping to a specific semver type (#744) 2024-07-31 08:48:03 +03:00
config docs(config): fix typo in comment of default config file (#776) 2024-07-30 18:49:59 +03:00
examples chore(config): fix comment for changelog header template 2024-08-01 19:58:54 +03:00
git-cliff perf(changelog): cache commit retain checks (258 times faster generation) (#772) 2024-08-06 23:04:17 +03:00
git-cliff-core perf(changelog): cache commit retain checks (258 times faster generation) (#772) 2024-08-06 23:04:17 +03:00
npm chore(npm): update yarn.lock 2024-07-27 22:00:33 +03:00
pypi chore(pypi): update maturin version (#539) 2024-03-07 10:38:38 +01:00
website feat(bump): support bumping to a specific semver type (#744) 2024-07-31 08:48:03 +03:00
.cliffignore feat(changelog): improve skipping via .cliffignore and --skip-commit (#413) 2023-12-31 15:34:01 +01:00
.dockerignore docs(website): add git-cliff animation to the website (#404) 2023-12-22 22:25:38 +01:00
.editorconfig chore(editorconfig): fix editorconfig syntax 2023-04-26 16:47:48 +03:00
.gitignore feat(profiler): support performance profiling via pprof (#768) 2024-07-29 11:25:23 +03:00
.lycheeignore chore(links): ignore patreon links 2024-05-23 11:52:38 +03:00
Cargo.lock perf(changelog): cache commit retain checks (258 times faster generation) (#772) 2024-08-06 23:04:17 +03:00
Cargo.toml feat(profiler): support performance profiling via pprof (#768) 2024-07-29 11:25:23 +03:00
CHANGELOG.md chore(release): prepare for v2.4.0 2024-06-26 12:55:35 +03:00
cliff.toml chore(config): fix comment for changelog header template 2024-08-01 19:58:54 +03:00
CNAME Create CNAME 2022-12-26 17:24:46 +01:00
CODE_OF_CONDUCT.md chore(project): rename 2021-05-30 01:45:03 +03:00
codecov.yml fix(project): use the correct branch for codecov (#65) 2022-03-13 13:17:59 +03:00
CONTRIBUTING.md feat(changelog): allow adding custom context (#613) 2024-04-21 22:02:41 +03:00
Dockerfile feat(bitbucket): add Bitbucket support (#663) 2024-06-02 20:49:37 +03:00
LICENSE-APACHE docs(license): re-license under the MIT + Apache 2.0 license (#303) 2023-09-30 15:48:24 +02:00
LICENSE-MIT chore(project): update copyright years 2024-01-06 16:29:52 +03:00
README.md docs(readme): add git-changelog to similar projects section (#774) 2024-07-28 13:59:18 +03:00
RELEASE.md docs(release): add note about GitHub variables 2024-02-19 15:40:00 +03:00
release.sh chore(release): prepare for v2.2.1 2024-04-11 01:22:47 +03:00
rust-toolchain.toml chore(ci): return to nightly builds (#73) 2022-03-29 14:44:45 +03:00
rustfmt.toml chore(fmt): remove normalize_comments from rustfmt.toml 2021-06-04 03:11:15 +03:00
SECURITY.md docs(security): update security policy 2024-02-19 13:59:18 +03:00
typos.toml feat(ci): add 'typos' check (#317) 2023-10-19 15:34:17 +02:00




Documentation | Website

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

animation

Documentation

Learn how to use git-cliff from the documentation.

In The Media

Editor Support

  • git-cliff.el - Generate, update and release changelog in Emacs

Similar/Related Projects

  • git-journal - The Git Commit Message and Changelog Generation Framework
  • clog-cli - Generate beautiful changelogs from your Git commit history
  • relnotes - A tool to automatically generate release notes for your project.
  • cocogitto - A set of CLI tools for the conventional commit and semver specifications.
  • cliff-jumper - A NodeJS CLI tool that combines git-cliff and conventional-recommended-bump to semantically bump a NodeJS package and generate a git-cliff powered changelog.
  • release-plz - Release Rust packages from CI.
  • git-changelog-command-line - Generate changelog and determine next version with conventional commits.
  • git-changelog: Automatic Changelog generator using Jinja2 templates.

Contributors

Thanks goes to these wonderful people

Made with contrib.rocks.

Socials


License

Licensed under either of Apache License Version 2.0 or The MIT License at your option.

Copyright © 2021-2024, git-cliff contributors