Commit graph

60 commits

Author SHA1 Message Date
phanium 65dd36ae62
Fix git-changelog to handle whitespace in command arguments (#1232) 2026-03-05 23:06:10 -08:00
Edwin Kofler 263dcb4a79
fix: Use -iname and expressions instead of -iregex (#1094) 2023-10-24 21:52:59 +08:00
Edwin Kofler e793f8979b
fix: Move improvements via ShellCheck (#1075) 2023-09-22 11:57:48 +08:00
Edwin Kofler 47e940272a
fix: Improve Bash hygiene (#1056)
* fix: Improve Bash hygiene

* Update quoting to account for new bugs

* quotes

* fix: Remove extra shellcheck comment
2023-08-18 16:15:40 +08:00
Edwin Kofler b372bab52a
chore: Improve Bash variously (#1032) 2023-02-21 10:03:56 +08:00
Edwin Kofler d34fa527a0
chore: More Bash improvements and removing deprecations (#1016) 2023-01-10 08:59:43 +08:00
Paul Wise 1a414f5512
Fix typos
Suggested-by: codespell
Suggested-by: spellintian
2019-09-05 12:41:38 +08:00
spacewander a347e49178 git-changelog: should remove ^0 suffix from the commit description. 2018-08-08 13:34:11 +08:00
spacewander 792b697450 git-changelog: add --start-commit option, like --start-tag but for commit 2018-06-16 12:20:08 +08:00
spacewander b7a1a0d8b2 git-changelog: add missing newline to the plain output
Previously, running "git changelog -x --start-tag 4.5.0 -p -l" will see

* Bump version to 4.6.0-dev.  * Version 4.5.0

Because there is no newline in the end of each plain output.
2018-06-15 18:14:18 +08:00
spacewander b89c12e79b show all commit messages if no tag found 2016-11-05 14:33:16 +08:00
spacewander e101d825a2 strip out branches like trap-effort-signals 2016-11-05 12:10:03 +08:00
Brian Goad 7ff05f2977 Need to remove the temp file regardless 2016-10-21 14:05:44 -04:00
spacewander a192fe688a handle GIT_EDITOR which contains space 2016-01-20 18:48:19 +08:00
spacewander afce25cd65 use ps -f and awk to emulate pgrep
There is no pgrep in git for windows
2016-01-20 11:39:25 +08:00
Jan Schulz 5a80928b89 git-changelog: option to only use merges
using `-m` or `--merges-only` will only show the merge
commit messages. It will also use the body of the merge
commit message in addition to the subject, as github merges
usually have a useless subject line for commit messages.

If used with `-n/--no-merges`, the last one specified will win.
2015-10-18 16:11:10 +02:00
NANRI 5e14c08fc5 git-changelog: use cp instead of mv
mv command cannot overwrite in PortableGit(msysgit).
2015-07-29 08:27:30 +02:00
Amir Tocker 7ddd1f7a60 Catch "HEAD -> master" when creating the changelog
git log may report `(HEAD -> master, tag:...)` instead of `(HEAD, tag:...)`.
2015-07-20 09:38:14 +03:00
Mark Eissler 4ff5dc1ee0 Remove unused var. 2015-07-15 08:34:06 -07:00
Mark Eissler 4fd095b741 Handle signals in git-changelog. 2015-07-10 18:11:18 -07:00
Mark Eissler 399bc037fa Fix git tag substring extraction for bash 3.2. 2015-04-25 10:12:17 -07:00
spacewander 2810323aad add support for git version below 2.2.0 2015-04-24 12:00:17 -07:00
Mark Eissler 80d680b0a6 Fix git-changelog for compatibility for bash<4. Fixes #337, #338
Removed dependency on real associative arrays, which are not
support previous to bash 4.
2015-04-24 12:00:17 -07:00
Mark Eissler fbe171e280 Fix tag trapping when HEAD and tag point to same commit.
When the last tag is also the last commit, then we need to account
for a much longer tag output:

  HEAD, tag: v1.0.1, origin/master, origin/HEAD,...

This fix strips out 'HEAD', the rest is handled by existing code.
2015-03-16 13:37:53 -07:00
Mark Eissler 29cd63bea2 Fix gitflow commit history output.
When gitflow is used, commits on merged feature branches were
appearing in the generated output with tags labeled as:

  origin/feature/BRANCH_NAME

This fix filters out any 'tags' that include forward slashes,
which eliminates this behavior. The commits then appear as part
of the tag they were merged in with.
2015-03-16 12:16:10 -07:00
Mark Eissler 49e8cf17a4 Complete rewrite to support commit ranges for pretty and list output. 2015-03-11 11:43:35 -07:00
hemanth.hm 14ef2a88ef Merge pull request #308 from spacewander/git-utility
extra mktemp into git_extra_mktemp.
2015-03-08 23:37:20 +05:30
Damian Krzeminski fabb2c5541 changelog: add git-config support for format and log options
(1) make format configurable

you can change the default changelog format by configuring
changelog.format git variable

for example:

  git config changelog.format '- %s (%ae)'

gives you something like that:

  - Merge pull request #298 from timfeirg/master (hemanth.hm@gmail.com)
  - remove stuff from readme & form a list (kkcocogogo@gmail.com)

see git-log man for more examples

(2) make log options configurable

set `changelog.opts` to influence the way changelogs are generated

    git config changelog.opts --no-merges

or:

    git config changelog.opts --first-parent

fixes #285

also:
- delay calculating HEAD until needed
- remove extra line before header
2015-02-15 22:40:24 -05:00
Damian Krzeminski a86d850688 use standard git editor in git-authors & git-changelog
The editor used will be chosen from the GIT_EDITOR environment variable,
the core.editor configuration variable, the VISUAL environment variable,
or the EDITOR environment variable (in that order).

That ensures that `git-changelog` and `git-authors` will use the same editor
as `git-commit`, `git-merge` etc.
2015-02-13 17:51:22 -05:00
spacewander 32aee50bc6 extra mktemp into git_extra_mktemp
now we can put all utility functions to git-extra-utility
2015-02-05 14:22:49 +08:00
spacewander e1cedf7fd2 add enough X to fix #303.
GNU mktemp requires at least three X in the last part of template.
2015-02-02 21:35:44 +08:00
hemanth.hm e738f760ae Avoid duplicating asterisk.
Closes https://github.com/tj/git-extras/pull/218
2015-01-18 22:10:39 +05:30
Matthew Avant 7701ba4069 Use mktemp for temporary file creation. 2014-12-04 11:01:40 -08:00
hemanth.hm 7b7913fab1 More portable she-bangs. 2014-11-30 17:47:26 +05:30
Sasha Khamkov ba481f35c2 Revert 2 commits to git-changelog
- Revert "FIX: check if un-pushed commits". This reverts commit bd80a4e512.

- Revert "Add check for no changes in the tree (no sub-modules)". This reverts commit f2a41c54b1.

Resolves #234
2014-07-24 20:57:07 +03:00
Sasha Khamkov bd80a4e512 FIX: check if un-pushed commits
- switch the check for un-pushed commits from `diff-index` to more simple check
- still ignores sub-modules

Closes #234

Clarification: 
As pointed by @cristiandouce in #234 - my flow was different (and pretty stupid to be honest on some particular project of mine) so some other work flow scenarios was failing to pass. 

I still feel such check is needed, because it is still populates Changelog|History files with empty lines if no un-pushed commits exist, so @hemanth merge this one or revert the [619232e](619232ef86)
2014-07-11 23:43:12 +03:00
hemanth.hm 619232ef86 Merge pull request #220 from sanusart/master
Add check for no changes in the tree (no sub-modules)
2014-07-09 10:56:25 +05:30
hemanth.hm 0353b63e63 Merge pull request #216 from stephenmathieson/fix/changelog-large-versions
Changelog formatting for large version numbers.
2014-07-08 08:54:40 +05:30
hemanth.hm 039bb5c318 Merge pull request #223 from mwoc/master
Restoring debian changelog compatibility.
2014-07-06 12:34:21 +05:30
Patryk Małek 4145f228e4 Fixed git-changelog errors when multiple files match change|history 2014-06-16 16:32:47 +02:00
Patryk Małek de6463fbee Fixed git-changelog errors on first usage 2014-06-16 16:27:57 +02:00
Maarten Winter 0687de734c Use two-space indents for log entry output, so it again is debian changelog compatible (as before commit 1235e4a5) 2014-04-29 10:51:30 +02:00
Sasha Khamkov f2a41c54b1 Add check for no changes in the tree (no sub-modules) 2014-04-06 00:10:08 +03:00
Stephen Mathieson fde9d1cd30 Fix changelog formatting for large version numbers
This allows for version numbers which require more than 18 characters to
be underlined and pretty. :)
2014-02-24 11:45:42 -05:00
Damian Krzeminski 31bbed4ac8 Add --no-merges option to changelog
--no-merges allows for generating changelog without information about
merge commits
2013-12-01 18:18:03 -05:00
Nathan Rajlich 519f678938 git-changelog: don't output a trailing space after the date
This has been driving me and others crazy for forever.
/cc @guille @MatthewMueller
2013-11-18 16:13:55 -08:00
Phally 4f55198dca Added support for a --tag argument to directly set the tag name in the header. 2013-03-03 16:46:32 +01:00
Phally 1235e4a5ad Added support for multiple arguments in git-changelog. 2013-03-03 16:46:32 +01:00
Alexis GRIMALDI ea7d0dcd92 Use git describe to fetch last tag 2012-07-16 16:52:13 +02:00
Camille Reynders 1914503d2f added switch -l as shortcut for --list to git-changelog 2012-05-03 19:27:58 +02:00