mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-info: fix namespace
should use 'git-extra' name to configure via git config options.
This commit is contained in:
parent
9ee5d06469
commit
c52ba59d10
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
get_config() {
|
||||
cmd_get_config="$(git config --get-all extras.info.config-grep)"
|
||||
cmd_get_config="$(git config --get-all git-extras.info.config-grep)"
|
||||
if [ -z "$cmd_get_config" ]; then
|
||||
git config --list
|
||||
else
|
||||
|
|
@ -10,7 +10,7 @@ get_config() {
|
|||
}
|
||||
|
||||
most_recent_commit() {
|
||||
cmd_get_log="$(git config --get-all extras.info.log)"
|
||||
cmd_get_log="$(git config --get-all git-extras.info.log)"
|
||||
if [ -z "$cmd_get_log" ]; then
|
||||
git log --max-count=1 --pretty=short
|
||||
else
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ You could customize the Most recent commit and Configuration Info format via git
|
|||
.
|
||||
.nf
|
||||
|
||||
$ git config \-\-global \-\-add extras\.info\.log "<log\-command>"
|
||||
$ git config \-\-global \-\-add git\-extras\.info\.log "<log\-command>"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
|
@ -64,7 +64,7 @@ the default \fIlog\-command\fR is "git log \-\-max\-count=1 \-\-pretty=short"
|
|||
.
|
||||
.nf
|
||||
|
||||
$ git config \-\-global \-\-add extras\.info\.config\-grep "<config\-grep\-command>"
|
||||
$ git config \-\-global \-\-add git\-extras\.info\.config\-grep "<config\-grep\-command>"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
|
@ -83,7 +83,7 @@ to set global configuration to show last commit subject, without sha1
|
|||
.
|
||||
.nf
|
||||
|
||||
$ git config \-\-global \-\-add extras\.info\.log "git log \-\-max\-count=1 \-\-format=\e"Author: %an%nDate: %ad (%ar)%n%n %s\e" \-\-date=format:\e"%Y\-%m\-%d %a %H:%M\e""
|
||||
$ git config \-\-global \-\-add git\-extras\.info\.log "git log \-\-max\-count=1 \-\-format=\e"Author: %an%nDate: %ad (%ar)%n%n %s\e" \-\-date=format:\e"%Y\-%m\-%d %a %H:%M\e""
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
|
@ -96,7 +96,7 @@ to set global configuration to show user\'s name and email
|
|||
.
|
||||
.nf
|
||||
|
||||
$ git config \-\-global \-\-add extras\.info\.config\-grep "git config \-\-list | grep \-\-color=never \-E \e"^user\.name|^user\.email\e""
|
||||
$ git config \-\-global \-\-add git\-extras\.info\.config\-grep "git config \-\-list | grep \-\-color=never \-E \e"^user\.name|^user\.email\e""
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
|
|
|||
|
|
@ -107,12 +107,12 @@
|
|||
|
||||
<p> You could customize the Most recent commit and Configuration Info format via git config options</p>
|
||||
|
||||
<pre><code>$ git config --global --add extras.info.log "<log-command>"
|
||||
<pre><code>$ git config --global --add git-extras.info.log "<log-command>"
|
||||
</code></pre>
|
||||
|
||||
<p> the default <var>log-command</var> is "git log --max-count=1 --pretty=short"</p>
|
||||
|
||||
<pre><code>$ git config --global --add extras.info.config-grep "<config-grep-command>"
|
||||
<pre><code>$ git config --global --add git-extras.info.config-grep "<config-grep-command>"
|
||||
</code></pre>
|
||||
|
||||
<p> the default <var>config-grep-command</var> is "git config --list"</p>
|
||||
|
|
@ -121,12 +121,12 @@
|
|||
|
||||
<p> to set global configuration to show last commit subject, without sha1</p>
|
||||
|
||||
<pre><code> $ git config --global --add extras.info.log "git log --max-count=1 --format=\"Author: %an%nDate: %ad (%ar)%n%n %s\" --date=format:\"%Y-%m-%d %a %H:%M\""
|
||||
<pre><code> $ git config --global --add git-extras.info.log "git log --max-count=1 --format=\"Author: %an%nDate: %ad (%ar)%n%n %s\" --date=format:\"%Y-%m-%d %a %H:%M\""
|
||||
</code></pre>
|
||||
|
||||
<p> to set global configuration to show user's name and email</p>
|
||||
|
||||
<pre><code> $ git config --global --add extras.info.config-grep "git config --list | grep --color=never -E \"^user.name|^user.email\""
|
||||
<pre><code> $ git config --global --add git-extras.info.config-grep "git config --list | grep --color=never -E \"^user.name|^user.email\""
|
||||
</code></pre>
|
||||
|
||||
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||
|
|
@ -184,7 +184,7 @@ branch.master.merge=refs/heads/master
|
|||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Leila Muhtasib <<a href="mailto:muhtasib@gmail.com" data-bare-link="true">muhtasib@gmail.com</a>></p>
|
||||
<p>Written by Leila Muhtasib <<a href="mailto:muhtasib@gmail.com" data-bare-link="true">muhtasib@gmail.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ Shows the following information about a repository:
|
|||
|
||||
You could customize the Most recent commit and Configuration Info format via git config options
|
||||
|
||||
$ git config --global --add extras.info.log "<log-command>"
|
||||
$ git config --global --add git-extras.info.log "<log-command>"
|
||||
|
||||
the default <log-command> is "git log --max-count=1 --pretty=short"
|
||||
|
||||
$ git config --global --add extras.info.config-grep "<config-grep-command>"
|
||||
$ git config --global --add git-extras.info.config-grep "<config-grep-command>"
|
||||
|
||||
the default <config-grep-command> is "git config --list"
|
||||
|
||||
|
|
@ -42,11 +42,11 @@ Shows the following information about a repository:
|
|||
|
||||
to set global configuration to show last commit subject, without sha1
|
||||
|
||||
$ git config --global --add extras.info.log "git log --max-count=1 --format=\"Author: %an%nDate: %ad (%ar)%n%n %s\" --date=format:\"%Y-%m-%d %a %H:%M\""
|
||||
$ git config --global --add git-extras.info.log "git log --max-count=1 --format=\"Author: %an%nDate: %ad (%ar)%n%n %s\" --date=format:\"%Y-%m-%d %a %H:%M\""
|
||||
|
||||
to set global configuration to show user's name and email
|
||||
|
||||
$ git config --global --add extras.info.config-grep "git config --list | grep --color=never -E \"^user.name|^user.email\""
|
||||
$ git config --global --add git-extras.info.config-grep "git config --list | grep --color=never -E \"^user.name|^user.email\""
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue