From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] Documentation: rev-list-options: clarify history simplification with paths
Date: Mon, 11 Aug 2008 13:34:19 -0700 [thread overview]
Message-ID: <7vprofwat0.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1218375840-4292-1-git-send-email-trast@student.ethz.ch> (Thomas Rast's message of "Sun, 10 Aug 2008 15:44:00 +0200")
Thomas Rast <trast@student.ethz.ch> writes:
> diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
> index ee6822a..0eaefd2 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -191,20 +191,6 @@ endif::git-rev-list[]
> ...
> +--
What was the meaning of the double-dash at the beginning of line in
AsciiDoc markup? I forgot.
> +History Simplification
> +~~~~~~~~~~~~~~~~~~~~~~
> +
> +When optional paths are given, 'git-rev-list' simplifies merge and
> +non-merge commits separately. First, all non-merge commits that do
> +not touch the given paths are marked as such. We'll call them
> +'non-touching' commits, and all other commits 'touching'.
> +
> +Second, merges are simplified. You can choose three levels. We
> +illustrate the strategies with the following example history, where
> +touching commits are shown with capital letters and both B and C
> +contain the same changes:
> +
> +-----------------------------------------------------------------------
> + o -- A -- B -- m
> + |\ /|
> + | \- C -/ |
> + \ /
> + \-- d --/
> +-----------------------------------------------------------------------
Please draw it a bit more consistently with pictures in other existing
documentation, perhaps like this:
d---.
/ \
o---A---B---m
\ /
C---.
> +--prune-merges::
> +
> + This is the default. A merge is has its parents rewritten as
> + follows:
> ++
> + * All parents that do not have any touching ancestors are
> + removed.
> ++
> + * Of a set of parents that agree on the path contents, only
> + the first is kept.
> ++
> +In our example, we get the following:
> ++
> +-----------------------------------------------------------------------
> + o -- A -- B -- m
> +-----------------------------------------------------------------------
I'd rather make this the part of the base text. In other words, remove
the "--prune-merges" header, dedent the description and start the sentence
with "By default, parents of a merge is rewritten with the following
rules:".
Then before listing the options, say something like "You can influence how
simplification works using the following options".
> +--simplify-merges::
> +
> + For each commit C, compute its replacement in the final history:
> ++
> +* First compute the replacements of all parents of C, and
> + rewrite C to have these parents. Then remove parents that
> + are either identical to or ancestors of an existing parent.
> ++
> +* If, after this simplification, the commit is touching, a root or
> + merge commit, or marked as uninteresting, it remains.
> ++
> +In the example, history is simplified as follows. (Note that while
> +'o' remains, it will not be output with '\--dense'.)
> ++
Also this option implies --full-history's true meaning "do not cull side
branches even when they led to the same conclusion", with --parent's
meaning "do not drop merges that are necessary to keep the rewritten
history still connected".
> +-----------------------------------------------------------------------
> + o -- A -- B -- m
> + \ /
> + \- C -/
> +-----------------------------------------------------------------------
Same comment on the way the picture is drawn.
> +--full-history::
> +
> + Do not simplify merges at all. Their ancestor lines are still
> + only shown if they have any touching commits, but the merges
> + themselves are always output.
With clarification from Linus yesterday, this would need rewording. It is
not about "simplifying merges", but its main focus is "do not cull side
branches". When --parents is in effect, merges need to be shown because
otherwise the resulting list of commits won't be connected, but otherwise
you are getting a flat list of commits and useless merges won't be shown.
next prev parent reply other threads:[~2008-08-11 20:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-10 13:44 [RFC PATCH] Documentation: rev-list-options: clarify history simplification with paths Thomas Rast
2008-08-10 19:19 ` Junio C Hamano
2008-08-10 19:27 ` Linus Torvalds
2008-08-10 21:58 ` Junio C Hamano
2008-08-10 22:16 ` Linus Torvalds
2008-08-10 21:31 ` Thomas Rast
2008-08-11 20:39 ` Junio C Hamano
2008-08-11 20:34 ` Junio C Hamano [this message]
2008-08-11 23:51 ` Thomas Rast
2008-08-11 23:55 ` [PATCH 1/3] Documentation: rev-list-options: Fix a typo Thomas Rast
2008-08-11 23:55 ` [PATCH 2/3] Documentation: rev-list-options: Rewrite simplification descriptions for clarity Thomas Rast
2008-08-11 23:55 ` [PATCH 3/3] Documentation: rev-list-options: move --simplify-merges documentation Thomas Rast
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=7vprofwat0.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=trast@student.ethz.ch \
/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.