git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Hide decorations in git log
@ 2017-05-24 14:22 Robert Dailey
  2017-05-24 14:31 ` Robert Dailey
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Dailey @ 2017-05-24 14:22 UTC (permalink / raw)
  To: Git

Hello,

Is it possible to hide decorated refs in `git log` even if they are
reachable from the refs I'm actually interested in seeing the logs of?

For example, if I do `git log --graph --decorate --oneline --branches
'feature/*'`, I'd like to *only* see refnames that match the glob
pattern. However, you'll see tags and other branches that do not match
the glob if they are reachable from the result set.

This is purely a visual thing, and shouldn't impact the search results
I'd think.

This is especially useful in cases where I do --simplify-by-decoration
to get a better understanding of the topology of just a couple of
select branches. Without some sort of "decoration exclusion", I am
getting ton of results including tags, etc which obfuscates the
information I'm really interested in.

Thanks in advance.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hide decorations in git log
  2017-05-24 14:22 Hide decorations in git log Robert Dailey
@ 2017-05-24 14:31 ` Robert Dailey
  2017-05-24 14:39 ` Jeff King
  2017-05-26  8:48 ` Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Dailey @ 2017-05-24 14:31 UTC (permalink / raw)
  To: Git

On Wed, May 24, 2017 at 9:22 AM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> Hello,
>
> Is it possible to hide decorated refs in `git log` even if they are
> reachable from the refs I'm actually interested in seeing the logs of?
>
> For example, if I do `git log --graph --decorate --oneline --branches
> 'feature/*'`, I'd like to *only* see refnames that match the glob
> pattern. However, you'll see tags and other branches that do not match
> the glob if they are reachable from the result set.
>
> This is purely a visual thing, and shouldn't impact the search results
> I'd think.
>
> This is especially useful in cases where I do --simplify-by-decoration
> to get a better understanding of the topology of just a couple of
> select branches. Without some sort of "decoration exclusion", I am
> getting ton of results including tags, etc which obfuscates the
> information I'm really interested in.
>
> Thanks in advance.

Here is an even more concrete example:

$ git log --oneline --abbrev-commit --graph --simplify-by-decoration
--branches='hotfix'

I get the following results:

https://i.imgur.com/arHJss8.png

These results are incredibly confusing... I expected to see the first
line of the log results to be a branch matching 'hotfix' at the very
least. Maybe my question is more of a symptom of confusion about a
different problem. In any case, sorry for the confusion and hopefully
someone can clarify for me. I must be missing something basic.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hide decorations in git log
  2017-05-24 14:22 Hide decorations in git log Robert Dailey
  2017-05-24 14:31 ` Robert Dailey
@ 2017-05-24 14:39 ` Jeff King
  2017-05-26  8:48 ` Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2017-05-24 14:39 UTC (permalink / raw)
  To: Robert Dailey; +Cc: Git

On Wed, May 24, 2017 at 09:22:32AM -0500, Robert Dailey wrote:

> Is it possible to hide decorated refs in `git log` even if they are
> reachable from the refs I'm actually interested in seeing the logs of?

Sadly, no, there's no way to do this right now.

There was some discussion in this thread:

  http://public-inbox.org/git/20170119122630.27645-1-pclouds@gmail.com/T/#u

but no patches that do what you want.

Using the existing ref-selectors as discussed in that thread, it would
probably look something like:

  git log --oneline \
	--branches 'feature/*' --decorate-refs \
	--branches 'feature/*'

It sucks that you'd have to specify your refs twice (once to mark them
for decoration and once to use them as tips). But the flexibility would
let you do things like:

  git log --oneline \
	--branches 'feature/*' --decorate-refs \
	--tags --decorate-refs \
	HEAD

which decorates feature branches and tags, but only traverses from HEAD
(just as an example).

Anyway, none of that exists yet, so patches welcome.

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hide decorations in git log
  2017-05-24 14:22 Hide decorations in git log Robert Dailey
  2017-05-24 14:31 ` Robert Dailey
  2017-05-24 14:39 ` Jeff King
@ 2017-05-26  8:48 ` Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-05-26  8:48 UTC (permalink / raw)
  To: Robert Dailey; +Cc: Git

On Wed, May 24, 2017 at 4:22 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> Is it possible to hide decorated refs in `git log` even if they are
> reachable from the refs I'm actually interested in seeing the logs of?
>
> For example, if I do `git log --graph --decorate --oneline --branches
> 'feature/*'`, I'd like to *only* see refnames that match the glob
> pattern. However, you'll see tags and other branches that do not match
> the glob if they are reachable from the result set.
>
> This is purely a visual thing, and shouldn't impact the search results
> I'd think.
>
> This is especially useful in cases where I do --simplify-by-decoration
> to get a better understanding of the topology of just a couple of
> select branches. Without some sort of "decoration exclusion", I am
> getting ton of results including tags, etc which obfuscates the
> information I'm really interested in.

I don't think there's a way to do this, but it could be added. The
glob just matches the refs now, the decoration happens as an unrelated
step which doesn't care about the glob.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-26  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 14:22 Hide decorations in git log Robert Dailey
2017-05-24 14:31 ` Robert Dailey
2017-05-24 14:39 ` Jeff King
2017-05-26  8:48 ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).