Skip to contentSkip to conversation

cogito: master as the default remote branch

PATCH New Santi Béjar 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cogito: master as the default remote branch

Recover the old behavior of the remote branch name

... specified in $_git/branches/$name and defaulting to master.

---

 cg-pull |    2 +-
 cg-push |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
cg-pull +1 -1
@@ -249,7 +249,7 @@ name=${ARGS[0]}
 [ "$name" ] || die "where to pull from?"
 uri=$(cat "$_git/branches/$name" 2>/dev/null) || die "unknown branch: $name"
 
-rembranch=$_git_head
+rembranch=master
 if echo "$uri" | grep -q '#'; then
 	rembranch=$(echo $uri | cut -d '#' -f 2)
 	uri=$(echo $uri | cut -d '#' -f 1)
cg-push +1 -1
@@ -26,7 +26,7 @@ name=${ARGS[0]}
 [ "$name" ] || die "where to push from?"
 uri=$(cat "$_git/branches/$name" 2>/dev/null) || die "unknown branch: $name"
 
-rembranch=$_git_head
+rembranch=master
 if echo "$uri" | grep -q '#'; then
 	rembranch=$(echo $uri | cut -d '#' -f 2)
 	uri=$(echo $uri | cut -d '#' -f 1)