[darcs-users] Re: tips for switching an accidentally binary file back to source?

David Roundy droundy at abridgegame.org
Wed Nov 17 10:58:41 UTC 2004

On Tue, Nov 16, 2004 at 03:48:56PM +0000, Mark Stosberg wrote:
> On 2004-11-16, David Roundy <droundy at abridgegame.org> wrote:
> > On Mon, Nov 15, 2004 at 05:58:32PM +0000, Mark Stosberg wrote:
> >> We've got a source file managed by darcs that was accidently
> >> recorded as binary, and has a little history with it already.
> >> 
> >> What alternatives are there to adjust this? 
> >> 
> >> Is the simplest thing just to 'darcs remove' and 
> >> 'darcs add' the file again? 
> >
> > All you have to do is convince darcs that it isn't binary, and everything
> > should be fine.  
> And..errr..would I convince it by just an 'remove' and 'add' or ?? 
> I don't /think/ it has any NULs in it, but something must been there to
> trigger the binary recognition in the first place.
> Some of our perl files have ^@^@ at the end of them...and it's a
> mystery where those  came from. (I don't think it's from darcs).

Ah, I had been assuming that it was the filename that was causing darcs to
think it was a binary.  I'm not sure what ^@ is, but if it's the EOF
character, then yes, removing that may be needed.  Since files opened in
"text mode" on DOS fail when they contain the EOF character, I figure
that's a sure sign that it isn't a text file.

Removing and adding a file won't change whether darcs thinks it's text or
binary, unless you change the name.
David Roundy

More information about the darcs-users mailing list