9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] git/push with refs not in refs/heads
@ 2021-07-17  1:13 Anthony Martin
  2021-07-17  2:11 ` Kurt H Maier
  2021-07-17  3:08 ` ori
  0 siblings, 2 replies; 5+ messages in thread
From: Anthony Martin @ 2021-07-17  1:13 UTC (permalink / raw)
  To: 9front

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] git/push with refs not in refs/heads
  2021-07-17  1:13 [9front] git/push with refs not in refs/heads Anthony Martin
@ 2021-07-17  2:11 ` Kurt H Maier
  2021-07-17 11:20   ` Anthony Martin
  2021-07-17  3:08 ` ori
  1 sibling, 1 reply; 5+ messages in thread
From: Kurt H Maier @ 2021-07-17  2:11 UTC (permalink / raw)
  To: 9front

On Fri, Jul 16, 2021 at 06:13:11PM -0700, Anthony Martin wrote:
> 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

jesus christ

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] git/push with refs not in refs/heads
  2021-07-17  1:13 [9front] git/push with refs not in refs/heads Anthony Martin
  2021-07-17  2:11 ` Kurt H Maier
@ 2021-07-17  3:08 ` ori
  1 sibling, 0 replies; 5+ messages in thread
From: ori @ 2021-07-17  3:08 UTC (permalink / raw)
  To: 9front

Quoth Anthony Martin <ality@pbrane.org>:
> 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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] git/push with refs not in refs/heads
  2021-07-17  2:11 ` Kurt H Maier
@ 2021-07-17 11:20   ` Anthony Martin
  2021-07-17 21:11     ` Kurt H Maier
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Martin @ 2021-07-17 11:20 UTC (permalink / raw)
  To: 9front

Kurt H Maier <khm@sciops.net> once said:
> jesus christ

This git will lie,
With Yankee pigs,
Yet balk on sight,
Of git(1) bids?

Taking the piss with a quatrain,
  Anthony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] git/push with refs not in refs/heads
  2021-07-17 11:20   ` Anthony Martin
@ 2021-07-17 21:11     ` Kurt H Maier
  0 siblings, 0 replies; 5+ messages in thread
From: Kurt H Maier @ 2021-07-17 21:11 UTC (permalink / raw)
  To: 9front

On Sat, Jul 17, 2021 at 04:20:27AM -0700, Anthony Martin wrote:
> Kurt H Maier <khm@sciops.net> once said:
> > jesus christ
> 
> This git will lie,
> With Yankee pigs,
> Yet balk on sight,
> Of git(1) bids?
> 
> Taking the piss with a quatrain,
>   Anthony

It's not you, it's git.  A version control system worth a shit would
never allow such travesties to be; it's extremely dystopian that the
world has selected such a nightmare factory to achieve ubiquity.

khm

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-17 21:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17  1:13 [9front] git/push with refs not in refs/heads Anthony Martin
2021-07-17  2:11 ` Kurt H Maier
2021-07-17 11:20   ` Anthony Martin
2021-07-17 21:11     ` Kurt H Maier
2021-07-17  3:08 ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).