From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: "David Jeske" <jeske@willowmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: is rebase the same as merging every commit?
Date: Fri, 27 Jun 2008 09:34:15 +0200 [thread overview]
Message-ID: <vpqd4m349hk.fsf@bauges.imag.fr> (raw)
In-Reply-To: <willow-jeske-01l7GhRWFEDjChtB> (David Jeske's message of "Fri\, 27 Jun 2008 06\:24\:23 -0000")
"David Jeske" <jeske@willowmail.com> writes:
> However, when considering an SCM perspective, I don't understand why I have to
> make a tradeoff between personal reproducibility (which I get from the original
> changes), and upstream readability (which the community gets from my rebase).
Well, look at the [PATCH] messages on this list, and how they evolve.
Patch series give a clean way to go from a point to another. That's
what you want to see in upstream history.
Then, patch series usually get reviewed, and the patches themselves
are modified. There's a kind of meta-history: the changes you make to
your own changes.
Suppose I send a patch containing
+ int * x = malloc(sizeof(char));
and someone notices how wrong it is. I send another patch with
+ int * x = malloc(sizeof(int));
The first version was basicaly a mistake, and if it hasn't been
released, no one want to bother with it longer that the time to resend
the patch. No one want to be hit by the bug while using bisect later
on the upstream repository. And no one wants to see both patches when
reviewing or "git blame"-ing.
Things you rebase in Git are just like things for which you don't make
intermediate commits in SVN.
>>From all I've read about rebase, bisect, and the big tree management, it seems
> like the three steps are Reorder, combine, rebase. (In a more complicated
> situation, i'd want to split a commit into pieces)
>
> (1'')
> 0' - feature A
> 1' - bugfix a
> 2' - bugfix a2
> (2'')
> 3' - feature b
> 4' - bugfix b
> (3'')
> 5' - feature c (split)
> (4'')
> 6' - feature d (split)
>
> Frankly, I'm super impressed, because I can imagine how I might do
> this in git.
git rebase -i will help you to do that painlessly.
> I want to mess around and try this stuff out, but I'm scared of doing bad
> things to the tree and them being unrecoverable
They won't. The reflog is still there. Try it, an cancel it if you
don't like.
The huge difference between the reflog and the history is that the
reflog is local, it's your own mess, other people won't get disturbed
by how messy it can be.
> (other than the fact that the current dag
> link propagation model would force others to get these changes if
> they remained connected together. Something easily remidied by out
> of band metadata, or different link types)
No. One fundamental principle of Git is that objects are immutable. If
your objects have a link, of whatever kind, then the same object moved
in another repository have the same link.
But what's wrong with the reflog?
--
Matthieu
next prev parent reply other threads:[~2008-06-27 7:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-26 23:04 is rebase the same as merging every commit? David Jeske
2008-06-27 0:51 ` Junio C Hamano
2008-06-27 1:08 ` Junio C Hamano
2008-06-27 6:24 ` David Jeske
2008-06-27 6:24 ` David Jeske
2008-06-27 7:34 ` Matthieu Moy [this message]
2008-06-27 15:39 ` David Jeske
2008-06-27 15:39 ` David Jeske
2008-06-27 6:31 ` Pascal Obry
2008-06-27 10:33 ` しらいしななこ
2008-06-27 21:51 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2008-06-26 23:04 David Jeske
2008-06-27 6:30 ` Matthieu Moy
2008-06-27 6:46 ` David Jeske
2008-06-27 6:46 ` David Jeske
2008-06-27 8:34 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqd4m349hk.fsf@bauges.imag.fr \
--to=matthieu.moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeske@willowmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.