Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:58:23

0001 #!/bin/bash
0002 
0003 if [[ $# -ne 1 ]] ; then
0004     echo 'usage: tools/create-patch-branch <branchname>'
0005     echo
0006     echo 'examples: tools/create-patch-branch fancypatch'
0007     echo '          tools/create-patch-branch "my fancy patch"'
0008     exit 1
0009 fi
0010 
0011 echo "Switching to patch"
0012 git checkout master
0013 
0014 echo "Updating master"
0015 git pull --all --prune --progress
0016 
0017 echo "Rebasing master"
0018 #git rebase upstream/master master
0019 git reset --hard upstream/master
0020 
0021 if [ $? != 0 ]; then
0022     echo "Can't rebase to master. Unstaged changes?"
0023     exit 1
0024 fi
0025 
0026 echo "Creating patch branch"
0027 git checkout -b patch-${1//[^a-zA-Z0-9]/_} master
0028 
0029 echo "Done"