threads / rfc / 1559

Re: [RFC] Patches exchange is bad?

Subject: Re: [RFC] Patches exchange is bad?

## tl;dr

4 messages between Aug 17, 2005 and Aug 18, 2005.

replies: 3people: 3as markdown or json

Marco Costalba· Aug 17, 2005, 17:35 UTC · lore
Catalin Marinas wrote:
Show 13 quoted lines
>
>Once you want a subset of these patches merged into MAIN, just pop
>everything from the stack and only push those you want merged, in the
>order you want (if there are some dependencies, the push will fail and
>you can correct them or the order). When you are happy with the
>patches pushed on the stack, just do a 'git pull <HEAD>' in the MAIN
>repository. After this, doing a 'stg pull <MAIN>' in the HEAD one will
>mark the patches already integrated into MAIN as empty and you can
>safely remove them ('stg clean' does this automatically).
>
>This way I found StGIT useful for maintainers as well, not only for
>contributors.
>
Sorry if the answer is silly, but I still don't know well StGIT .

What you describe it's an asymmetrical or one way scenario, new code goes always from HEAD to MAIN. But how is the workflow if:

1) There is more then one contributor feeding MAIN and you need to update 
the StGIT patch stack from MAIN.
2) You made something terribly wrong with HEAD (I don't know what can be 
'terribly wrong') and you need to recreate a clean base from MAIN.

In this cases, if I understand correctly, you need to clone a new StGIT archive from MAIN and push the interesting stuff from old/broken HEAD.

Or you can always merge back pulling from MAIN as in case of two pure git archives?

Thanks Marco

		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
Catalin Marinas· Aug 17, 2005, 21:27 UTC · re: Marco Costalba · lore
On Wed, 2005-08-17 at 10:35 -0700, Marco Costalba wrote:
> Sorry if the answer is silly, but I still don't know well StGIT .

It's probably because there is no document really explaining the concepts. The Quilt documentation would be a good starting point since StGIT uses the same ideas but implemented on top if GIT instead of a series of GNU diff files.

> What you describe it's an asymmetrical or one way scenario, new code 
> goes always from HEAD to MAIN. But how is the workflow if:

It is asymmetrical since HEAD uses StGIT and MAIN uses plain GIT but it is a two way data flow: 'git pull HEAD' in MAIN and 'stg pull MAIN' in HEAD.

> 1) There is more then one contributor feeding MAIN and you need to update 
> the StGIT patch stack from MAIN.

The base of the StGIT stack in the HEAD repository (branch) should always be the head of the MAIN repository. You update it via the 'stg pull' command, which takes care of updating the patches so that they are seen as individual commits on top of the base.

That's how you would normally do development on Linux using StGIT - clone the mainline kernel, create patches in your StGIT tree and submit them either via e-mail or ask the gatekeeper to pull directly from your tree (assuming that you only push those patches that need to be merged). Doing a 'stg pull' would retrieve the latest changes from the mainline kernel (including the changes made by your patches which were merged upstream).

Show 5 quoted lines
> 2) You made something terribly wrong with HEAD (I don't know what can be 
> 'terribly wrong') and you need to recreate a clean base from MAIN.
> 
> In this cases, if I understand correctly, you need to clone a new StGIT archive from 
> MAIN and push the interesting stuff from old/broken HEAD.

This is not clear for me. What do you mean by 'terribly wrong'? Broken HEAD because of a bug in StGIT or GIT? Quite unlikely but in this case the repository would be corrupt. I would recommend periodically doing a 'stg export' to keep the series of patches in GNU diff files.

If you refer to a patch which breaks the code, you can simply pop it from the stack and even delete it with 'stg delete'. Popping it removes the changes it makes to HEAD and the corresponding commit won't be seen with 'git log'. You don't need to clone a new repository since StGIT allows you to choose which of your patches (commits) are included in HEAD (via 'stg push' and visible with 'stg applied').

> Or you can always merge back pulling from MAIN as in case of two pure git archives?

The base of the StGIT stack is identical to MAIN. Doing a 'stg pop -a' makes the HEAD and MAIN identical.

Please let me know if this needs further clarification.
-- 
Catalin
Catalin Marinas· Aug 18, 2005, 10:27 UTC · re: Johannes Schindelin · lore
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> maybe it is time for a quick run through the typical jobs you do with 
> StGIT, much like what Jeff sent the other day?

I hope I will find some time this weekend and write some tutorials on an StGIT wiki.

-- 
Catalin

← back to recent threads