mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-25 06:09:50 +00:00
Add cherrypull
This commit is contained in:
parent
40802addf9
commit
a3f8ddf6cc
@ -211,3 +211,4 @@ Select your character: RBin Wizard, Master Anal Paladin or Assembly Wizard
|
||||
I accidently radared my filesystem today.
|
||||
No fix no sleep
|
||||
You see it, you fix it!
|
||||
V is for Visual
|
||||
|
23
sys/cherrypull.sh
Executable file
23
sys/cherrypull.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
RR=$1
|
||||
RB=$2
|
||||
N=$3
|
||||
|
||||
if [ -z "$N" ]; then
|
||||
echo "Usage: sys/cherrypull.sh [url] [branch] [ncommits]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git branch -D branch
|
||||
git co -b branch
|
||||
git reset --hard @~100
|
||||
git pull $RR $RB
|
||||
C=`git log | grep ^commit | head -n $N | cut -d ' ' -f2`
|
||||
git co master
|
||||
for a in $C ; do
|
||||
RC="$a $RC"
|
||||
done
|
||||
for a in $C ; do
|
||||
git cherry-pick $a
|
||||
done
|
||||
git branch -D branch
|
Loading…
Reference in New Issue
Block a user