Added PDC set-head for setting the HEAD ref on a remote branch that you have write access to
This commit is contained in:
parent
2cbe807b34
commit
108f8e96a2
17
contrib/adc/set-head
Executable file
17
contrib/adc/set-head
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $(dirname $0)/adc.common-functions
|
||||
|
||||
[ -z "$GL_RC" ] && die "ENV GL_RC not set"
|
||||
|
||||
[ -z "$2" ] && die "usage: set-head /path/to/repo.git refs/heads/branchname"
|
||||
|
||||
get_rights_and_owner $1; to=$repo
|
||||
[ -z "$perm_write" ] && die "no write permissions on $to"
|
||||
|
||||
# change head
|
||||
cd $GL_REPO_BASE_ABS/$to.git
|
||||
|
||||
git symbolic-ref HEAD $2
|
||||
echo HEAD on $to is `git symbolic-ref HEAD`
|
||||
cd - > /dev/null
|
Loading…
Reference in a new issue