From: Matthieu Moy <git@matthieu-moy.fr>
To: "Eckhard S. Maaß" <eckhard.s.maass@googlemail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Jeff King" <peff@peff.net>, "Elijah Newren" <newren@gmail.com>,
"Ben Peart" <peartben@gmail.com>,
"Eckhard S. Maaß" <eckhard.s.maass@gmail.com>
Subject: Re: [PATCH v2] wt-status: use rename settings from init_diff_ui_defaults
Date: Tue, 1 May 2018 13:09:06 +0200 (CEST) [thread overview]
Message-ID: <907020160.11403426.1525172946040.JavaMail.zimbra@inria.fr> (raw)
In-Reply-To: <50c60ddfeb9a44a99f556be2c2ca9a34@BPMBX2013-01.univ-lyon1.fr>
"Eckhard S. Maaß" <eckhard.s.maass@googlemail.com> wrote:
> Since the very beginning, git status behaved differently for rename
> detection than other rename aware commands like git log or git show as
> it has the use of rename hard coded into it.
My understanding is that the succession of events went stg like:
1) invent the rename detection, but consider it experimental
hence don't activate it by default;
2) add commands using the rename detection, and since it works
well, use it by default;
3) activate rename detection by default for diff.
The next logical step is what you patch does indeed.
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -161,9 +161,9 @@ static void determine_whence(struct wt_status *s)
> static void status_init_config(struct wt_status *s, config_fn_t fn)
> {
> wt_status_prepare(s);
> + init_diff_ui_defaults();
> git_config(fn, s);
> determine_whence(s);
> - init_diff_ui_defaults();
> s->hints = advice_status_hints; /* must come after git_config() */
> }
That init_diff_ui_defaults() should indeed have been before
git_config() from the beginning. My bad, I'm the one who
misplaced it apparently :-(.
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -625,9 +625,6 @@ 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 = DIFF_DETECT_RENAME;
> - rev.diffopt.rename_limit = 200;
> - rev.diffopt.break_opt = 0;
This "break_opt = 0" deserves a mention in the commit message
IMHO. I'm not 100% sure it's a good change actually.
break_opt is normally controlled by "-B/--break-rewrites".
I'm not sure why it was set to 0.
--
Matthieu Moy
https://matthieu-moy.fr/
next prev parent reply other threads:[~2018-05-01 11:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c466854f-6087-e7f1-264a-1d2df9fd9b5a@gmail.com>
2018-05-01 9:49 ` [PATCH v2] wt-status: use rename settings from init_diff_ui_defaults Eckhard S. Maaß
2018-05-01 11:00 ` Ævar Arnfjörð Bjarmason
2018-05-01 11:37 ` Eckhard Maaß
[not found] ` <50c60ddfeb9a44a99f556be2c2ca9a34@BPMBX2013-01.univ-lyon1.fr>
2018-05-01 11:09 ` Matthieu Moy [this message]
2018-05-01 11:43 ` Eckhard Maaß
2018-05-01 12:23 ` Matthieu Moy
2018-05-01 15:52 ` Elijah Newren
2018-05-01 23:11 ` Junio C Hamano
2018-05-02 0:08 ` Elijah Newren
2018-05-02 14:20 ` Ben Peart
2018-05-03 5:22 ` Eckhard Maaß
2018-05-04 11:12 ` [PATCH v3] wt-status: use settings from git_diff_ui_config Eckhard S. Maaß
2018-05-04 15:13 ` Elijah Newren
2018-05-01 16:09 ` [PATCH v2] wt-status: use rename settings from init_diff_ui_defaults Eckhard Maaß
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=907020160.11403426.1525172946040.JavaMail.zimbra@inria.fr \
--to=git@matthieu-moy.fr \
--cc=eckhard.s.maass@gmail.com \
--cc=eckhard.s.maass@googlemail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=peartben@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).