From: Junio C Hamano <gitster@pobox.com>
To: greened@obbligato.org (David A. Greene)
Cc: Jeff King <peff@peff.net>,
git@vger.kernel.org, Avery Pennarun <apenwarr@gmail.com>
Subject: Re: git-subtree Ready #2
Date: Mon, 20 Feb 2012 22:34:22 -0800 [thread overview]
Message-ID: <7vwr7gitjl.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <87ehtowxu7.fsf@smith.obbligato.org> (David A. Greene's message of "Mon, 20 Feb 2012 23:37:52 -0600")
greened@obbligato.org (David A. Greene) writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Jeff King <peff@peff.net> writes:
>>
>> It sounds like the simplest and cleanest would be to treat it as if its
>> current version came as a patch submission, cook it just like any other
>> topic in 'pu' down to 'next' down to eventually 'master', with the usual
>> review cycle of pointing out what is wrong and needs fixing followed by a
>> series of re-rolls.
>
> Ok, but we will preserve the history via the subtree merge, yes?
I'll comment on just this part, but a short answer is "no, I do not think
so".
Even though you left "Jeff King writes", you removed everything he said
that I was quoting, and in order to understand why the answer is 'no', it
would have been better if you kept this part from what he said in your
reply:
>> ... Either way, I do think it's
>> worth saving the commit history by doing a real merge.
as that was what I was agreeing to with my "as if ... a patch submission".
>> After looking at the history of subtree branch there, however, I agree
>> that it would not help anybody to have its history in my tree with log
>> messages like these (excerpt from shortlog output):
>>
>> update todo
>> Some todo items reported by pmccurdy
>> todo
>> Docs: when pushing to github, the repo path needs to end in .git
>> todo
>> todo^
>> todo
>> todo: idea for a 'git subtree grafts' command
>
> Ok, these are Avery's commits. I don't know that I have enough context
> to improve the logs but I will look throught revisions and try to figure
> things out. Avery, could you be of any help here? It sounds like we
> need more descriptive log messages.
That was not what I was suggesting.
I was saying that the history up to the current state, littered with these
commits that are not "logical progression" but merely "a snapshot of
then-current state" may not be worth preserving, with or without better
messages.
Rewriting the entire history to make it a logical progression just for the
sake of history is obviously not worth the effort.
Which suggests that taking the end result that exists at the tip of your
subtree branch as a single code-drop, without pulling its history, lets us
start from a reasonably well tested state and would not lose us anything
of value. And that was what I was suggesting. For our history to explain
why/how the code got there better, another approach might be to instead
treat your bd7b2cf (Add 'contrib/subtree/' from commit '2793ee6ba...',
2012-01-29), which is where you took Avery's then-current state, as the
code-drop event that adds everything in contrib/subtree/ with a single
patch submission. I.e. in a git.git repository:
git checkout -b subtree master
git fetch git://sources.obbligato.org/git/git.git subtree
git merge --squash bd7b2cf
git commit -m "contrib: add git-subtree from Avery's tree"
to take the tip of your subtree branch. The history up to that point is
in Avery's repository where he stopped, which such an approach will not
pull in to git.git. And then we can replay bd7b2cf..FETCH_HEAD like so:
git checkout FETCH_HEAD
git rebase --onto subtree bd7b2cf
git push . HEAD:subtree
git checkout pu
git merge subtree
to preserve the history since that single code-drop event that records
your effort to adjust the code-dump into a better shape to live in our
contrib/ area. That will make it clear the division of blame on the code
added to git.git between Avery (everything before the squashed merge) and
you (everything after that).
next prev parent reply other threads:[~2012-02-21 6:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 17:35 git-subtree Ready #2 David A. Greene
2012-02-11 18:03 ` Junio C Hamano
2012-02-11 19:22 ` David A. Greene
2012-02-15 4:30 ` David A. Greene
2012-02-15 5:08 ` Jeff King
2012-02-15 5:31 ` David A. Greene
2012-02-16 4:07 ` David A. Greene
2012-02-20 19:34 ` David A. Greene
2012-02-20 20:53 ` Jeff King
2012-02-20 23:14 ` Junio C Hamano
2012-02-21 5:37 ` David A. Greene
2012-02-21 6:34 ` Junio C Hamano [this message]
2012-02-21 7:10 ` Junio C Hamano
2012-02-21 8:44 ` Junio C Hamano
2012-02-21 9:07 ` Thomas Rast
2012-02-24 1:19 ` Avery Pennarun
2012-02-24 20:56 ` Junio C Hamano
2012-02-24 23:57 ` Avery Pennarun
2012-02-25 5:00 ` David A. Greene
2012-02-25 9:00 ` Junio C Hamano
2012-02-25 15:00 ` David A. Greene
2012-02-27 21:06 ` Junio C Hamano
2012-02-27 21:21 ` Jeff King
2012-02-27 21:23 ` Jeff King
2012-02-28 2:04 ` Jakub Narebski
2012-02-28 22:42 ` Avery Pennarun
2012-03-02 3:42 ` David A. Greene
2012-02-21 5:31 ` David A. Greene
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=7vwr7gitjl.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=greened@obbligato.org \
--cc=peff@peff.net \
/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 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).