ref: ad896193eace2d45c93cf7b82fef8e250b6ed647
parent: 423e875b89b475d2009e465dd061c8b2bc2302a0
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Oct 12 02:13:17 EDT 2019
Oops, unfinished changes. Back out.
--- a/pull
+++ b/pull
@@ -16,18 +16,9 @@
function writeref(ref, hash)
{
outfile = ".git/"ref
- # we have local commits: nothing to do
- if(system("~ `{git/query ''HEAD "hash" @''} `{git/query "hash"}") == 0)
- exit("");
- # we have local commits *and* remote commits: request a merge
- if(system("~ `{git/query ''HEAD "hash" @''} `{git/query HEAD}") != 0){
- printf("git/merge %s\n", hash) > "/fd/2";
- exit("merge");
- }
- # we only have remote commits: update head
- system("mkdir -p `{basename -d "outfile"}");
- print hash > outfile;
- close(outfile);
+ system("mkdir -p `{basename -d "outfile"}")
+ print hash > outfile
+ close(outfile)
}
/^remote/{