Skip to content

FR: Add an easier way to get --no-graph behavior #7638

@hotsphink

Description

@hotsphink

Is your feature request related to a problem? Please describe.

I tend to use --no-graph a lot when scripting, and it is rather verbose.

Describe the solution you'd like
One thing that would help is if it were shorter.

Describe alternatives you've considered
I think -G would work well as the short version. -g is also available, but I kind of like the capitalization for subtly indicating the negation inherent to --no-graph, and also if I had to guess I would expect -g to be --git before I'd think of --no-graph.

Another alternative would be to have a built-in alias that is just log --no-graph (for now). I have this in my config as aliases.info = ["log", "--no-graph"], but then I have to include that alias when I share any command or alias that uses it. In my mind, using log for, well, the log of changes is semantically different from using log -T to extract information, and I could imagine a different set of command-line flags for the two purposes.

But I think -G would still make sense even if there were a built-in command.

Additional context
mercurial's hg log has -g for --git and -G for --graph. git has --graph only. Both default to not having the graph view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    polish🪒🐃Make existing features more convenient and more consistent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions