* How to manage heads on a remote repository?
@ 2007-10-14 10:46 Theodore Ts'o
2007-10-14 10:55 ` Michael Witten
2007-10-14 11:03 ` David Symonds
0 siblings, 2 replies; 6+ messages in thread
From: Theodore Ts'o @ 2007-10-14 10:46 UTC (permalink / raw)
To: git
I'm currently exploring the idea of not only making the equivalent of
"pu" and "next" available on a public repository for one of my projects,
but also the topics/* branches. When thinking about how I might do
this, one snag I ran into is that the topics/foo and topics/bar branches
are ephemeral, and so when I replicate them to a remote repository,
either on kernel.org or repo.or.cz, I would need a way of removing a
head for a topic branch that had already been merged.
Creating new topics/foo branch or updating is easy; just do a git push,
and they will get created on the remote side. I don't see an easy way
of deleting a ref on a remote branch, so any automation at the moment
looks like it would require me writing my own script and using something
like this:
ssh remote-host git --git-dir=xxx branch -D topics/foo
... which of course wouldn't work repo.or.cz since it requires shell
access.
Am I missing anything?
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to manage heads on a remote repository?
2007-10-14 10:46 How to manage heads on a remote repository? Theodore Ts'o
@ 2007-10-14 10:55 ` Michael Witten
2007-10-14 11:03 ` David Symonds
1 sibling, 0 replies; 6+ messages in thread
From: Michael Witten @ 2007-10-14 10:55 UTC (permalink / raw)
To: git; +Cc: Theodore Ts'o
On 14 Oct 2007, at 6:46:25 AM, Theodore Ts'o wrote:
> so any automation at the moment
> looks like it would require me writing my own script and using
> something
> like this:
>
> ssh remote-host git --git-dir=xxx branch -D topics/foo
>
> ... which of course wouldn't work repo.or.cz since it requires shell
> access.
>
> Am I missing anything?
With my little exposure to git, I'd say it's not currently possible
with the git ui, but please wait for someone more authoritative to
say so.
In any case, I've run across similar problems, and I think this is
a good time to point out the feature that would be nice:
All (most) git ui operations should be (relatively)
transparent across networks;
I would like to clone to a remote server, for instance.
Michael Witten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to manage heads on a remote repository?
2007-10-14 10:46 How to manage heads on a remote repository? Theodore Ts'o
2007-10-14 10:55 ` Michael Witten
@ 2007-10-14 11:03 ` David Symonds
2007-10-14 11:07 ` Theodore Tso
1 sibling, 1 reply; 6+ messages in thread
From: David Symonds @ 2007-10-14 11:03 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: git
On 14/10/2007, Theodore Ts'o <tytso@mit.edu> wrote:
>
> I'm currently exploring the idea of not only making the equivalent of
> "pu" and "next" available on a public repository for one of my projects,
> but also the topics/* branches. When thinking about how I might do
> this, one snag I ran into is that the topics/foo and topics/bar branches
> are ephemeral, and so when I replicate them to a remote repository,
> either on kernel.org or repo.or.cz, I would need a way of removing a
> head for a topic branch that had already been merged.
git push <remote> :<branch_name>
If the left side of the colon in a push refspec is empty, it deletes
the remote ref given by the right hand side.
Dave.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to manage heads on a remote repository?
2007-10-14 11:03 ` David Symonds
@ 2007-10-14 11:07 ` Theodore Tso
2007-10-14 11:12 ` David Symonds
0 siblings, 1 reply; 6+ messages in thread
From: Theodore Tso @ 2007-10-14 11:07 UTC (permalink / raw)
To: David Symonds; +Cc: git
On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:
> On 14/10/2007, Theodore Ts'o <tytso@mit.edu> wrote:
> >
> > I'm currently exploring the idea of not only making the equivalent of
> > "pu" and "next" available on a public repository for one of my projects,
> > but also the topics/* branches. When thinking about how I might do
> > this, one snag I ran into is that the topics/foo and topics/bar branches
> > are ephemeral, and so when I replicate them to a remote repository,
> > either on kernel.org or repo.or.cz, I would need a way of removing a
> > head for a topic branch that had already been merged.
>
> git push <remote> :<branch_name>
>
> If the left side of the colon in a push refspec is empty, it deletes
> the remote ref given by the right hand side.
Cool, thanks! It's not in the git-push man page. I'll play with it
some and then submit a patch update the man page.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to manage heads on a remote repository?
2007-10-14 11:07 ` Theodore Tso
@ 2007-10-14 11:12 ` David Symonds
2007-10-14 11:32 ` Theodore Tso
0 siblings, 1 reply; 6+ messages in thread
From: David Symonds @ 2007-10-14 11:12 UTC (permalink / raw)
To: Theodore Tso; +Cc: git
On 14/10/2007, Theodore Tso <tytso@mit.edu> wrote:
> On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:
> > git push <remote> :<branch_name>
> >
> > If the left side of the colon in a push refspec is empty, it deletes
> > the remote ref given by the right hand side.
>
> Cool, thanks! It's not in the git-push man page. I'll play with it
> some and then submit a patch update the man page.
Yes, it is, including in the examples section. Under the <refspec>
options description it says:
Pushing an empty <src> allows you to delete the <dst> ref from
the remote repository.
In the examples section, it says:
git push origin :experimental
Find a ref that matches experimental in the origin repository
(e.g. refs/heads/experimental), and delete it.
Dave.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to manage heads on a remote repository?
2007-10-14 11:12 ` David Symonds
@ 2007-10-14 11:32 ` Theodore Tso
0 siblings, 0 replies; 6+ messages in thread
From: Theodore Tso @ 2007-10-14 11:32 UTC (permalink / raw)
To: David Symonds; +Cc: git
On Sun, Oct 14, 2007 at 09:12:43PM +1000, David Symonds wrote:
> On 14/10/2007, Theodore Tso <tytso@mit.edu> wrote:
> > On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:
> > > git push <remote> :<branch_name>
> > >
> > > If the left side of the colon in a push refspec is empty, it deletes
> > > the remote ref given by the right hand side.
> >
> > Cool, thanks! It's not in the git-push man page. I'll play with it
> > some and then submit a patch update the man page.
>
> Yes, it is, including in the examples section.
Wow, I completely missed that! It would be nice if:
<refspec>
The canonical format of a <refspec> parameter is +?<src>:<dst>; that
is, an optional plus +, followed by the source ref, followed by a
colon :, followed by the destination ref.
.... mentioned that the source ref could be optional (just like it
explicitly says the '+' is optional)...
The <src> side can be an arbitrary "SHA1 expression" that can be
used as an argument to git-cat-file -t. E.g. master~4 (push four
parents before the current master head).
.... and I think the throwaway sentence at the end of the refspec
would be better at the end of the second paragraph above. I'll send a
patch.
Thanks for pointing that out!
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-14 11:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 10:46 How to manage heads on a remote repository? Theodore Ts'o
2007-10-14 10:55 ` Michael Witten
2007-10-14 11:03 ` David Symonds
2007-10-14 11:07 ` Theodore Tso
2007-10-14 11:12 ` David Symonds
2007-10-14 11:32 ` Theodore Tso
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).