* how to configure Git to treat certain type of ascii files as binary files
@ 2008-10-22 21:58 Weiwei Shu
2008-10-22 22:13 ` david
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Weiwei Shu @ 2008-10-22 21:58 UTC (permalink / raw)
To: git
Hello everyone,
My first post in this mailing list. Could some one direct me to some
document/manual pages to setup Git to treat ascii files as binary
files? I'm using Git to do circuit schematics (SPICE files)
versioning. I will not do any merging or editing stuff with external
editors. The only way to change it is to use schematic capture GUIs
(Cadence, ADS, etc). So I'd like to treat them as binary files to
reduce the possibilities of messing them up.
I know it seems a little bit stupid to use Git to do such an easy job.
But hey, it's the most eye-catching SCM software, isn't it?
--
Weiwei
--Hope Springs Eternal.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to configure Git to treat certain type of ascii files as binary files
2008-10-22 21:58 how to configure Git to treat certain type of ascii files as binary files Weiwei Shu
@ 2008-10-22 22:13 ` david
2008-10-22 22:35 ` Weiwei Shu
2008-10-22 22:13 ` David Symonds
2008-10-22 22:40 ` Jakub Narebski
2 siblings, 1 reply; 6+ messages in thread
From: david @ 2008-10-22 22:13 UTC (permalink / raw)
To: Weiwei Shu; +Cc: git
On Wed, 22 Oct 2008, Weiwei Shu wrote:
> Hello everyone,
>
> My first post in this mailing list. Could some one direct me to some
> document/manual pages to setup Git to treat ascii files as binary
> files? I'm using Git to do circuit schematics (SPICE files)
> versioning. I will not do any merging or editing stuff with external
> editors. The only way to change it is to use schematic capture GUIs
> (Cadence, ADS, etc). So I'd like to treat them as binary files to
> reduce the possibilities of messing them up.
>
> I know it seems a little bit stupid to use Git to do such an easy job.
> But hey, it's the most eye-catching SCM software, isn't it?
unless you enable cr/lf handling git won't change ascii files.
what is it that you think needs to be done differently for these files
than for any other files?
David Lang
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to configure Git to treat certain type of ascii files as binary files
2008-10-22 21:58 how to configure Git to treat certain type of ascii files as binary files Weiwei Shu
2008-10-22 22:13 ` david
@ 2008-10-22 22:13 ` David Symonds
2008-10-22 22:40 ` Jakub Narebski
2 siblings, 0 replies; 6+ messages in thread
From: David Symonds @ 2008-10-22 22:13 UTC (permalink / raw)
To: Weiwei Shu; +Cc: git
On Wed, Oct 22, 2008 at 2:58 PM, Weiwei Shu <shuww1980@gmail.com> wrote:
> My first post in this mailing list. Could some one direct me to some
> document/manual pages to setup Git to treat ascii files as binary
> files? I'm using Git to do circuit schematics (SPICE files)
> versioning. I will not do any merging or editing stuff with external
> editors. The only way to change it is to use schematic capture GUIs
> (Cadence, ADS, etc). So I'd like to treat them as binary files to
> reduce the possibilities of messing them up.
Git doesn't futz with your file contents unless you explicitly ask it
to, such as the CRLF-munging stuff. By default, all files are
"binary".
Dave.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to configure Git to treat certain type of ascii files as binary files
2008-10-22 22:13 ` david
@ 2008-10-22 22:35 ` Weiwei Shu
0 siblings, 0 replies; 6+ messages in thread
From: Weiwei Shu @ 2008-10-22 22:35 UTC (permalink / raw)
To: david; +Cc: git
Thanks David.
Well, for binary files, SCM tools (like subversion) usually work as
"lock-modify-unlock" mode in which merging is not supported since the
files are not human-readable. The schematics are ascii files, but I do
not want them to be merged if I run "merge" command. Instead I'd like
Git ask me to "look-and-replace". I know Git is not meant to do this
kind of jobs. Just curious if it is able to be configured to work in
that way.
On Wed, Oct 22, 2008 at 5:13 PM, <david@lang.hm> wrote:
> On Wed, 22 Oct 2008, Weiwei Shu wrote:
>
>> Hello everyone,
>>
>> My first post in this mailing list. Could some one direct me to some
>> document/manual pages to setup Git to treat ascii files as binary
>> files? I'm using Git to do circuit schematics (SPICE files)
>> versioning. I will not do any merging or editing stuff with external
>> editors. The only way to change it is to use schematic capture GUIs
>> (Cadence, ADS, etc). So I'd like to treat them as binary files to
>> reduce the possibilities of messing them up.
>>
>> I know it seems a little bit stupid to use Git to do such an easy job.
>> But hey, it's the most eye-catching SCM software, isn't it?
>
> unless you enable cr/lf handling git won't change ascii files.
>
> what is it that you think needs to be done differently for these files than
> for any other files?
>
> David Lang
>
--
Weiwei
--Hope Springs Eternal.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to configure Git to treat certain type of ascii files as binary files
2008-10-22 21:58 how to configure Git to treat certain type of ascii files as binary files Weiwei Shu
2008-10-22 22:13 ` david
2008-10-22 22:13 ` David Symonds
@ 2008-10-22 22:40 ` Jakub Narebski
2008-10-23 1:12 ` Weiwei Shu
2 siblings, 1 reply; 6+ messages in thread
From: Jakub Narebski @ 2008-10-22 22:40 UTC (permalink / raw)
To: Weiwei Shu; +Cc: git
"Weiwei Shu" <shuww1980@gmail.com> writes:
> My first post in this mailing list. Could some one direct me to some
> document/manual pages to setup Git to treat ascii files as binary
> files? I'm using Git to do circuit schematics (SPICE files)
> versioning. I will not do any merging or editing stuff with external
> editors. The only way to change it is to use schematic capture GUIs
> (Cadence, ADS, etc). So I'd like to treat them as binary files to
> reduce the possibilities of messing them up.
>
> I know it seems a little bit stupid to use Git to do such an easy job.
> But hey, it's the most eye-catching SCM software, isn't it?
First, git does not modify files unless you have core.crlf set,
and even then it warns about irreversible transformations
(core.safecrlf)
Second, using gitattributes you can set diff driver and merge driver;
one of possibilities is to treat file as binary (binary diff and no
using 3-way file merge).
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to configure Git to treat certain type of ascii files as binary files
2008-10-22 22:40 ` Jakub Narebski
@ 2008-10-23 1:12 ` Weiwei Shu
0 siblings, 0 replies; 6+ messages in thread
From: Weiwei Shu @ 2008-10-23 1:12 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
Thanks Jakub. I'll read its manual and try to play with it. Thank all
for replies!
On Wed, Oct 22, 2008 at 5:40 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> "Weiwei Shu" <shuww1980@gmail.com> writes:
>
>> My first post in this mailing list. Could some one direct me to some
>> document/manual pages to setup Git to treat ascii files as binary
>> files? I'm using Git to do circuit schematics (SPICE files)
>> versioning. I will not do any merging or editing stuff with external
>> editors. The only way to change it is to use schematic capture GUIs
>> (Cadence, ADS, etc). So I'd like to treat them as binary files to
>> reduce the possibilities of messing them up.
>>
>> I know it seems a little bit stupid to use Git to do such an easy job.
>> But hey, it's the most eye-catching SCM software, isn't it?
>
> First, git does not modify files unless you have core.crlf set,
> and even then it warns about irreversible transformations
> (core.safecrlf)
>
> Second, using gitattributes you can set diff driver and merge driver;
> one of possibilities is to treat file as binary (binary diff and no
> using 3-way file merge).
>
> --
> Jakub Narebski
> Poland
> ShadeHawk on #git
>
--
Weiwei
--Hope Springs Eternal.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-23 1:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22 21:58 how to configure Git to treat certain type of ascii files as binary files Weiwei Shu
2008-10-22 22:13 ` david
2008-10-22 22:35 ` Weiwei Shu
2008-10-22 22:13 ` David Symonds
2008-10-22 22:40 ` Jakub Narebski
2008-10-23 1:12 ` Weiwei Shu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).