From: Junio C Hamano <gitster@pobox.com>
To: tboegi@web.de
Cc: git@vger.kernel.org, eevee.reply@veekun.com
Subject: Re: [PATCH v1 1/1] convert: git cherry-pick -Xrenormalize did not work
Date: Tue, 29 Nov 2016 10:42:18 -0800 [thread overview]
Message-ID: <xmqq7f7mgmb9.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161129163023.23403-1-tboegi@web.de> (tboegi@web.de's message of "Tue, 29 Nov 2016 17:30:23 +0100")
tboegi@web.de writes:
> From: Torsten Bögershausen <tboegi@web.de>
>
> Working with a repo that used to be all CRLF. At some point it
> was changed to all LF, with `text=auto` in .gitattributes.
> Trying to cherry-pick a commit from before the switchover fails:
>
> $ git cherry-pick -Xrenormalize <commit>
> fatal: CRLF would be replaced by LF in [path]
OK. That's a very clear description of the symptom that can be
observed from the surface.
> Whenever crlf_action is CRLF_TEXT_XXX and not CRLF_AUTO_XXX,
> SAFE_CRLF_RENORMALIZE must be turned into CRLF_SAFE_FALSE.
Aside from needing s/CRLF_SAFE/SAFE_CRLF/, this however lacks
"Otherwise, because of X and Y, Z ends up doing W" to explain
the "must be" part. Care to explain it a bit more?
Thanks.
> Reported-by: Eevee (Lexy Munroe) <eevee@veekun.com>
> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
> ---
>
> Thanks for reporting.
> Here is a less invasive patch.
> Please let me know, if the patch is OK for you
> (email address, does it work..)
>
> convert.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/convert.c b/convert.c
> index be91358..526ec1d 100644
> --- a/convert.c
> +++ b/convert.c
> @@ -286,7 +286,9 @@ static int crlf_to_git(const char *path, const char *src, size_t len,
> checksafe = SAFE_CRLF_FALSE;
> else if (has_cr_in_index(path))
> convert_crlf_into_lf = 0;
> - }
> + } else if (checksafe == SAFE_CRLF_RENORMALIZE)
> + checksafe = SAFE_CRLF_FALSE;
> +
> if (checksafe && len) {
> struct text_stat new_stats;
> memcpy(&new_stats, &stats, sizeof(new_stats));
next prev parent reply other threads:[~2016-11-29 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6a7e155-f399-c9f8-c69e-8164e0735dfb@veekun.com>
2016-11-29 16:30 ` [PATCH v1 1/1] convert: git cherry-pick -Xrenormalize did not work tboegi
2016-11-29 18:42 ` Junio C Hamano [this message]
2016-11-29 20:16 ` Torsten Bögershausen
2016-11-29 20:45 ` Junio C Hamano
2016-11-30 17:02 ` [PATCH v2 " tboegi
2016-12-01 18:27 ` Junio C Hamano
2016-12-01 20:07 ` Jacob Keller
2016-12-01 20:24 ` Junio C Hamano
2016-12-02 12:20 ` Torsten Bögershausen
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=xmqq7f7mgmb9.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=eevee.reply@veekun.com \
--cc=git@vger.kernel.org \
--cc=tboegi@web.de \
/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).