From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25459 invoked from network); 17 Jul 2021 03:13:30 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 17 Jul 2021 03:13:30 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 1ess; Fri Jul 16 23:08:39 -0400 2021 Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id c43f7bfc (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Fri, 16 Jul 2021 20:08:22 -0700 (PDT) Message-ID: <9B6128858FC970E911395421287D640F@eigenstate.org> To: 9front@9front.org Date: Fri, 16 Jul 2021 23:08:20 -0400 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: open flexible hardware CSS solution Subject: Re: [9front] git/push with refs not in refs/heads Reply-To: 9front@9front.org Precedence: bulk Quoth Anthony Martin : > Is there interest in allowing git/push to send an > arbitrary ref to a remote repository? Right now > the ref has to be a branch in refs/heads. > > My usual way of working with git on Unix is to have > a canonical origin that I fetch from and a single > local branch that I commit to and rebase onto the > origin before pushing. > > Sometimes I want to push the current origin branch > to a mirror without involving any of my local refs, > something like: > > git push mirror origin/master:master > > where the local refs are > > refs/heads/master > refs/remotes/mirror/master > refs/remotes/origin/HEAD > refs/remotes/origin/master > > the remote refs on mirror are > > HEAD > refs/heads/master > > and my own master has diverged from origin/master. > > Please advise. > > Thanks, > Anthony > That's definitely not supported, but adding it should be easy. Git/push -b passes the branch unmolested to git/send, but git/send assumes that the ref is under refs/heads. I think we would adopt the ':' separated branches in git/send; the main change would be in send.c:/^readours, where the branch would have to be split on ':', the lhs resolved, and the rhs converted to the refs/heads/$remote format.