#636228 "git log --all" includes boring refs like refs/notes/*

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
martin f krafft
Date:
2011-08-02 22:15:07 UTC
Severity:
wishlist
#636228#5
Date:
2011-08-01 10:36:31 UTC
From:
To:
Git notes are managed in a separate DAG in the same repo. I would be
tempted to argue that noone really cares about this implementation
detail, especially not if you can manage Git notes via gitk's
interface.

Please provide the ability to hide commits only reachable from the
refs/notes/commit ref.

I would say that these should be hidden by default.

Please also make the refname (refs/notes/commit) configurable and
extensible (allow multiple ones to be specified).

This feature could also be used to hide pristine-tar branches, or
refs/top-bases/*, so it might be worthwhile to make (or just name)
it more generic.

Maybe an additional option could control whether refs should be
shown in gitk on commits, when they are reachable from visible
refs. For instance, I might choose to hide refs/top-bases/*, but
some other path (from a branch head) might include commits
referenced by refs/top-bases/*. In this case it would be good if the
refs/top-bases/* refs didn't show up in the standard gitk display,
but some users might want to make this configurable. I would say it
should default to now show.

Upon inspection of the gitk references, I found that gitk allows one
to specify which refs to include. My feature request is the
opposite, an exclude filter.

#636228#10
Date:
2011-08-02 20:27:52 UTC
From:
To:
retitle 636228 "git log --all" includes boring refs like refs/notes/*
reassign 636228 git 1:1.7.5.4-1
quit

Hi Martin,

martin f krafft wrote:

Does "gitk --branches --tags --remotes" do the trick?  If not, what do
you think a good UI would look like?

(Example: a new option used like "gitk --all --exclude=notes", with a
configuration variable "[log] excluderef" to determine a default set
of excluded refs.  Probably needs some tweak to prevent confusion when
commands like "gitk <name of a notes ref>" or "gitk
--glob=refs/notes/*" show nothing.)

#636228#23
Date:
2011-08-02 22:13:56 UTC
From:
To:
also sprach Jonathan Nieder <jrnieder@gmail.com> [2011.08.02.2227 +0200]:

Since notes are also shown in the commit message display of gitk
(cf. #636226), having their DAG show up seems redundant. In
addition, the notes commits are an implementation detail. Therefore,
I tend to think that refs/notes/* or at least refs/notes/commit
should /not/ show up unless /explicitly/ selected, e.g. with
--notes…

… or unless a ref within that DAG is specified explicitly.

My original suggestion was not to special-case notes, but to provide
a generic exclude mechanism. Other candidates I can think of are
refs/heads/pristine-tar (probably a Debian-only configuration
default) and refs/top-bases/* (arguably a default, since most people
do not use TopGit (yet)).

I think a configuration option list of refs to exclude, which is set
to refs/notes/* by default (adding refs/heads/pristine-tar on
Debian) would do. Since gitk only shows commits reachable by visible
refs, this would do, and it would provide everyone with the ability
to further adapt gitk to their own preference.

Thank you for your consideration!