Skip to content

FR: a way to hide non-branch non-tag refs in log graph view / log.excludeDecoration support #17

Open
@ilyagr

Description

@ilyagr

Some git-adjacent tools track information with special refs that are neither branches nor remote branches nor tags. For example, in its colocated-with-Git mode, https://github.com/jj-vcs/jj creates lots of jj/keep/<hash> tags to avoid garbage-collecting commits it wants to be able to access. https://github.com/arxanas/git-branchless functions similarly.

AFAICT, one can avoid showing commits that are only reachable by such tags by setting up a view like in the screenshot below (this is great!).

Problem: However, even in that case, the long jj/keep clutter the log view of gitk (this is less good), and AFAIK there is no way to change that currently.

I'd like an option to hide those purple tags from the gitk log view.

Image

Git itself has --decorate-refs/--decorate-refs-exclude options and a log.excludeDecoration config for this; I think they are relatively recent. I tried to putting --decorate-refs-exlcude=jj/keep these as "additional arguments to git log" in the gitk view config screen, but that resulted in an error: "Error reading commits: fatal: unrecogniced argument: --decorate-refs-exlcude=jj/keep".

According to my somewhat limited testing, the log.excludeDecoration config also has no effect on gitk.

So, one possible solution is to support that config and/or have some way of configuring --decorate-refs/--decorate-refs-exclude in the view configuration dialog.

Image

See also jonas/tig#1172, jonas/tig#1160 for tig's approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions