git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Patches exchange is bad?
@ 2005-08-16 20:01 Marco Costalba
  2005-08-16 20:39 ` Johannes Schindelin
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Marco Costalba @ 2005-08-16 20:01 UTC (permalink / raw)
  To: git

Hi,

I would like to ask the list about something I'am thinking about,
and I'am not sure it's a good idea.

Suppose a possible scenario involves using a couple of git archives, one 
for releases and stable code, say MAIN, and one for experimental stuff  
or new development, say HEAD.

Suppose there is stuff in HEAD you don't want merged in MAIN, more,
you need to update MAIN with only a subset of patches in HEAD, peraphs 
in different order. Or simply, you are not interested to see the history 
of the HEAD tree when looking MAIN. All this points could keep you 
from merging.

I have mocked up a very simple and very stupid 'drag and drop' function.
Basically you drag some selected revs in another instance of qgit, open on 
a different archive.

What happpens in the background is that git-format-patch-script is feeded 
with the selected revs and a bunch of temporary patch files are created, 
then git-applymbox (re)creates the corresponding commits in the destination 
archive.

It is just a very thin layer above the two git scripts, the only extra work 
is the cleaning up of some info that git-format-patch-script automatically adds, 
so that the new commits look like the originals (i.e. same header and description).

I've built-up this thing mainly because I found it useful for me, but I have  
some concerns that this is the correct way to go, the way git it's meant to be used.

If there is some interest for this I can push something on SF, after a due polishing, 
but if it is deeply broken I prefer discard and eventually switch to a more consistent
workflow.

What do you think?

	Marco


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-16 21:47 Marco Costalba
  0 siblings, 0 replies; 19+ messages in thread
From: Marco Costalba @ 2005-08-16 21:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano wrote:

>
>I would like to know a bit about "git format-patch" adding extra
>info that you needed to get rid of.  It shouldn't be necessary.
>

As example, in the rev d5a63b99835017d2638e55a7e34a35a3c1e80f1f from git
the original subject is:

'   Alternate object pool mechanism updates.'

while, after the round-trip git-format-patch + git applymbox I have

'   [PATCH] Alternate object pool mechanism updates.'

The extra '[PATCH]' in the subject was introduced by git-format-patch --mbox.


Perpahs I have made something wrong.


Marco



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-16 22:09 Marco Costalba
  2005-08-16 22:45 ` Daniel Barkalow
  0 siblings, 1 reply; 19+ messages in thread
From: Marco Costalba @ 2005-08-16 22:09 UTC (permalink / raw)
  To: martin.langhoff; +Cc: git

Martin Langhoff wrote:

>>From what I understand, you'll want the StGIT infrastructure. If you
>use git/cogito, there is an underlying  assumption that you'll want
>all the patches merged across, and a simple cg-update will bring in
>all the pending stuff.
>

My concerns are both metodologicals and practical:

1) Method: To use the 'free patching workflow' on git is something foreseen in
git design, something coherent with the fork + develop + merge cycle that it
seems, at least to me, THE way git is meant to be used. Or it is stretching 
the possibility of the tool to something technically allowed but not suggested.

2) Practical: The round trip git-format-patch + git-applymbox is the logical and
natural way to reach this goal or, also in this case, I intend to stretch some tools, 
designed for one thing, for something else?


About StGIT, I agree it is the right tool, designed for this kind of problems. But,
peraphs because I don't know it very much, I still can't figure out how to integrate 
StGit in a git GUI, like qgit is, so to have an unified and friendly view of a git 
archive and a patches stack.


Marco



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-17  8:27 Marco Costalba
  2005-08-17  9:07 ` Martin Langhoff
  0 siblings, 1 reply; 19+ messages in thread
From: Marco Costalba @ 2005-08-17  8:27 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: martin.langhoff, git

Daniel Barkalow wrote:

>>2) Practical: The round trip git-format-patch + git-applymbox is the logical and
>>natural way to reach this goal or, also in this case, I intend to stretch some tools,
>>designed for one thing, for something else?
>
>
>I'd guess that git-diff-tree + git-apply (without the rest of the
>scripting) would be more effective when you're not doing anything with the
>intermediate files, since it saves doing a bunch of formatting and
>parsing.
>
>
It would be surely better, but I need to import also the original subject and
description. I can use git-diff-tree --pretty -p for the patch creation, but this
format is not compatible with git-apply* scripts, and the git command git-apply does
not import subject + description info.

Of course I can feed proper subject and description to git-commit but I would like 
to find something less intrusive as possible, ie. one command for patch export, one 
command for patch import.

Thanks
Marco


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-17 17:35 Marco Costalba
  2005-08-17 21:27 ` Catalin Marinas
  0 siblings, 1 reply; 19+ messages in thread
