Opened 7 years ago

Last modified 7 years ago

#54697 new enhancement

`port history` action

Reported by: RJVB (René Bertin) Owned by:
Priority: Normal Milestone:
Component: base Version:
Keywords: haspatch Cc:
Port:

Description

I often want to have a quick look at a port's commit history. I grew tired of the action sequence involved (figure out port directory, chdir into it, enter the desired git log command, restore working dir) so I cooked up a new little port action.

port history foo

dumps the commit history of the port directory with just a summary of the changes

port -v history foo

dumps the commit history including diffs. In this case I force the use of colour to make the output more readable.

For now I just let the command fail without any particular feedback when the port directory is not in a git repo, suggestions welcome how to improve this.

Attachments (1)

patch-action_history.diff (2.5 KB) - added by RJVB (René Bertin) 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by RJVB (René Bertin)

Attachment: patch-action_history.diff added

comment:1 Changed 7 years ago by raimue (Rainer Müller)

As you said, not everyone is using a ports tree from git, so the applicability of this action would be quite limited.

The same could be achieved in shell with a one-liner (even supports colors and pager):

git -C $(port dir foo) log .

comment:2 Changed 7 years ago by RJVB (René Bertin)

I'll admit I didn't know the -C option but that's still more typing and remembering of useful git log options.

Don't you think that there'd be substantial overlap between those who now use the dir, file, location, edit and similar actions, and a history action?

not everyone is using a ports tree from git

FWIW, the trees I use that come from a git repo are my own trees, not the main one.

Note: See TracTickets for help on using tickets.