Skip to content

Commit

Permalink
Add scripts/fix-dco.sh (#1303)
Browse files Browse the repository at this point in the history
Use it as parameter to git-filter-branch
Read the docs git help filter-branch before using it.
Example:
  git filter-branch --msg-filter $PWD/scripts/fix-dco.sh -f -- HEAD~69..HEAD

Signed-off-by: kuvaldini <ivan@kuvaldini.pro>
  • Loading branch information
kuvaldini committed Aug 26, 2021
1 parent ee9873a commit 479e3ac
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/fix-dco.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

## Use it as parameter to git-filter-branch
## Read the docs git help filter-branch before using it.
## Example:
## git filter-branch --msg-filter $PWD/scripts/fix-dco.sh -f -- HEAD~69..HEAD

cat >msg
cat msg
sigo="Signed-off-by: $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>";
if grep -q "^$sigo" msg >&2 ;then
echo >&2 "already signed";
else
echo;
echo "$sigo";
fi;

0 comments on commit 479e3ac

Please sign in to comment.