shithub: git9

Download patch

ref: c0dd3e3ffe2ea62e1908932ae2ce8768b2b10bdf
parent: 040e524a216bb6c0ce150cb3479ee7c1f984a283
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jul 8 17:13:05 EDT 2019

Improve error messages with failing clones.

--- a/clone
+++ b/clone
@@ -55,7 +55,7 @@
 				system("mkdir -p `{basename -d .git/" headref"}");
 				system("cp .git/" remote " .git/" headref)
 				print "ref: " headref > ".git/HEAD"
-			}else{
+			}else if(headhash != ""){
 				print "warning: detached head "headhash > "/fd/2"
 				print headhash > ".git/HEAD"
 			}
@@ -62,7 +62,7 @@
 		}
 	'} |[3] tr '\x0d' '\x0a'
 	if(! ~ $status '|')
-		exit 'clone:' $status
+		exit 'clone:'^$status
 
 	tree=/mnt/git/branch/heads/master/tree
 	echo checking out repository...
@@ -92,7 +92,7 @@
 	echo done.
 }
 if not{
-	echo clone failed: $st >[2=1]
+	echo clone failed. >[2=1]
 	echo cleaning up $local >[2=1]
 	rm -rf $local
 }