Torsten Bögershausen writes:
>>> enum safe_crlf crlf_warn = (safe_crlf == SAFE_CRLF_FAIL
>>> ? SAFE_CRLF_WARN
>>> : safe_crlf);
>>> + if (size_only)
>>> + crlf_warn = SAFE_CRLF_FALSE;
>>
>> If you
On 2017-03-03 18:47, Junio C Hamano wrote:
> Torsten Bögershausen writes:
>
>> Understood, thanks for the explanation.
>>
>> quiet is not quite any more..
>>
>> Does the following fix help ?
>>
>> --- a/diff.c
>> +++ b/diff.c
>> @@ -2826,6 +2826,8 @@ int diff_populate_filespec(struct diff_filespe
Torsten Bögershausen writes:
> Understood, thanks for the explanation.
>
> quiet is not quite any more..
>
> Does the following fix help ?
>
> --- a/diff.c
> +++ b/diff.c
> @@ -2826,6 +2826,8 @@ int diff_populate_filespec(struct diff_filespec *s,
> unsigned int flags)
> enum safe_crlf crl
Understood, thanks for the explanation.
quiet is not quite any more..
Does the following fix help ?
--- a/diff.c
+++ b/diff.c
@@ -2826,6 +2826,8 @@ int diff_populate_filespec(struct diff_filespec *s,
unsigned int flags)
enum safe_crlf crlf_warn = (safe_crlf == SAFE_CRLF_FAIL
Hi Torsten,
Your patch has been superseded, but I thought I ought to answer your
questions rather than leave them hanging.
On Thursday 02 March 2017 at 19:17:00 +0100, Torsten Bögershausen wrote:
> On 2017-03-01 22:25, Mike Crowe wrote:
> > On Wednesday 01 March 2017 at 18:04:44 +0100, tbo...@web
On Thursday 02 March 2017 at 10:33:59 -0800, Junio C Hamano wrote:
> Mike Crowe writes:
>
> > All the solutions presented so far do cause a small change in behaviour
> > when using git diff --quiet: they may now cause warning messages like:
> >
> > warning: CRLF will be replaced by LF in crlf.tx
On 2017-03-02 15:20, Mike Crowe wrote:
> ll the solutions presented so far do cause a small change in behaviour
> when using git diff --quiet: they may now cause warning messages like:
>
> warning: CRLF will be replaced by LF in crlf.txt.
> The file will have its original line endings in your wo
On Thu, Mar 02, 2017 at 09:52:21AM -0800, Junio C Hamano wrote:
> >> + * and is_binary check being that we want to avoid
> >> + * opening the file and inspecting the contents, this
> >> + * is probably fine.
> >> + */
> >>if ((flags & CHECK_BINAR
Jeff King writes:
>> diff --git a/diff.c b/diff.c
>> index 8c78fce49d..dc51dceb44 100644
>> --- a/diff.c
>> +++ b/diff.c
>> @@ -2792,8 +2792,25 @@ int diff_populate_filespec(struct diff_filespec *s,
>> unsigned int flags)
>> s->should_free = 1;
>> return
Mike Crowe writes:
> All the solutions presented so far do cause a small change in behaviour
> when using git diff --quiet: they may now cause warning messages like:
>
> warning: CRLF will be replaced by LF in crlf.txt.
> The file will have its original line endings in your working directory.
On 2017-03-01 22:25, Mike Crowe wrote:
> On Wednesday 01 March 2017 at 18:04:44 +0100, tbo...@web.de wrote:
>> From: Junio C Hamano
>>
>> git diff --quiet may take a short-cut to see if a file is changed
>> in the working tree:
>> Whenever the file size differs from what is recorded in the index,
On Tuesday 28 February 2017 at 19:06:44 +0100, Torsten Bögershausen wrote:
> My understanding is that git diff --quiet should be quiet, when
> git add will not do anything (but the file is "touched".
> The touched means that Git will detect e.g a new mtime or inode
> or file size when doing lstat()
On Wednesday 01 March 2017 at 13:54:26 -0800, Junio C Hamano wrote:
> Now I thought about it through a bit more thoroughly, I think this
> is the right approach, so here is my (tenative) final version.
>
> I seem to be getty really rusty---after all the codepaths involved
> are practically all my
On Wed, Mar 01, 2017 at 01:54:26PM -0800, Junio C Hamano wrote:
> -- >8 --
> Subject: [PATCH] diff: do not short-cut CHECK_SIZE_ONLY check in
> diff_populate_filespec()
Thanks, this is well-explained, and the new comments in the code really
help.
I wondered if we should be checking would_conver
Mike Crowe writes:
> With the above patch, both "git diff" and "git diff --quiet" report that
> there are no changes. Previously Git would report the extra newline
> correctly.
I sent an updated one that (I think) fixes the real issue, which the
extra would_convert_to_git() calls added in the ol
Now I thought about it through a bit more thoroughly, I think this
is the right approach, so here is my (tenative) final version.
I seem to be getty really rusty---after all the codepaths involved
are practically all my code and I should have noticed the real
culprit during my first attempt X-<.
On Wednesday 01 March 2017 at 18:04:44 +0100, tbo...@web.de wrote:
> From: Junio C Hamano
>
> git diff --quiet may take a short-cut to see if a file is changed
> in the working tree:
> Whenever the file size differs from what is recorded in the index,
> the file is assumed to be changed and git d
tbo...@web.de writes:
> From: Junio C Hamano
>
> git diff --quiet may take a short-cut to see if a file is changed
> in the working tree:
> Whenever the file size differs from what is recorded in the index,
> the file is assumed to be changed and git diff --quiet returns
> exit with code 1
>
> Th
From: Junio C Hamano
git diff --quiet may take a short-cut to see if a file is changed
in the working tree:
Whenever the file size differs from what is recorded in the index,
the file is assumed to be changed and git diff --quiet returns
exit with code 1
This shortcut must be suppressed whenever
Torsten Bögershausen writes:
> On 2017-02-27 21:17, Junio C Hamano wrote:
>
>> Torsten, you've been quite active in fixing various glitches around
>> the EOL conversion in the latter half of last year. Have any
>> thoughts to share on this topic?
>>
>> Thanks.
>
> Sorry for the delay, being too
On 2017-02-27 21:17, Junio C Hamano wrote:
> Torsten, you've been quite active in fixing various glitches around
> the EOL conversion in the latter half of last year. Have any
> thoughts to share on this topic?
>
> Thanks.
Sorry for the delay, being too busy with other things.
I followed the di
Torsten, you've been quite active in fixing various glitches around
the EOL conversion in the latter half of last year. Have any
thoughts to share on this topic?
Thanks.
Mike Crowe writes:
> On Monday 20 February 2017 at 13:25:01 -0800, Junio C Hamano wrote:
>> This almost makes me suspect tha
On Monday 20 February 2017 at 13:25:01 -0800, Junio C Hamano wrote:
> This almost makes me suspect that the place that checks lengths of
> one and two in order to refrain from running more expensive content
> comparison you found earlier need to ask would_convert_to_git()
> before taking the short-
Mike Crowe writes:
> I think that if there's a risk that file contents will undergo conversion
> then this should force the diff to check the file contents. Something like:
>
> diff --git a/diff.c b/diff.c
> index 051761b..bee1662 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -3413,13 +3413,14 @@ voi
On Friday 17 February 2017 at 22:19:58 +, Mike Crowe wrote:
> On Friday 17 February 2017 at 14:05:17 -0800, Junio C Hamano wrote:
> > Mike Crowe writes:
> >
> > > If "git diff --quiet" finds it necessary to compare actual file contents,
> > > and a file requires CRLF conversion, then it incor
On Friday 17 February 2017 at 14:05:17 -0800, Junio C Hamano wrote:
> Mike Crowe writes:
>
> > If "git diff --quiet" finds it necessary to compare actual file contents,
> > and a file requires CRLF conversion, then it incorrectly exits with an exit
> > code of 1 even if there have been no changes
Mike Crowe writes:
> If "git diff --quiet" finds it necessary to compare actual file contents,
> and a file requires CRLF conversion, then it incorrectly exits with an exit
> code of 1 even if there have been no changes.
>
> The patch below adds a test file that shows the problem.
If "git diff"
If "git diff --quiet" finds it necessary to compare actual file contents,
and a file requires CRLF conversion, then it incorrectly exits with an exit
code of 1 even if there have been no changes.
The patch below adds a test file that shows the problem.
The first test of diff without --quiet corre
28 matches
Mail list logo