From: Junio C Hamano <gitster@pobox•com>
To: "Torsten Bögershausen" <tboegi@web•de>
Cc: git@vger•kernel.org,
Johannes Schindelin <johannes.schindelin@gmx•de>,
kasal@ucw•cz, sandals@crustytoothpaste•net
Subject: Re: [PATCH/RFC] blame: CRLF in the working tree and LF in the repo
Date: Tue, 28 Apr 2015 00:28:04 -0700 [thread overview]
Message-ID: <xmqqbni8vhiz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <553E90C0.4070103@web.de> ("Torsten Bögershausen"'s message of "Mon, 27 Apr 2015 21:40:48 +0200")
Torsten Bögershausen <tboegi@web•de> writes:
> What do you think about the following test cases for a V2 patch ?
>
> test_expect_success 'create blamerepo' '
> test_create_repo blamerepo &&
> (
> cd blamerepo &&
> printf "testcase\r\n" >crlffile &&
> git -c core.autocrlf=false add crlffile &&
> git commit -m "add files" &&
> git -c core.autocrlf=false blame crlffile >crlfclean.txt
> )
> '
>
> test_expect_success 'blaming files with CRLF newlines in repo, core.autoclrf=input' '
> (
> cd blamerepo &&
> git -c core.autocrlf=input blame crlffile >actual &&
> grep "Not Committed Yet" actual
Are you interested in seeing just some of the lines to show up as
"Not commited yet", or all of them? I think it would be the latter,
so perhaps
! grep -v "Not Committed Yet" actual
or something?
> )
> '
>
>
Two blank lines only here?
> test_expect_success 'blaming files with CRLF newlines core.autocrlf=true' '
> (
> cd blamerepo &&
> git -c core.autocrlf=true blame crlffile >actual &&
> test_cmp crlfclean.txt actual
> )
> '
OK
> test_expect_success 'blaming files with CRLF newlines core.autocrlf=false' '
> (
> cd blamerepo &&
> git -c core.autocrlf=false blame crlffile >actual &&
> test_cmp crlfclean.txt actual
> )
> '
Hmm, how's this blame invocation any different from the one done in
the set-up step at the very beginning? In other words, I am not sure
what kind of breakage could cause this step to fail.
I see there is no "git blame HEAD crlffile" that bypasses the fake
latest commit altogether. Wouldn't that be the most appropriate
thing to compare against (i.e. how to create crlfclean.txt in the
set-up step)?
next prev parent reply other threads:[~2015-04-28 7:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-26 12:02 [PATCH/RFC] blame: CRLF in the working tree and LF in the repo Torsten Bögershausen
2015-04-26 18:36 ` Eric Sunshine
2015-04-27 4:39 ` Stepan Kasal
2015-04-27 5:31 ` Junio C Hamano
2015-04-27 6:11 ` Stepan Kasal
2015-04-27 18:58 ` Johannes Sixt
2015-04-27 19:45 ` Torsten Bögershausen
2015-04-28 18:42 ` Johannes Sixt
2015-04-28 19:52 ` Junio C Hamano
2015-04-28 20:19 ` Johannes Sixt
2015-04-28 21:58 ` Stepan Kasal
2015-04-27 17:47 ` Junio C Hamano
2015-04-27 19:40 ` Torsten Bögershausen
2015-04-28 7:28 ` Junio C Hamano [this message]
2015-04-28 7:40 ` Torsten Bögershausen
2015-04-28 1:17 ` brian m. carlson
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=xmqqbni8vhiz.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=johannes.schindelin@gmx$(echo .)de \
--cc=kasal@ucw$(echo .)cz \
--cc=sandals@crustytoothpaste$(echo .)net \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox