ref: e362152c60172f7530715f034af59ffe61187516
parent: 0b6837301afe104a582f67cd701b90fb7ccf84aa
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Jul 5 16:38:55 EDT 2019
Improve experience with new repositories. No force pushes needed, master branch is tagged for interop.
--- a/diff
+++ b/diff
@@ -15,7 +15,7 @@
while(~ $1 -*){
switch($1){
- case -b; branch=$2; shift
+ case -b; branch=`{git/query $2}; shift
case *; usage
}
shift
--- a/init
+++ b/init
@@ -39,3 +39,8 @@
echo '[remote "origin"]' >> $dir/$sub/config
echo ' url='$upstream >> $dir/$sub/config
}
+echo '[branch "master"]' >> $dir/$sub/config
+echo ' remote = origin' >> $dir/$sub/config
+echo ' merge = refs/heads/master' >> $dir/$sub/config
+mkdir -p $dir/$sub/refs/heads
+mkdir -p $dir/$sub/refs/remotes
--- a/send.c
+++ b/send.c
@@ -318,7 +318,7 @@
u = &upd[i];
a = readobject(u->theirs);
b = readobject(u->ours);
- if((!force || hasheq(&u->theirs, &Zhash)) && (a == nil || ancestor(a, b) != a)){
+ if(!force && !hasheq(&u->theirs, &Zhash) && (a == nil || ancestor(a, b) != a)){
fprint(2, "remote has diverged\n");
werrstr("force needed");
updating=0;