From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org, Adam Dinwoodie <adam@dinwoodie.org>
Subject: Re: Bug report: Duplicate CRLF rewrite warnings on commit
Date: Fri, 13 May 2016 09:43:48 -0700 [thread overview]
Message-ID: <xmqqinyhaoxn.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160513134953.GE2345@dinwoodie.org> (Adam Dinwoodie's message of "Fri, 13 May 2016 14:49:53 +0100")
Adam Dinwoodie <adam@dinwoodie.org> writes:
> If you use .gitattributes to enable CRLF->LF rewriting, then commit a
> file that would have its line endings rewritten, the "CRLF will be
> replaced by LF" warning is printed several times over; I'd expect it to
> be printed only once.
>
> There's a test case in t0020 -- "safecrlf: print warning only once" --
> that checks the warning is only printed once when using `git add`, but
> nothing that seems to check the same thing on `git commit`. The
> unnecessary multiple warnings seem to have existed since at least v1.6.0
> (the warnings appear to have been added in v1.5.5 in 21e5ad5, but I
> couldn't get that to build on my current box), and I'm seeing them on my
> Cygwin box's build of the current next branch (d10caa2) and on my CentOS
> box's v2.8.1 release.
Torsten, I know you are not heavily invested in "commit" codepath,
but since you've been actively touching the CRLF area, I wonder
perhaps you might be interested in taking a look?
>
> Example:
>
> $ git init
> Initialized empty Git repository in /home/Adam/test/.git/
>
> $ echo '* text' >.gitattributes
>
> $ echo 'lf-terminated line' >text
>
> $ git add .gitattributes text && git commit -m 'Initial commit'
> [master (root-commit) 9a18d39] Initial commit
> 2 files changed, 2 insertions(+)
> create mode 100644 .gitattributes
> create mode 100644 text
>
> $ echo 'crlf-terminated line' | unix2dos >text
>
> $ git add text # Single CRLF warning as expected
> warning: CRLF will be replaced by LF in text.
> The file will have its original line endings in your working directory.
>
> $ git commit -m 'CRLF' # Should have one CRLF warning, actually get two
> warning: CRLF will be replaced by LF in text.
> The file will have its original line endings in your working directory.
> [master 4a8b1cb] CRLF
> warning: CRLF will be replaced by LF in text.
> The file will have its original line endings in your working directory.
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> (Tangentially: what's the accepted practice for submitting failing test
> scripts? I've written a short test case to add to t0020 that shows this
> bugged behaviour, but I've got the vague impression from past emails
> that leading with the patch email adding the failing test case is not
> the expected way to do things on this list...)
>
> Cheers,
>
> Adam
next prev parent reply other threads:[~2016-05-13 16:43 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 13:49 Bug report: Duplicate CRLF rewrite warnings on commit Adam Dinwoodie
2016-05-13 16:43 ` Junio C Hamano [this message]
2016-05-14 5:40 ` Torsten Bögershausen
2016-05-14 11:17 ` Adam Dinwoodie
2016-05-13 18:12 ` Jeff King
2016-05-13 19:46 ` Junio C Hamano
2016-05-13 19:53 ` Jeff King
2016-05-15 6:08 ` [PATCH/RFC v1 0/1] Quickfix ?No duplicate " tboegi
2016-05-15 6:08 ` [PATCH/RFC v1 1/1] No " tboegi
2016-05-15 6:15 ` Eric Sunshine
2016-05-15 6:37 ` [PATCH v1 0/3] CRLF-Handling: bug fix around ce_compare_data() tboegi
2016-05-15 6:38 ` [PATCH v1 1/3] t6038; use crlf on all platforms tboegi
2016-05-15 6:42 ` Eric Sunshine
2016-05-15 6:38 ` [PATCH v1 2/3] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-15 6:45 ` Eric Sunshine
2016-05-15 6:38 ` [PATCH v1 3/3] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-15 6:52 ` Eric Sunshine
2016-05-15 22:14 ` Junio C Hamano
2016-05-16 15:51 ` [PATCH v3 0/1] CRLF-Handling: bug fix around ce_compare_data() tboegi
2016-05-16 16:13 ` Junio C Hamano
2016-05-17 4:08 ` Torsten Bögershausen
2016-05-17 16:09 ` [PATCH v1 1/1] t6038; use crlf on all platforms tboegi
2016-05-17 18:39 ` Junio C Hamano
2016-05-17 16:41 ` [PATCH v4 0/2] CRLF: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-17 16:41 ` [PATCH v4 1/2] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-17 16:41 ` [PATCH v4 2/2] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-17 18:58 ` Junio C Hamano
2016-05-18 4:26 ` Torsten Bögershausen
2016-05-18 15:10 ` Torsten Bögershausen
2016-05-19 14:21 ` [PATCH v5 0/2] CRLF: " tboegi
2016-05-19 23:10 ` Junio C Hamano
2016-05-19 14:21 ` [PATCH v5 1/2] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-19 14:21 ` [PATCH v5 2/2] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-19 23:03 ` Junio C Hamano
2016-05-20 17:12 ` [PATCH v6 1/2] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-20 17:12 ` [PATCH v6 2/2] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-20 17:46 ` Junio C Hamano
2016-05-21 10:01 ` [PATCH v7 1/2] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-21 10:01 ` [PATCH v7 2/2] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-24 18:36 ` Junio C Hamano
2016-05-16 15:51 ` [PATCH v3 1/1] " tboegi
2016-05-30 17:00 ` [PATCH v1 0/1] t6038-merge-text-auto.sh tboegi
2016-05-30 18:00 ` Junio C Hamano
2016-05-30 18:48 ` Junio C Hamano
2016-05-30 17:00 ` [PATCH v1 1/1] t6038: different eol for "Merge addition of text=auto" tboegi
2016-06-07 15:20 ` [PATCH v2 0/3] unified auto CRLF handling, V2 tboegi
2016-06-07 15:20 ` [PATCH v2 1/3] convert: unify the "auto" handling of CRLF tboegi
2016-06-07 15:20 ` [PATCH v2 2/3] read-cache: factor out get_sha1_from_index() helper tboegi
2016-06-07 15:20 ` [PATCH v2 3/3] Correct ce_compare_data() in a middle of a merge tboegi
2016-05-15 13:02 ` [PATCH v2 0/3] CRLF-Handling: bug fix around ce_compare_data() tboegi
2016-05-15 13:02 ` [PATCH v2 1/3] read-cache: factor out get_sha1_from_index() helper tboegi
2016-05-15 13:02 ` [PATCH v2 2/3] convert: ce_compare_data() checks for a sha1 of a path tboegi
2016-05-15 13:02 ` [PATCH v2 3/3] t6038; use crlf on all platforms tboegi
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqinyhaoxn.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=adam@dinwoodie.org \
--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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.