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

[PATCH 3/3] Documentation: rev-list-options: move --simplify-merges documentation

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 11, 2008, 23:55 UTC
Message-ID
<9c8cd2c95aba3ca921099a28b07b2b7f2e497b2f.1218498923.git.trast@student.ethz.ch>
In-Reply-To
<eada6ecf77a858b2f1fe91c13c6a68b9d0351621.1218498923.git.trast@student.ethz.ch>

Fits --simplify-merges documentation into the 'History Simplification' section, including example.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
 Documentation/rev-list-options.txt |   48 +++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index c6b0bf1..1d0048e 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -193,12 +193,6 @@ endif::git-rev-list[]
 
 	Stop when a given path disappears from the tree.
 
---simplify-merges::
-
-	Simplify away commits that did not change the given paths, similar
-	to `--full-history`, and further remove merges none of whose
-	parent history changes the given paths.
-
 --no-merges::
 
 	Do not print commits with more than one parent.
@@ -414,6 +408,48 @@ Note that without '\--full-history', this still simplifies merges: if
 one of the parents is TREESAME, we follow only that one, so the other
 sides of the merge are never walked.
 
+Finally, there is a fourth simplification mode available:
+
+--simplify-merges::
+
+	First, build a history graph in the same way that
+	'\--full-history' with parent rewriting does (see above).
++
+Then simplify each commit `C` to its replacement `C'` in the final
+history according to the following rules:
++
+--
+* Set `C'` to `C`.
++
+* Replace each parent `P` of `C'` with its simplification `P'`.  In
+  the process, drop parents that are ancestors of other parents, and
+  remove duplicates.
++
+* If after this parent rewriting, `C'` is a root or merge commit (has
+  zero or >1 parents), a boundary commit, or !TREESAME, it remains.
+  Otherwise, it is replaced with its only parent.
+--
++
+The effect of this is best shown by way of comparing to
+'\--full-history' with parent rewriting.  The example turns into:
++
+-----------------------------------------------------------------------
+	  .-A---M---N---O
+	 /     /       /
+	I     B       D
+	 \   /       /
+	  `---------'
+-----------------------------------------------------------------------
++
+Note the major differences in `N` and `P` over '\--full-history':
++
+--
+* `N`'s parent list had `I` removed, because it is an ancestor of the
+  other parent `M`.  Still, `N` remained because it is !TREESAME.
++
+* `P`'s parent list similarly had `I` removed.  `P` was then
+  removed completely, because it had one parent and is TREESAME.
+--
 
 ifdef::git-rev-list[]
 Bisection Helpers
-- 
1.6.0.rc2.56.g86ca
Previous: Thomas Rast
Message 12 of 12 in “Documentation: rev-list-options: clarify history simplification with paths”
  1. Documentation: rev-list-options: clarify history simplification with pathsThomas Rast, Aug 10, 2008
  2. Junio C HamanoAug 10, 2008
  3. Linus TorvaldsAug 10, 2008
  4. Junio C HamanoAug 10, 2008
  5. Linus TorvaldsAug 10, 2008
  6. Thomas RastAug 10, 2008
  7. Junio C HamanoAug 11, 2008
  8. Junio C HamanoAug 11, 2008
  9. Thomas RastAug 11, 2008
  10. 1/3 Documentation: rev-list-options: Fix a typoThomas Rast, Aug 11, 2008
  11. 2/3 Documentation: rev-list-options: Rewrite simplification descriptions for clarityThomas Rast, Aug 11, 2008
  12. 3/3 Documentation: rev-list-options: move --simplify-merges documentationThomas Rast, Aug 11, 2008

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.