1
0
mirror of https://github.com/git/git.git synced 2024-09-21 09:42:22 +02:00
git/t/t4013
Zbigniew Jędrzejewski-Szmek dc801e71a7 diff --stat: use less columns for change counts
Number of columns required for change counts is now computed based on
the maximum number of changed lines instead of being fixed. This means
that usually a few more columns will be available for the filenames
and the graph.

The graph width logic is also modified to include enough space for
"Bin XXX -> YYY bytes".

If changes to binary files are mixed with changes to text files,
change counts are padded to take at least three columns. And the other
way around, if change counts require more than three columns, then
"Bin"s are padded to align with the change count. This way, the +-
part starts in the same column as "XXX -> YYY" part for binary files.
This makes the graph easier to parse visually thanks to the empty
column. This mimics the layout of diff --stat before this change.

Tests and the tutorial are updated to reflect the new --stat output.
This means either the removal of extra padding and/or the addition of
up to three extra characters to truncated filenames. One test is added
to check the graph alignment when a binary file change and text file
change of more than 999 lines are committed together.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-30 14:17:26 -07:00
..
diff.config_format.subjectprefix_DIFFERENT_PREFIX
diff.diff_--abbrev_initial..side
diff.diff_--cached
diff.diff_--cached_--_file0
diff.diff_--dirstat_initial_rearrange
diff.diff_--dirstat_master~1_master~2
diff.diff_--dirstat-by-file_initial_rearrange
diff.diff_--name-status_dir2_dir
diff.diff_--no-index_--name-status_--_dir2_dir
diff.diff_--no-index_--name-status_dir2_dir
diff.diff_--no-index_dir_dir3
diff.diff_--patch-with-raw_-r_initial..side
diff.diff_--patch-with-raw_initial..side
diff.diff_--patch-with-stat_-r_initial..side
diff.diff_--patch-with-stat_initial..side
diff.diff_--stat_initial..side
diff.diff_-r_--stat_initial..side
diff.diff_-r_initial..side
diff.diff_initial..side
diff.diff_master_master^_side
diff.diff-tree_--cc_--patch-with-stat_--summary_master
diff.diff-tree_--cc_--patch-with-stat_--summary_side
diff.diff-tree_--cc_--patch-with-stat_master
diff.diff-tree_--cc_--stat_--summary_master
diff.diff-tree_--cc_--stat_--summary_side
diff.diff-tree_--cc_--stat_master
diff.diff-tree_--cc_master
diff.diff-tree_--patch-with-raw_initial
diff.diff-tree_--patch-with-stat_initial
diff.diff-tree_--pretty_--patch-with-raw_initial
diff.diff-tree_--pretty_--patch-with-stat_initial
diff.diff-tree_--pretty_--patch-with-stat_side
diff.diff-tree_--pretty_--root_--patch-with-raw_initial
diff.diff-tree_--pretty_--root_--patch-with-stat_initial
diff.diff-tree_--pretty_--root_--stat_--summary_initial
diff.diff-tree_--pretty_--root_--stat_initial
diff.diff-tree_--pretty_--root_--summary_-r_initial
diff.diff-tree_--pretty_--root_--summary_initial
diff.diff-tree_--pretty_--root_-p_initial
diff.diff-tree_--pretty_--root_initial
diff.diff-tree_--pretty_--stat_--summary_initial
diff.diff-tree_--pretty_--stat_initial
diff.diff-tree_--pretty_--summary_initial
diff.diff-tree_--pretty_-p_initial
diff.diff-tree_--pretty_-p_side
diff.diff-tree_--pretty_initial
diff.diff-tree_--pretty_side
diff.diff-tree_--pretty=oneline_--patch-with-raw_initial
diff.diff-tree_--pretty=oneline_--patch-with-stat_initial
diff.diff-tree_--pretty=oneline_--root_--patch-with-raw_initial
diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
diff.diff-tree_--pretty=oneline_--root_-p_initial
diff.diff-tree_--pretty=oneline_--root_initial
diff.diff-tree_--pretty=oneline_-p_initial
diff.diff-tree_--pretty=oneline_initial
diff.diff-tree_--root_--abbrev_initial
diff.diff-tree_--root_--patch-with-raw_initial
diff.diff-tree_--root_--patch-with-stat_initial
diff.diff-tree_--root_-p_initial
diff.diff-tree_--root_-r_--abbrev_initial
diff.diff-tree_--root_-r_--abbrev=4_initial
diff.diff-tree_--root_-r_initial
diff.diff-tree_--root_initial
diff.diff-tree_-c_--abbrev_master
diff.diff-tree_-c_--stat_--summary_master
diff.diff-tree_-c_--stat_--summary_side
diff.diff-tree_-c_--stat_master
diff.diff-tree_-c_master
diff.diff-tree_-p_-m_master
diff.diff-tree_-p_initial
diff.diff-tree_-p_master
diff.diff-tree_-r_--abbrev_initial
diff.diff-tree_-r_--abbrev=4_initial
diff.diff-tree_-r_initial
diff.diff-tree_initial
diff.diff-tree_master
diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side
diff.format-patch_--attach_--stdout_initial..master
diff.format-patch_--attach_--stdout_initial..master^
diff.format-patch_--attach_--stdout_initial..side
diff.format-patch_--inline_--stdout_--numbered-files_initial..master
diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
diff.format-patch_--inline_--stdout_initial..master
diff.format-patch_--inline_--stdout_initial..master^
diff.format-patch_--inline_--stdout_initial..master^^
diff.format-patch_--inline_--stdout_initial..side
diff.format-patch_--stdout_--cover-letter_-n_initial..master^
diff.format-patch_--stdout_--no-numbered_initial..master
diff.format-patch_--stdout_--numbered_initial..master
diff.format-patch_--stdout_initial..master
diff.format-patch_--stdout_initial..master^
diff.format-patch_--stdout_initial..side
diff.log_--decorate_--all
diff.log_--decorate=full_--all
diff.log_--patch-with-stat_--summary_master_--_dir_
diff.log_--patch-with-stat_master
diff.log_--patch-with-stat_master_--_dir_
diff.log_--root_--cc_--patch-with-stat_--summary_master
diff.log_--root_--patch-with-stat_--summary_master
diff.log_--root_--patch-with-stat_master
diff.log_--root_-c_--patch-with-stat_--summary_master
diff.log_--root_-p_master
diff.log_--root_master
diff.log_-GF_-p_--pickaxe-all_master
diff.log_-GF_-p_master
diff.log_-GF_master
diff.log_-m_-p_--first-parent_master
diff.log_-m_-p_master
diff.log_-p_--first-parent_master
diff.log_-p_master
diff.log_-S_F_master
diff.log_-SF_-p_master
diff.log_-SF_master
diff.log_-SF_master_--max-count=0
diff.log_-SF_master_--max-count=1
diff.log_-SF_master_--max-count=2
diff.log_master
diff.rev-list_--children_HEAD
diff.rev-list_--parents_HEAD
diff.show_--first-parent_master
diff.show_--patch-with-raw_side
diff.show_--patch-with-stat_--summary_side
diff.show_--patch-with-stat_side
diff.show_--root_initial
diff.show_--stat_--summary_side
diff.show_--stat_side
diff.show_-c_master
diff.show_-m_master
diff.show_initial
diff.show_master
diff.show_side
diff.whatchanged_--patch-with-stat_--summary_master_--_dir_
diff.whatchanged_--patch-with-stat_master
diff.whatchanged_--patch-with-stat_master_--_dir_
diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
diff.whatchanged_--root_--patch-with-stat_--summary_master
diff.whatchanged_--root_--patch-with-stat_master
diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
diff.whatchanged_--root_-p_master
diff.whatchanged_--root_master
diff.whatchanged_-p_master
diff.whatchanged_-SF_-p_master
diff.whatchanged_-SF_master
diff.whatchanged_master