diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-29 00:16:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-29 00:16:39 -0700 |
commit | 445cac18c015809a7fcb4a570d3c6571b1ddaf7d (patch) | |
tree | 89eeb8e6618d9eb582ea5bd1a2cf781625ebc001 /diff.c | |
parent | e990501312e22cfa910d88dc7143bc4eb3632ae1 (diff) | |
parent | 53d1589ff6bd336e3ece39e0a963a3d2a537cf96 (diff) | |
download | git-445cac18c015809a7fcb4a570d3c6571b1ddaf7d.tar.gz git-445cac18c015809a7fcb4a570d3c6571b1ddaf7d.tar.xz |
Merge branch 'maint'
* maint:
tutorial: gentler illustration of Alice/Bob workflow using gitk
pretty=format: respect date format options
make git-shell paranoid about closed stdin/stdout/stderr
Document gitk --argscmd flag.
Fix '--dirstat' with cross-directory renaming
for-each-ref: Allow a trailing slash in the patterns
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1060,6 +1060,13 @@ static long gather_dirstat(FILE *file, struct dirstat_dir *dir, unsigned long ch return this_dir; } +static int dirstat_compare(const void *_a, const void *_b) +{ + const struct dirstat_file *a = _a; + const struct dirstat_file *b = _b; + return strcmp(a->name, b->name); +} + static void show_dirstat(struct diff_options *options) { int i; @@ -1119,6 +1126,7 @@ static void show_dirstat(struct diff_options *options) return; /* Show all directories with more than x% of the changes */ + qsort(dir.files, dir.nr, sizeof(dir.files[0]), dirstat_compare); gather_dirstat(options->file, &dir, changed, "", 0); } |