mirror of
https://github.com/Lencerf/p9cpu.git
synced 2024-11-24 12:17:10 +00:00
Add a script for backporting commits
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
This commit is contained in:
parent
a9e7c8e045
commit
33c68c809c
1 changed files with 20 additions and 0 deletions
20
backport.sh
Executable file
20
backport.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
mkdir -p p9cpu
|
||||
for file in $(ls -A); do
|
||||
if [ $file != "p9cpu" ] && [ $file != ".git" ] && [ $file != "backport.sh" ]; then
|
||||
mv $file p9cpu/
|
||||
fi
|
||||
done
|
||||
git add p9cpu
|
||||
git commit -m "tmp commit 1"
|
||||
git am $1
|
||||
HASH=$(git rev-parse HEAD)
|
||||
for file in $(ls -A p9cpu); do
|
||||
mv p9cpu/$file .
|
||||
done
|
||||
rm -r p9cpu
|
||||
git reset --soft HEAD~2
|
||||
git add .
|
||||
git commit -m "$(git log -1 --format=%B $HASH)"
|
Loading…
Reference in a new issue