Skip to content

Commit

Permalink
Raw.xs: Added more diff flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesg committed Apr 22, 2014
1 parent b0a94b9 commit b629232
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Raw.xs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ STATIC unsigned git_hv_to_diff_flag(HV *flags) {

git_flag_opt(flags, "include_ignored", GIT_DIFF_INCLUDE_IGNORED, &out);

git_flag_opt(flags, "include_typechange", GIT_DIFF_INCLUDE_TYPECHANGE, &out);

git_flag_opt(
flags, "include_typechange_trees",
GIT_DIFF_INCLUDE_TYPECHANGE_TREES, &out);

git_flag_opt(
flags, "recurse_ignored_dirs",
GIT_DIFF_RECURSE_IGNORED_DIRS, &out
Expand All @@ -384,6 +390,8 @@ STATIC unsigned git_hv_to_diff_flag(HV *flags) {

git_flag_opt(flags, "ignore_filemode", GIT_DIFF_IGNORE_FILEMODE, &out);

git_flag_opt(flags, "ignore_case", GIT_DIFF_IGNORE_CASE, &out);

git_flag_opt(
flags, "ignore_submodules",
GIT_DIFF_IGNORE_SUBMODULES, &out
Expand All @@ -404,6 +412,26 @@ STATIC unsigned git_hv_to_diff_flag(HV *flags) {
GIT_DIFF_IGNORE_WHITESPACE_EOL, &out
);

git_flag_opt(
flags, "skip_binary_check",
GIT_DIFF_SKIP_BINARY_CHECK, &out
);

git_flag_opt(
flags, "enable_fast_untracked_dirs",
GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS, &out
);

git_flag_opt(
flags, "show_untracked_content",
GIT_DIFF_SHOW_UNTRACKED_CONTENT, &out
);

git_flag_opt(
flags, "show_unmodified",
GIT_DIFF_SHOW_UNMODIFIED, &out
);

git_flag_opt(flags, "patience", GIT_DIFF_PATIENCE, &out);

git_flag_opt(flags, "minimal", GIT_DIFF_MINIMAL, &out);
Expand Down
29 changes: 29 additions & 0 deletions lib/Git/Raw/Repository.pm
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ Reverse the sides of the diff.
Include ignored files in the diff.
=item * "include_typechange"
Enable the generation of typechange delta records.
=item * "recurse_ignored_dirs"
Even if C<"include_ignored"> is specified, an entire ignored directory
Expand All @@ -492,6 +496,10 @@ This flag adds all files under untracked directories as untracked entries, too.
Ignore file mode changes.
=item * "ignore_case"
Use case insensitive filename comparisons.
=item * "ignore_submodules"
Treat all submodules as unmodified.
Expand All @@ -508,6 +516,27 @@ Ignore changes in amount of whitespace.
Ignore whitespace at end of line.
=item * "skip_binary_check"
Disable updating of the binary flag in delta records.
=item * "enable_fast_untracked_dirs"
When diff finds an untracked directory, to match the behavior of core git, it
scans the contents for ignored and untracked files. If all contents are ignore,
then the directory is ignored. If any contents are not ignored, then the
directory is untracked. This is extra work that may not matter in many cases.
This flag turns off that scan and immediately labels an untracked directory
as untracked (changing the behavior to not match core git).
=item * "show_untracked_content"
Include the content of untracked files. This implies L<"include_untracked">.
=item * "show_unmodified"
Include the names of unmodified files.
=item * "patience"
Use the C<"patience diff"> algorithm.
Expand Down

0 comments on commit b629232

Please sign in to comment.