shithub: git9

Download patch

ref: c9a4dbe9fea3b6328a27628f89d2fc4ca4d1970a
parent: 398a2a43e2042e5e0cfb94ae86c2c7bf441b01e7
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Nov 15 12:50:18 EST 2020

git/pull: allow arbitrary upstreams with -u

This used to work, but probably got broken when moving
to aux/getflags. Bring it back.

--- a/pull
+++ b/pull
@@ -41,8 +41,11 @@
 	branch=''
 
 if(~ $#upstream 0)
-	upstream=origin
-remote=`{git/conf 'remote "'$upstream'".url'}
+	remote=`{git/conf 'remote "origin".url'}
+if not
+	remote=`{git/conf 'remote "'$upstream'".url'}
+if(~ $#remote 0)
+	remote=$upstream
 if(~ $#remote 0)
 	die 'no remote to pull from'