git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: using stgit/guilt for public branches

From
Yann Dirson <ydirson@altern.org>
Date
May 3, 2007, 20:58 UTC
Message-ID
<20070503205836.GA19253@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<200704252337.05851.robin.rosenberg.lists@dewire.com>
On Wed, Apr 25, 2007 at 11:37:05PM +0200, Robin Rosenberg wrote:
Show 19 quoted lines
> onsdag 25 april 2007 skrev Josef Sipek:
> > On Wed, Apr 25, 2007 at 03:20:49PM +0300, Michael S. Tsirkin wrote:
> [...]
> > > I am concerned that publishing a git branch managed by stg/guilt
> > > would present problems: it seems that every time patches are re-ordered,
> > > a patch is re-written or removed, or we update from upstream,
> > > everyone who pulls the tree branch will have a hard-to-resolve conflict.
> > > 
> > > Is that really a problem? If so, would it be possible to work around this
> > > somehow?
> > 
> > I thought about this problem a while back when I was trying to decide how to
> > manage the Unionfs git repository. I came to the conclusion, that there was
> > no clean way of doing this (at least not using guilt - I can't really speak
> > for stgit, as I don't know how it does things exactly).
> 
> StGit has the same problem. Publishing such a branch is only for viewing if
> you want to publish the tip, like the pu branch in the Git repo. You shouldn't
> merge from pu either.

You are right, in that what can be done with such branches is limited. BUT you can safely "stg branch --create" off any remote stgit stack. Then you can "stg rebase origin/master" to port your stack to the new tip of the remote stack.

The next stgit release will allow you to declare the pull-policy for your stack as "rebase", so when you "stg pull" it will indeed rebase to the new tip of the parent branch.

As for publishing, I use the following config entries to publish my own stack of patches to stgit. You can see at http://repo.or.cz/w/stgit/ydirson.git that gitweb shows pretty clearly the structure of the stack (even though things could surely be made better).

I use "git push -f" to publish - maybe the "+" refspec syntax would work with push, I'll try it next time :)

[remote "orcz"]
        url = git+ssh://ydirson@repo.or.cz/srv/git/stgit/ydirson.git
        push = refs/heads/master:refs/heads/master
	push = refs/patches/master/*:refs/patches/master/*

Maybe we should provide some degree of automation in stgit itself (eg. "stg branch --publish" or something).

Hope this helps,
-- 
Yann.
Previous: Robin RosenbergNext: Robin Rosenberg
Message 6 of 12 in “using stgit/guilt for public branches”
  1. Michael S. TsirkinApr 25, 2007
  2. Josef SipekApr 25, 2007
  3. Michael S. TsirkinApr 25, 2007
  4. Josef SipekApr 25, 2007
  5. Robin RosenbergApr 25, 2007
  6. Yann DirsonMay 3, 2007
  7. Robin RosenbergMay 3, 2007
  8. Robin RosenbergMay 3, 2007
  9. Yann DirsonMay 4, 2007
  10. Michael S. TsirkinMay 4, 2007
  11. Yann DirsonMay 4, 2007
  12. Yann DirsonMay 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.