8000 Rename detection using diff.renames by ben · Pull Request #1985 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Rename detection using diff.renames #1985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 11, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify default value and behavior
  • Loading branch information
ben committed Dec 6, 2013
commit 710f383868cef86ff837340c698b1672c7902486
6 changes: 5 additions & 1 deletion include/git2/diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,11 @@ typedef struct {
typedef struct {
unsigned int version;

/** Combination of git_diff_find_t values (default FIND_RENAMES) */
/**
* Combination of git_diff_find_t values (default FIND_BY_CONFIG). Note
* that if the configuration value is falsy, this will result in
* `git_diff_find_similar` doing nothing.
*/
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dahlbyk, is this a strong-enough warning?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

C9D0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would slightly prefer a more explicit if-you-do-this-you-may-get-that wording, like "If you don't pass in any explicit find actions and rely on the default behavior from the user configuration, diff.renames could be false which will result in git_diff_find_similar doing nothing"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

uint32_t flags;

/** Similarity to consider a file renamed (default 50) */
Expand Down
0