lkml.org 
[lkml]   [2011]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [git pull] vfs fix
On Tue, Nov 22, 2011 at 1:09 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> FWIW, the fixed form of script follows; if you see any potential problems in
> it, please tell:

So not problems per se, just not very pretty.

> echo Shortlog:
> base=`git merge-base origin "$1"`
> git log --pretty=short "$base..$1" | git shortlog
> echo Diffstat:
> git diff --stat -M "$base..$1"

I would suggest this instead:

echo Shortlog:
git shortlog "origin..$1"
echo Diffstat:
git diff --stat --summary -M "origin...$1"

and skip all the merge-base crap (git will do it for you: with a "git
log" you don't need it, and with a "git diff" the three-dot version
will do it for you). And just use "git shortlog" directly.

And the above also uses "--summary" for the "git diff" to show a
summary of renames/deletes.

Linus


\
 
 \ /
  Last update: 2011-11-22 22:27    [W:0.042 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site