Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: "Lê Duy Quang" <leduyquang753@gmail.com>
To: git@vger.kernel.org
Cc: "Lê Duy Quang" <leduyquang753@gmail.com>
Subject: [RFC PATCH 0/1] Add lines to `git log --graph` to separate connected regions
Date: Sun,  7 Apr 2024 12:10:30 +0700	[thread overview]
Message-ID: <20240407051031.6018-1-leduyquang753@gmail.com> (raw)

`git log --graph`, when invoked with multiple starting revisions and some
exclusions which cut the commit graph, may give a disconnected graph. In other
words, the resulting graph has more than one separate connected regions. The
command currently prints the connected regions on top of each other without any
separation.

This leads to a problem. Say there are two connected regions, each having two
commits, the graph would look like this:

* a2
* a1
* b2
* b1

which may lead to a misunderstanding that these four commits belong to the same
timeline, i.e. b2 is a parent of a1.

This patchset adds a separator line between each pair of connected regions to
clarify that they are not actually connected:

* a2
* a1
---
* b2
* b1

Lê Duy Quang (1):
  Add separator lines into `git log --graph`.

 graph.c                                |  55 +++++++++++-
 t/t4218-log-graph-connected-regions.sh | 119 +++++++++++++++++++++++++
 2 files changed, 170 insertions(+), 4 deletions(-)
 create mode 100755 t/t4218-log-graph-connected-regions.sh


base-commit: 19981daefd7c147444462739375462b49412ce33
-- 
2.44.0


             reply	other threads:[~2024-04-07  5:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07  5:10 Lê Duy Quang [this message]
2024-04-07  5:10 ` [RFC PATCH 1/1] Add separator lines into `git log --graph` Lê Duy Quang
2024-04-07  5:47   ` Eric Sunshine
2024-04-07  5:52     ` Eric Sunshine
2024-04-07  7:06       ` Quang Lê Duy
2024-04-07  8:35         ` Dragan Simic
2024-04-07  7:03     ` Quang Lê Duy
2024-04-07  9:07       ` Eric Sunshine
2024-04-07  5:30 ` [RFC PATCH 0/1] Add lines to `git log --graph` to separate connected regions Eric Sunshine
2024-04-07  5:37   ` Junio C Hamano
2024-04-07  6:40     ` Quang Lê Duy
2024-04-07  8:34       ` Dragan Simic
2024-04-07  8:46         ` Quang Lê Duy
2024-04-07  9:13           ` Dragan Simic
2024-04-08 15:49     ` Junio C Hamano

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=20240407051031.6018-1-leduyquang753@gmail.com \
    --to=leduyquang753@gmail.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.
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).