From: Marco Costalba @ 2005-08-17 17:35 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Catalin Marinas wrote:

>
>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 
 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-17 18:03 Marco Costalba
  0 siblings, 0 replies; 19+ messages in thread
From: Marco Costalba @ 2005-08-17 18:03 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Marco Costalba wrote:

>>
>>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 .
>

'question' not 'answer' !!!!

I don't now if the question is silly, but the typo it is for sure!


Sorry
Marco


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-18 10:00 Marco Costalba
  2005-08-18 11:16 ` Catalin Marinas
  0 siblings, 1 reply; 19+ messages in thread
From: Marco Costalba @ 2005-08-18 10:00 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Catalin Marinas wrote:

>
>The base of the StGIT stack in the HEAD repository (branch) should
>always be the head of the MAIN repository. 

That's the point I missed, now it's more clear.

>
>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).
>

If I uderstand correctly you never commit patches from StGIT stack directly
in your base git repository, in this example git HEAD, but you always round 
trip to MAIN. 

Then you don't have two git repository: HEAD and MAIN

Infact there is only one git repository, MAIN, cloned on your box and called HEAD and 
with a StGIT stack added on top.

>
>Please let me know if this needs further clarification.
>

I think so. 
Please, reading my notes above tell me if I thinking right ;-)

Marco


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [RFC] Patches exchange is bad?
@ 2005-08-18 13:34 Marco Costalba
  2005-08-18 13:41 ` Catalin Marinas
  0 siblings, 1 reply; 19+ messages in thread
From: Marco Costalba @ 2005-08-18 13:34 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

Catalin Marinas wrote:

>>
>>If I uderstand correctly you never commit patches from StGIT stack directly
>>in your base git repository, in this example git HEAD, but you always round 
>>trip to MAIN.
>
When I say 'you always round trip to MAIN', I mean you send patches 
upstream and someone commits to MAIN, then you pull from MAIN.

Sorry if it was not clear.

>
>One usually doesn't maintain MAIN. That's an example for the Linux
>kernel development where you can't control what get merged into MAIN.
>
>There is a bit of confusion here since you said in a previous e-mail
>that more people can commit to the stable branch. In this case, you
>would need a separate repository for stable with a maintainer pulling
>changes from others.
>

When I said 'more people can commit to the stable branch' I meant more 
people sends patches to a mantainer that commits the patches in a stable branch.

Sorry, peraphs also this was not clearly expressed.


>>Then you don't have two git repository: HEAD and MAIN
>>
>>Infact there is only one git repository, MAIN, cloned on your box
>>and called HEAD and with a StGIT stack added on top.
>
>
>The StGIT usage idea is that you only know what patches you have on
>top of a main repository. Since you expect your patches to be merged
>upstream or just updated every time the main repository changes, it
>might not make sense to commit the patches onto the base.
>

Yes, you better explained what I was badly trying to say before.


>
>I need a bit more clarification about your work flow.
>

I was thinking at two different kind of workflow, one were you are tracking a 
remote repository ( Linux kernel project like ) and one as single developer with 
both stable and develop lines ( qgit or StGIT ;-) projects like ). 

You clarified me for both cases.

Thanks
Marco


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

end of thread, other threads:[~2005-08-18 13:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-16 20:01 [RFC] Patches exchange is bad? Marco Costalba
2005-08-16 20:39 ` Johannes Schindelin
2005-08-16 21:02 ` Junio C Hamano
2005-08-16 21:31 ` Martin Langhoff
2005-08-17 17:12 ` Catalin Marinas
  -- strict thread matches above, loose matches on Subject: below --
2005-08-16 21:47 Marco Costalba
2005-08-16 22:09 Marco Costalba
2005-08-16 22:45 ` Daniel Barkalow
2005-08-17  8:27 Marco Costalba
2005-08-17  9:07 ` Martin Langhoff
2005-08-17 17:35 Marco Costalba
2005-08-17 21:27 ` Catalin Marinas
2005-08-17 21:37   ` Johannes Schindelin
2005-08-18 10:27     ` Catalin Marinas
2005-08-17 18:03 Marco Costalba
2005-08-18 10:00 Marco Costalba
2005-08-18 11:16 ` Catalin Marinas
2005-08-18 13:34 Marco Costalba
2005-08-18 13:41 ` Catalin Marinas

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).