Re: [PATCH] crlf: Add test showing double warning on commit
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- May 15, 2016, 06:46 UTC
- Message-ID
- <5e47eb63-41b3-31d0-7781-04d4e6eeb4b8@web.de>
- In-Reply-To
- <xmqqoa887a25.fsf@gitster.mtv.corp.google.com>
On 14.05.16 20:45, Junio C Hamano wrote:
Show 16 quoted lines
> Torsten Bögershausen <tboegi@web.de> writes: > >> Do we need to run diff_populate_filespec() twice when src==dst ? > > Of course we do. > > src and dst may have the same path, but are coming from different > places (src may be an indexed blob while dst may be a file in the > working tree). > >> If yes, we may need to introduce a flag besides >> #define CHECK_SIZE_ONLY 1 >> #define CHECK_BINARY 2 >> to suppress the conversion warning ?? > > I do not think that belongs to diff_populate_filespec() at all.
Just to remind myself: sha1_file.c: The warning should probably triggered from here, depending on the flags ?
int index_fd(unsigned char *sha1, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags)