shithub: git9

Download patch

ref: 73439317b5d3d56ad53adb7b244c7b6426d37990
parent: 9a457b55a9f0a01c275cb0a85ca96e90b61bf862
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jan 27 20:56:56 EST 2020

improve error messages

--- a/common.rc
+++ b/common.rc
@@ -13,9 +13,9 @@
 
 fn gitup{
 	gitroot=`{git/conf -r >[2]/dev/null}
-	gitrel=`{pwd | sed 's@^'$gitroot'/*@@'}
 	if(~ $#gitroot 0)
 		die 'not a git repository'
+	gitrel=`{pwd | sed 's@^'$gitroot'/*@@'}
 	if(~ $#gitrel 0)
 		gitrel='.'
 	cd $gitroot
--- a/pull
+++ b/pull
@@ -88,7 +88,7 @@
 	die 'remote diverged:' $remote
 # The remote is directly ahead of the local, and we have
 # no local commits that need merging.
-echo $local':' `{git/query $local} '=>' `{git/query $remote}  >[1=2]
+echo $remote':' `{git/query $local} '=>' `{git/query $remote}  >[1=2]
 if(! ~ $#incoming 0)
 	git/log -q $local'..'$remote
 git/branch -c -b $remote $local