Skip to content

Conversation

@bbugyi200
Copy link

@bbugyi200 bbugyi200 commented Jun 2, 2019

Added:

  • colored output to git-info (can be disabled with the --no-color option)
  • new -c <N> option which allows the user to specify the number of commits to show in the output

@bbugyi200 bbugyi200 changed the title Add: colored output to git-info Improved the 'git-info' command Jun 2, 2019
echon "## Local Branches:"
echon "$(local_branches)"
if [[ "${max_count}" -ne 1 ]]; then
header="Top ${max_count} Commits:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, Top N Commits: is vague. Actually we show the last N commits in the current branch.

$ git info --no-color
```
You can select the number of previous commits to show by using the `-c <N>` option (where `<N>` is any integer). It is important to note, however, that `-c` **must be the FIRST option** you pass to `git info`. For example:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use a while loop to get rid of this limitation, like: https://github.com/tj/git-extras/blob/master/bin/git-release#L31

@github-actions
Copy link

This PR was closed because it has been stalled for 365 days with no activity. Feel free to make a new PR if you wish to continue

@github-actions github-actions bot closed this Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants