Skip to content

Conversation

@Gems
Copy link

@Gems Gems commented Apr 15, 2022

Motivation

Make it possible to sign commits with a changed date.

Usage example: git redate -c 1 -S

It would require /usr/local/opt/bin/gpg script and the following git config setting:

[user]
  signingkey = {YOUR_KEY_HERE}
[gpg]
  program = /usr/local/opt/bin/gpg
[commit]
  gpgsign = true

Change Log

  • git rebase uses commit --amend --date={date} --no-edit -n command to change commit metadata
  • the unknown arguments provided to redate are provided to commit --ammend command
  • the --limit argument has been ditched because it seems it does not make sense without filter-branch
  • hash-bang instruction is changed to /usr/bin/env bash to be as generic as possible
  • editor choice dialog does not require hitting enter for making choice — a single key input is expected
  • added support for --user parameter to filter the date changing commits only made by the current git user (email is used for identification)

Gems added 2 commits April 15, 2022 16:31
…er-branch warning that affects script performance
…atures

- `git rebase` uses `commit --amend --date={date} --no-edit -n` command to change commit metadata
- the unknown arguments provided to redate are provided to `commit --ammend` command
- the --limit argument has been ditched because it seems it does not make sense without filter-branch
- hash-bang instruction is changed to `/usr/bin/env bash` to be as generic as possible
- editor choice dialog does not require hitting enter for making choice - a single key input is expected
- added support for --user parameter to filter the date changing commits only made by the current git user (email is used for identification)
- debug option shows all the output of the `git rebase` command
@Gems Gems changed the title Improve script performance by disabling the warning from git filter-branch Make redate using git rebase for date changes with a couple more features Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant