Merge pull request #419 from nicolaiskogheim/git-guilt

[RFC] guilt: small fixes
This commit is contained in:
hemanth.hm 2015-08-07 16:43:09 +05:30
commit 2113e8c1d7
4 changed files with 96 additions and 34 deletions

View file

@ -3,7 +3,7 @@
for param in $*
do
case $param in
-h|--help )
-h)
echo 'Usage: git-guilt [<options>] <since> <until>'
echo 'Calculates the change in blame between two revisions'
echo 'Example: git guilt HEAD~3 HEAD'

View file

@ -1,49 +1,72 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-GUILT" "1" "April 2015" "" ""
.TH "GIT\-GUILT" "1" "August 2015" "" "Git Extras"
.
.SH "NAME"
\fBgit\-guilt\fR \- calculate change between two revisions
.
.SH "SYNOPSIS"
git guilt [<option>] <since> <until>
\fBgit guilt\fR [<option>]
.
.br
\fBgit guilt\fR [<option>] <since> [<until>]
.
.SH "DESCRIPTION"
calculate the change in blame between two revisions
.
.SH "OPTIONS"
\-h, \-\-help
In the first form, shows total blame count for files with unstaged changes\.
.
.P
output usage information
In the second form, calculates the change in blame between two revisions\. If not specified, <until> will default to HEAD\.
.
.SH "OPTIONS"
\-h
.
.P
Output usage information
.
.P
\-e, \-\-email
.
.P
display author emails instead of names
Display author emails instead of names
.
.P
\-w, \-\-ignore\-whitespace
.
.P
ignore whitespace only changes when attributing blame
Ignore whitespace only changes when attributing blame
.
.P
\-d, \-\-debug
.
.P
output debug information
Output debug information
.
.SH "Examples"
Find blame on unstaged modified files:
.
.IP "" 4
.
.nf
$ git guilt (1)
spacewander ++++
(1) There is only one modified file and it is not staged\. The four
plusses means that the file has four lines, all contributed by spacewander\.
.
.fi
.
.IP "" 0
.
.P
Find blame delta between two commits:
.
.IP "" 4
.
.nf
$ git guilt HEAD~2 HEAD
$ git guilt HEAD~3 HEAD^
spacewander +++++++++++++++++++++++++++++++++++++++++++++(115)
Jesse Sipprell \-
.
@ -58,7 +81,7 @@ Find blame delta over the last three weeks:
.
.nf
$ git guilt `git log \-\-until="3 weeks ago" \-\-format="%H" \-n 1` HEAD
$ git guilt `git log \-\-until="3 weeks ago" \-\-format="%H" \-n 1`
Paul Schreiber +++++++++++++++++++++++++++++++++++++++++++++(349)
spacewander +++++++++++++++++++++++++++++++++++++++++++++(113)
Mark Eissler ++++++++++++++++++++++++++
@ -74,6 +97,12 @@ hemanth\.hm \-\-
.IP "" 0
.
.P
Since git 1\.8\.5, the above can also be written as:
.
.P
$ git guilt @{3\.weeks\.ago}
.
.P
Find blame delta for a topic branch:
.
.IP "" 4

View file

@ -65,7 +65,7 @@
<ol class='man-decor man-head man head'>
<li class='tl'>git-guilt(1)</li>
<li class='tc'></li>
<li class='tc'>Git Extras</li>
<li class='tr'>git-guilt(1)</li>
</ol>
@ -76,42 +76,55 @@
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p>git guilt [&lt;option&gt;] &lt;since&gt; &lt;until&gt;</p>
<p><code>git guilt</code> [&lt;option&gt;]<br />
<code>git guilt</code> [&lt;option&gt;] &lt;since&gt; [&lt;until&gt;]</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>calculate the change in blame between two revisions</p>
<p>In the first form, shows total blame count for files with unstaged changes.</p>
<p>In the second form, calculates the change in blame between two revisions.
If not specified, &lt;until&gt; will default to HEAD.</p>
<h2 id="OPTIONS">OPTIONS</h2>
<p> -h, --help</p>
<p> -h</p>
<p> output usage information</p>
<p> Output usage information</p>
<p> -e, --email</p>
<p> display author emails instead of names</p>
<p> Display author emails instead of names</p>
<p> -w, --ignore-whitespace</p>
<p> ignore whitespace only changes when attributing blame</p>
<p> Ignore whitespace only changes when attributing blame</p>
<p> -d, --debug</p>
<p> output debug information</p>
<p> Output debug information</p>
<h2 id="Examples">Examples</h2>
<p>Find blame on unstaged modified files:</p>
<pre><code>$ git guilt (1)
spacewander ++++
(1) There is only one modified file and it is not staged. The four
plusses means that the file has four lines, all contributed by spacewander.
</code></pre>
<p>Find blame delta between two commits:</p>
<pre><code>$ git guilt HEAD~2 HEAD
<pre><code>$ git guilt HEAD~3 HEAD^
spacewander +++++++++++++++++++++++++++++++++++++++++++++(115)
Jesse Sipprell -
</code></pre>
<p>Find blame delta over the last three weeks:</p>
<pre><code>$ git guilt `git log --until="3 weeks ago" --format="%H" -n 1` HEAD
<pre><code>$ git guilt `git log --until="3 weeks ago" --format="%H" -n 1`
Paul Schreiber +++++++++++++++++++++++++++++++++++++++++++++(349)
spacewander +++++++++++++++++++++++++++++++++++++++++++++(113)
Mark Eissler ++++++++++++++++++++++++++
@ -123,6 +136,10 @@ Ben Parnell -
hemanth.hm --
</code></pre>
<p>Since git 1.8.5, the above can also be written as:</p>
<p> $ git guilt @{3.weeks.ago}</p>
<p>Find blame delta for a topic branch:</p>
<pre><code>$ git guilt `git merge-base master git-guilt` git-guilt
@ -131,7 +148,7 @@ spacewander +++++++++++++++++++++++++++++++++++++++++++++(112)
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by spacewander &lt;<a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#111;&#x3a;&#x73;&#112;&#x61;&#x63;&#101;&#x77;&#x61;&#110;&#x64;&#x65;&#114;&#x6c;&#122;&#x78;&#x40;&#x67;&#x6d;&#x61;&#x69;&#x6c;&#x2e;&#99;&#x6f;&#109;" data-bare-link="true">&#115;&#112;&#x61;&#x63;&#101;&#x77;&#97;&#110;&#x64;&#x65;&#x72;&#x6c;&#122;&#120;&#x40;&#x67;&#x6d;&#x61;&#105;&#108;&#x2e;&#99;&#x6f;&#109;</a>&gt;</p>
<p>Written by spacewander &lt;<a href="&#109;&#97;&#x69;&#x6c;&#116;&#111;&#58;&#115;&#x70;&#97;&#x63;&#101;&#x77;&#97;&#x6e;&#100;&#x65;&#114;&#x6c;&#x7a;&#x78;&#x40;&#103;&#x6d;&#x61;&#105;&#108;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#x73;&#x70;&#97;&#99;&#x65;&#119;&#x61;&#110;&#100;&#x65;&#x72;&#108;&#122;&#x78;&#64;&#103;&#109;&#97;&#x69;&#108;&#x2e;&#x63;&#111;&#109;</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
@ -144,7 +161,7 @@ spacewander +++++++++++++++++++++++++++++++++++++++++++++(112)
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>April 2015</li>
<li class='tc'>August 2015</li>
<li class='tr'>git-guilt(1)</li>
</ol>

View file

@ -3,41 +3,53 @@ git-guilt(1) -- calculate change between two revisions
## SYNOPSIS
git guilt [&lt;option&gt;] &lt;since&gt; &lt;until&gt;
`git guilt` [&lt;option&gt;]<br>
`git guilt` [&lt;option&gt;] &lt;since&gt; [&lt;until&gt;]
## DESCRIPTION
calculate the change in blame between two revisions
In the first form, shows total blame count for files with unstaged changes.
In the second form, calculates the change in blame between two revisions.
If not specified, &lt;until&gt; will default to HEAD.
## OPTIONS
-h, --help
-h
output usage information
Output usage information
-e, --email
display author emails instead of names
Display author emails instead of names
-w, --ignore-whitespace
ignore whitespace only changes when attributing blame
Ignore whitespace only changes when attributing blame
-d, --debug
output debug information
Output debug information
## Examples
Find blame on unstaged modified files:
$ git guilt (1)
spacewander ++++
(1) There is only one modified file and it is not staged. The four
plusses means that the file has four lines, all contributed by spacewander.
Find blame delta between two commits:
$ git guilt HEAD~2 HEAD
$ git guilt HEAD~3 HEAD^
spacewander +++++++++++++++++++++++++++++++++++++++++++++(115)
Jesse Sipprell -
Find blame delta over the last three weeks:
$ git guilt `git log --until="3 weeks ago" --format="%H" -n 1` HEAD
$ git guilt `git log --until="3 weeks ago" --format="%H" -n 1`
Paul Schreiber +++++++++++++++++++++++++++++++++++++++++++++(349)
spacewander +++++++++++++++++++++++++++++++++++++++++++++(113)
Mark Eissler ++++++++++++++++++++++++++
@ -48,6 +60,10 @@ Find blame delta over the last three weeks:
Ben Parnell -
hemanth.hm --
Since git 1.8.5, the above can also be written as:
$ git guilt @{3.weeks.ago}
Find blame delta for a topic branch:
$ git guilt `git merge-base master git-guilt` git-guilt