X Tutup
The Wayback Machine - https://web.archive.org/web/20210119073413/https://github.com/tj/git-extras/pull/755
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved the 'git-info' command #755

Open
wants to merge 7 commits into
base: master
from
Open

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 added 7 commits Jun 2, 2019
Now that --no-config and --no-color are now both valid options, the
shorter -n option is no longer obvious.
This option specifies the number of commits to show in the output (`<N>`).
@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:"

This comment has been minimized.

@spacewander

spacewander Jun 3, 2019
Collaborator

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:

This comment has been minimized.

@spacewander

spacewander Jun 3, 2019
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
X Tutup