How about this idea?

During 'commit' when asked

<file> contains binary data. Use --no-warnings or the "binary-glob" setting to disable this warning.
Commit anyhow (a=all/y/N)?

to have one more option (Text) to override the automatic detection. Something like:

<file> contains binary data. Use --no-warnings or the "binary-glob" setting to disable this warning, or force as "text"
Commit anyhow (a=all/t=text/y/N)?

Once a file is added as text (or binary, if the user chooses to accept the auto-detected binary status), subsequent commits should use the same mode for this file to avoid repeated prompting on each commit. (I don't know if this status is saved someplace inside the repo, or recalculated each time it is needed. If it is saved, the implementation should be simple.)

-----Original Message----- From: Martin Gagnon
Sent: Monday, December 08, 2014 11:09 PM
To: Fossil SCM user's discussion
Subject: Re: [fossil-users] How to force text for all files?

On Mon, Dec 08, 2014 at 03:28:30PM -0500, Richard Hipp wrote:


On Mon, Dec 8, 2014 at 3:22 PM, bch <brad.har...@gmail.com> wrote:

    Does the "mode" (text/binary) factor into the sha1 fingerprint hash of
    an artifact (single file) or commit ?



No.  The "mode" is only used to determine how to display the content on a
webpage.  Also, independent changes can only be merged in text files, not
binary files.  And "diff" will only work for text files.

For the last two points - merge and diff - you can tell Fossil that the file is
text all you want, but if it really is binary that isn't going to make the
merge and/or diff algorithms work any better. You will still end up with a
mess.


So what is the point of this?

For what I understand from the OP, it's only for convenience to be able
to call "fossil diff/gdiff" on a file that is mostly text but is
detected as binary by fossil.

Why is the default text/binary detection not working for Tony?

Andy analyse the OP file:
https://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg18304.html

Seems to be because there's some control and null characters in the file.

For myself, I like the fact that fossil detect the binary files by
itself, it save me a lot of time, especially on repository with a lot
files. But I think it would be good to have either a kind of
text-glob setting or at least a flag to the diff/gidff command to force
the diff to happens.

--
Martin G.

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to