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

Re: What's in git.git

From
Andreas Ericsson <ae@op5.se>
Date
Feb 9, 2006, 11:35 UTC
Message-ID
<43EB290A.6060407@op5.se>
In-Reply-To
<7vr76cby2v.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 30 quoted lines
> 
> The problem is exactly why you need the plus sign when you fetch,
> i.e. "+pu:pu".  My "pu" rebases.
> 
> Suppose I had this:
> 
>              o--o--o
>             /      "pu"
> 	o--o
>            "master"     
> 
> You do fetch +pu:pu, branch my-pu, and build on top of it:
> 
>                      o--o--o--o--o--o--o
>                     /                  "my-pu"
>              o--o--o
>             /      "pu"
> 	o--o
>            "master"
> 
> I add some to my "master" and rebuild "pu", maybe while adding
> another commit on "pu".  You fetch +pu:pu again:
> 
>                      o--o--o--o--o--o--o
>                     /                  "my-pu"
>              o--o--o        o--o--o--o
>             /              /         "pu" 
> 	o--o--o--o--o--o--o
>                           "master"
> 

But wouldn't rebase detect the commits as being the same, unless you've made changes to them? If it doesn't, can we teach it to discard parent info and re-hash the commits if they conflict? That should solve most such merge-conflicts, really.

Show 37 quoted lines
> Now, what happens when you merge "pu" into "my-pu"?  The three
> commits I had on my previous "pu" are not part of the history of
> the updated "pu" anymore, but is considered to be part of your
> development trail.  If these had an addition of a file, and if
> your development on top of the previous "pu" modified it, the
> merge would result in:
> 
>  * originally the file did not exist.
>  * "pu" adds it one way.
>  * "my-pu" adds it in another way.
> 
> This requires a hand merge.  What should be done is for me to
> instead of rebasing "pu", merge the updated master to "pu".
> 
>                      o--o--o--o--o--o--o
>                     /                  "my-pu"
>              o--o--o--------*--o
>             /              /   "pu" 
> 	o--o--o--o--o--o--o
>                           "master"
> 
> Then merge between "my-pu" and "pu" become easier.  You do not
> have to worry about the earlier three commits, because the point
> you forked from the previous "pu" becomes the merge base.
> 
> The reason I have not done it that way so far is primarily I am
> lazy and also I do not like to see too many merges in the log.
> Also "pu" tends to have really wacky stuff, so separating out
> only usable bits, excluding wacky ones is slightly easier if I
> rebuild it from scratch.
> 
> The new "next" aka "not too close to bleeding or broken edge"
> branch will be managed like the last picture above, in order to
> make working with it easier to manage.  This is only usable if I
> do not include too bleeding-edge topic branch in it.
> 
> 
Good thinking. You're a marvel at explaining things.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 16 in “What's in git.git”
  1. Junio C HamanoFeb 9, 2006
  2. seanFeb 9, 2006
  3. Andreas EricssonFeb 9, 2006
  4. seanFeb 9, 2006
  5. Junio C HamanoFeb 9, 2006
  6. Andreas EricssonFeb 9, 2006
  7. Junio C HamanoFeb 9, 2006
  8. Andreas EricssonFeb 9, 2006
  9. Junio C HamanoFeb 10, 2006
  10. Johannes SchindelinFeb 9, 2006
  11. Junio C HamanoFeb 9, 2006
  12. Johannes SchindelinFeb 9, 2006
  13. Tony LuckFeb 9, 2006
  14. Ryan AndersonFeb 9, 2006
  15. Junio C HamanoFeb 9, 2006
  16. Junio C HamanoFeb 10, 2006

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.