Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pablo Sabater <pabloosabaterr@gmail.com>
Cc: git@vger.kernel.org,  christian.couder@gmail.com,
	karthik.188@gmail.com,  jltobler@gmail.com,
	 ayu.chandekar@gmail.com, siddharthasthana31@gmail.com,
	 chandrapratap3519@gmail.com
Subject: Re: [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root
Date: Thu, 02 Apr 2026 22:04:32 -0700	[thread overview]
Message-ID: <xmqqpl4gocrj.fsf@gitster.g> (raw)
In-Reply-To: <20260402211717.3604688-1-pabloosabaterr@gmail.com> (Pablo Sabater's message of "Thu, 2 Apr 2026 23:17:16 +0200")

Pablo Sabater <pabloosabaterr@gmail.com> writes:

> This issue was reported by Junio at:
>   https://lore.kernel.org/git/xmqqikaawrpx.fsf@gitster.g/

You are giving me too much credit.  I just knew about previous
attempts and the gotchas.

One thing that we may want to make sure your solution gets right is
the issue depicated in two graphs in the footnote of this message:

  https://lore.kernel.org/git/xmqqwnwajbuj.fsf@gitster.c.googlers.com/

    Stepping back a bit, I think concentrating too much on "is it
    root?" is a wrong way to think about the problem.  Suppose you
    have two histories, e.g. (time flows from left to right; A and X
    are roots)

            A---B
                 \
          X---Y---Z

    and doing "git log --graph --oneline Z" would show A, B, X, Y
    and Z.

    But in a slightly modified graph:

          C
         /
        O---A---B
                 \
          X---Y---Z

    if you do "git log --graph --oneline C..Z", you should see the
    same commits listed as above (A, B, X, Y and Z), and most likely
    in the same order.

The way we draw A and make sure one raw below A in the same lane is
vacant (to avoid something that is not an ancestor of A steals that
spot) is applicable to both graphs.  The reason why we try to keep
one row below A vacant is not because it is a root, but because in
the graph being drawn, none of A's parent will appear.  Obviously if
A is root, none of A's parent will appear in the graph, but in the
latter topology where we are drawing C..Z, none of A's parent will
appear not because A is root, but because all the parents of A is
excluded.


  parent reply	other threads:[~2026-04-03  5:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 21:17 [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root Pablo Sabater
2026-04-02 21:17 ` [GSoC RFC PATCH 1/1] " Pablo Sabater
2026-04-03 17:55   ` Junio C Hamano
2026-04-03 18:07     ` Pablo
2026-04-03  5:04 ` Junio C Hamano [this message]
2026-04-03  8:25   ` [GSoC RFC PATCH 0/1] " Pablo
2026-04-04  9:24 ` [GSoC RFC PATCH v2 0/1] graph: add indentation for commits preceded by a parentless commit Pablo Sabater
2026-04-04  9:24   ` [GSoC RFC PATCH v2 1/1] " Pablo Sabater
2026-04-10 16:25   ` [GSoC RFC PATCH v2 0/1] " Pablo
2026-04-10 16:54     ` Junio C Hamano
2026-04-27 10:28   ` [GSoC PATCH v3 " Pablo Sabater
2026-04-27 10:28     ` [GSoC PATCH v3 1/1] " Pablo Sabater
2026-05-13 23:02       ` Jeff King
2026-05-14 10:19         ` Pablo Sabater
2026-04-27 10:35     ` [GSoC PATCH v3 0/1] " Pablo
2026-05-14 15:15 ` [GSoC RFC PATCH 0/1] graph: add indentation for commits preceded by a root Phillip Wood
2026-05-14 17:45   ` Pablo Sabater
2026-05-15  9:33     ` Phillip Wood

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=xmqqpl4gocrj.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ayu.chandekar@gmail.com \
    --cc=chandrapratap3519@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=pabloosabaterr@gmail.com \
    --cc=siddharthasthana31@gmail.com \
    /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