Re: [PATCH 17/25] list-files: add file modification options -[admADM]
On Mon, Apr 6, 2015 at 9:52 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 14 quoted lines
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> diff --git a/wt-status.c b/wt-status.c
> index cdbc8d7..ba9b56c 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -537,9 +537,11 @@ static void wt_status_collect_changes_index(struct wt_status *s)
> rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
> rev.diffopt.format_callback = wt_status_collect_updated_cb;
> rev.diffopt.format_callback_data = s;
> - rev.diffopt.detect_rename = 1;
> - rev.diffopt.rename_limit = 200;
> - rev.diffopt.break_opt = 0;
> + if (!s->no_rename) {Double-negatives are difficult. Perhaps call this 'detect_rename'?
Show 21 quoted lines
> + rev.diffopt.detect_rename = 1;
> + rev.diffopt.rename_limit = 200;
> + rev.diffopt.break_opt = 0;
> + }
> copy_pathspec(&rev.prune_data, &s->pathspec);
> run_diff_index(&rev, 1);
> }
> diff --git a/wt-status.h b/wt-status.h
> index 283a9fe..dc94f35 100644
> --- a/wt-status.h
> +++ b/wt-status.h
> @@ -55,6 +55,7 @@ struct wt_status {
> int relative_paths;
> int submodule_summary;
> int show_ignored_files;
> + int no_rename;
> enum untracked_status_type show_untracked_files;
> const char *ignore_submodule_arg;
> char color_palette[WT_STATUS_MAXSLOT][COLOR_MAXLEN];
> --
> 2.3.0.rc1.137.g477eb31