diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2020-01-13 16:14:32 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@arm.com> | 2020-01-13 16:14:32 +0000 |
commit | b8f59c4b30ac1761e6f4b63666ca7f5d68649ed5 (patch) | |
tree | ad27d14c2478ebe64aedf250d554c8bcf6cfd6d2 | |
parent | e19db6a2f7aa20b708ffa112767efbd378c94416 (diff) | |
download | gcc-b8f59c4b30ac1761e6f4b63666ca7f5d68649ed5.zip gcc-b8f59c4b30ac1761e6f4b63666ca7f5d68649ed5.tar.gz gcc-b8f59c4b30ac1761e6f4b63666ca7f5d68649ed5.tar.bz2 |
contrib: script to setup git to pull a vendors branches
This simple script is intended to setup a new git configuration to
pull the branches and tags for a specific vendor. This should
simplify some of the steps needed for working with a vendor's
branches.
* git-fetch-vendor.sh: New file.
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/git-fetch-vendor.sh | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index dd0c4c4..0a52584 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2010-01-13 Richard Earnshaw <rearnsha@arm.com> + + * contrib/git-fetch-vendor.sh: New file. + 2020-01-13 Jakub Jelinek <jakub@redhat.com> * contrib/gcc-git-customization.sh: Add git gcc-descr and gcc-undescr diff --git a/contrib/git-fetch-vendor.sh b/contrib/git-fetch-vendor.sh new file mode 100755 index 0000000..5e1b1f0 --- /dev/null +++ b/contrib/git-fetch-vendor.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ $# != 1 ] +then + echo "Usage: $0 <vendor>" + exit 1 +fi + +vendor=$1 +upstream=`git config --get "gcc-config.upstream"` +if [ x"$upstream" = x ] +then + echo "Config gcc-config.upstream not set, run contrib/gcc-git-customization" + exit 1 +fi + +echo "setting up git to fetch vendor ${vendor} to remotes/${upstream}/${vendor}" + +git config --replace-all "remote.${upstream}.fetch" "+refs/vendors/${vendor}/heads/*:refs/remotes/${upstream}/${vendor}/*" ":refs/remotes/${upstream}/${vendor}/" +git config --replace-all "remote.${upstream}.fetch" "+refs/vendors/${vendor}/tags/*:refs/tags/${vendor}/*" ":refs/tags/${vendor}/" +git config --replace-all "remote.${upstream}.push" "+refs/heads/${vendor}/*:refs/vendors/${vendor}/heads/*" "^\+refs/heads/${vendor}/" +git fetch |