threads / discuss / 37026

`git log --graph` with multiple roots is confusing

Subject: `git log --graph` with multiple roots is confusing

## tl;dr

5 messages between Jun 30, 2014 and Jul 9, 2014.

replies: 4people: 4as markdown or json

Gary Fixler· Jun 30, 2014, 06:40 UTC · lore

I sometimes pull things in from unrelated repositories to rebase or cherry-pick items from a different line of development. I've done this to bring isolated features into a project in their own feature branches with their full development histories, and also to extract lines of development out to their own project, with their histories intact. These are usually not connected commits, but things I have to track down across time with `git log -S` and friends.

When I `git remote add otherrepo <url>`, then view things with my aliased `git log --oneline --all --graph --decorate` alias, I'm usually immediately straining to figure out what's what, as the two trees stack onto each other with no separation. It would be nice if root commits used something other than *, and/or if they could be colored differently by default, or via some option to make them stand out as parent-less commits.

Is this feasible, or already possible?
John Keeping· Jun 30, 2014, 08:08 UTC · re: Gary Fixler · lore

Re: `git log --graph` with multiple roots is confusing

On Sun, Jun 29, 2014 at 11:40:40PM -0700, Gary Fixler wrote:
Show 17 quoted lines
> I sometimes pull things in from unrelated repositories to rebase or
> cherry-pick items from a different line of development. I've done this
> to bring isolated features into a project in their own feature
> branches with their full development histories, and also to extract
> lines of development out to their own project, with their histories
> intact. These are usually not connected commits, but things I have to
> track down across time with `git log -S` and friends.
> 
> When I `git remote add otherrepo <url>`, then view things with my
> aliased `git log --oneline --all --graph --decorate` alias, I'm
> usually immediately straining to figure out what's what, as the two
> trees stack onto each other with no separation. It would be nice if
> root commits used something other than *, and/or if they could be
> colored differently by default, or via some option to make them stand
> out as parent-less commits.
> 
> Is this feasible, or already possible?
Have you tried `git log --boundary`?
Gary Fixler· Jun 30, 2014, 10:04 UTC · re: John Keeping · lore

Re: `git log --graph` with multiple roots is confusing

I just made a new test repo, added and fetched two unrelated repos, and then did the log view (all/graph/decorate/oneline), and tacked on --boundary, but saw no change. The root commits looked the same.

-g
On Mon, Jun 30, 2014 at 1:08 AM, John Keeping <john@keeping.me.uk> wrote:
Show 20 quoted lines
> On Sun, Jun 29, 2014 at 11:40:40PM -0700, Gary Fixler wrote:
>> I sometimes pull things in from unrelated repositories to rebase or
>> cherry-pick items from a different line of development. I've done this
>> to bring isolated features into a project in their own feature
>> branches with their full development histories, and also to extract
>> lines of development out to their own project, with their histories
>> intact. These are usually not connected commits, but things I have to
>> track down across time with `git log -S` and friends.
>>
>> When I `git remote add otherrepo <url>`, then view things with my
>> aliased `git log --oneline --all --graph --decorate` alias, I'm
>> usually immediately straining to figure out what's what, as the two
>> trees stack onto each other with no separation. It would be nice if
>> root commits used something other than *, and/or if they could be
>> colored differently by default, or via some option to make them stand
>> out as parent-less commits.
>>
>> Is this feasible, or already possible?
>
> Have you tried `git log --boundary`?
Jeff King· Jul 9, 2014, 06:51 UTC · re: Gary Fixler · lore

Re: `git log --graph` with multiple roots is confusing

On Mon, Jun 30, 2014 at 03:04:19AM -0700, Gary Fixler wrote:
> I just made a new test repo, added and fetched two unrelated repos,
> and then did the log view (all/graph/decorate/oneline), and tacked on
> --boundary, but saw no change. The root commits looked the same.

There was some discussion a while back on making root commits more apparent in the graph view:

  http://article.gmane.org/gmane.comp.version-control.git/239580
That topic has stalled, but perhaps you can help push it forward.
-Peff
Duy Nguyen· Jul 9, 2014, 07:16 UTC · re: Jeff King · lore

Re: `git log --graph` with multiple roots is confusing

On Wed, Jul 9, 2014 at 1:51 PM, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> On Mon, Jun 30, 2014 at 03:04:19AM -0700, Gary Fixler wrote:
>
>> I just made a new test repo, added and fetched two unrelated repos,
>> and then did the log view (all/graph/decorate/oneline), and tacked on
>> --boundary, but saw no change. The root commits looked the same.
>
> There was some discussion a while back on making root commits more
> apparent in the graph view:
>
>   http://article.gmane.org/gmane.comp.version-control.git/239580
>
> That topic has stalled, but perhaps you can help push it forward.

Grafted commits are marked --decorate, so perhaps another (simpler) route to make root commits stand out is decorate them.

-- 
Duy

← back to recent threads