File: rebase.sh

package info (click to toggle)
roc-toolkit 0.4.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,684 kB
  • sloc: cpp: 102,987; ansic: 8,959; python: 6,125; sh: 942; makefile: 16; javascript: 9
file content (13 lines) | stat: -rwxr-xr-x 450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

set -euxo pipefail

# "rebase.sh <branch>" is same as "git rebase <branch>", but it preserves
# original committer name, email, and date
# used to do periodic rebase of "develop" branch on "master"

exec='%s%nexec GIT_COMMITTER_DATE="%cD" GIT_COMMITTER_NAME="%cn" GIT_COMMITTER_EMAIL="%ce"'

GIT_EDITOR=: GIT_SEQUENCE_EDITOR=: \
    git -c rebase.instructionFormat="${exec} git commit --amend --no-edit" \
        rebase -i "$@"