git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: esr@thyrsus.com
Cc: git@vger.kernel.org
Subject: Re: Requirements for integrating a new git subcommand
Date: Sun, 25 Nov 2012 18:57:08 -0800	[thread overview]
Message-ID: <7vmwy5xe9n.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20121122053012.GA17265@thyrsus.com

"Eric S. Raymond" <esr@thyrsus.com> writes:

> While the weave operation can build a commit graph with any structure
> desired, an important restriction of the inverse (unraveling)
> operation is that it operates on *master branches only*. The unravel
> operation discards non-master-branch content, emitting a warning 
> to standard error when it has to do so.

Imagine that I have a simple four-commit diamond:

    I---A
     \   \
      B---M

where Amy and Bob forked the initial commit made by Ian and created
one commit each, and their branches were merged into one 'master'
branch by a merge commit made by Mac.  How many state snapshots will
I see when I ask you to unravel this?  Three, or four?

If you are going to give me all four states, then I do not
understand why this needs to be limited to the master branch only.
Even if you start from a single commit at the tip of 'master', once
you hit a merge, you will need to follow all of two (or more) paths
to dig down to the root(s), so supporting to start digging from more
than one commit is not all that different.

If you are going to give me only three states, following the first
parent ancestry chain, then the description needs to state it more
clearly.  I am not saying first-parent-only history is useless, but
the user needs to know that merges are flattened in the unraveled
result and the resulting history becomes linear, following the first
parent ancestry chain of the original history (if that is what the
tool does) before deciding if this tool matches what she needs.

As to the procedural stuff, I think others have sufficiently
answered already.  If I may add something, a new stuff typically
start its life in contrib/ before it proves to be useful.

  parent reply	other threads:[~2012-11-26  2:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  5:30 Requirements for integrating a new git subcommand Eric S. Raymond
2012-11-22 19:17 ` Shawn Pearce
2012-11-22 22:11   ` Eric S. Raymond
2012-11-23  9:13     ` Michael J Gruber
2012-11-23 15:53       ` Eric S. Raymond
2012-11-23 20:21     ` Christian Couder
2012-11-23 16:29   ` Eric S. Raymond
2012-11-23  9:27 ` Peter Krefting
2012-11-23 15:35   ` Eric S. Raymond
2012-11-26 11:01     ` Peter Krefting
2012-11-26  2:57 ` Junio C Hamano [this message]
2012-11-26  4:49   ` Eric S. Raymond

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vmwy5xe9n.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=esr@thyrsus.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).