Improved the 'git-info' command #755
Conversation
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>`).
| echon "## Local Branches:" | ||
| echon "$(local_branches)" | ||
| if [[ "${max_count}" -ne 1 ]]; then | ||
| header="Top ${max_count} Commits:" |
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: |
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

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Added:
--no-coloroption)-c <N>option which allows the user to specify the number of commits to show in the output