Reputation: 1077
I want to know change status of directory with percentage. So I run like following
$ git diff --dirstat=files,10,cumulative HEAD^..HEAD
usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
$ git diff --dirstat=11 HEAD^..HEAD
76.8% api/
13.0% data/fonts/
I have tested this under git 1.7.5.4 and 1.7.0.4. But I don't know why case 1 is not correct command. I checked git diff man page http://goo.gl/GPU49 also git config for diff.dirstat but I can't do it correctly.
Do you have any opinion?
Upvotes: 0
Views: 2646
Reputation: 1077
I tested it in my mac and linux server with git version 1.7.6 then there had no problem. But when I tried it in my mac and linux server with git version 1.7.5.4, there had same problem.
# git version 1.7.5.4
$ git diff --dirstat=10,lines,cumulative HEAD^^^^^^^..HEAD
usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
# git version 1.7.6
$ git diff --dirstat=10,lines,cumulative HEAD^^^^^^^..HEAD
17.7% core/
41.9% tools/releasetools/
I can't find this fix in git 1.7.6 release note. http://goo.gl/HcPh9 Anyway it's OK in git 1.7.6.
Upvotes: 0
Reputation: 3315
please try
git diff --dirstat=10 --cumulative HEAD^..HEAD
sample output on my computer
mvaidya@research:~/git-hub/git.git$ git diff --dirstat=0 --cumulative HEAD^^^^^^^^^^^^..HEAD
12.4% Documentation/RelNotes/
37.1% Documentation/
20.8% builtin/
1.8% gitweb/
14.6% t/
Upvotes: 1