shithub: git9

Download patch

ref: 3441ecce23dbada9d1a6b9a497c6ed73f4190fa5
parent: f53d3b524f2d848fad5a34b4883ee9a3602b6f79
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Feb 23 13:09:55 EST 2021

git/clone: set headref correctly when cloning repo

--- a/clone
+++ b/clone
@@ -34,7 +34,9 @@
 	}
 	{git/fetch  $debug $branchflag $remote >[2=3] | awk '
 		BEGIN{
-			headref="refs/remotes/origin/"ENVIRON["branch"]
+			headref=""
+			if(ENVIRON["branch"] != "")
+				headref="refs/remotes/origin/"ENVIRON["branch"]
 			headhash=""
 		}
 		/^symref / && headref == "" {