From: Junio C Hamano <gitster@pobox•com>
To: Martin Pettersson <martin@siamect•com>
Cc: git@vger•kernel.org
Subject: Re: Git with Lader logic
Date: Fri, 27 Mar 2015 08:39:19 -0700 [thread overview]
Message-ID: <xmqqegoawiu0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <loom.20150327T160645-181@post.gmane.org> (Martin Pettersson's message of "Fri, 27 Mar 2015 15:09:15 +0000 (UTC)")
Martin Pettersson <martin@siamect•com> writes:
> I use Git for versioning PLC program written for Beckhoff TwinCAT v2 that
> saves the files in binary format.
> You can probably do the same for most other systems as well.
>
> My way of doing it is...
> I have a batch file that starts TwinCAT including a file that tell Twincat to
> open my PLC program and export it into a text based format.
> After that the script opens git gui and gitk.
>
> I have one script like this for each plc program.
> It is quite effcient, the whole procedure only takes a double click and
> less than 10 seconds and you have git gui up and you can see your
> changes in pure text, commit and push.
> I commit both the exported text files and the binary because the binary
> is the one I edit.
> This has been working very well for many years....
Let me check if I got your scheme correctly.
- You need to track PLC program files, whose native format is
binary and is not very amenable to textual processing like diff
and merge
- But you can tell TwinCat to export that binary file to text (and
presumably you can tell TwinCat to read that exported text file),
and the text format is human-readable.
- You use a script that calls TwinCat to export the binary into
text as a clean filter, and what is checked into Git is the
exported text representation.
- You use another script that calls TwinCat to convert the exported
text back to the binary as a smudge filter, and what is checked
out to the working tree is the native binary format file.
Is that what is going on? I can imagine how that arrangement would
work (after all, that is how clean/smudge filters are designed to be
used).
Thanks.
next prev parent reply other threads:[~2015-03-27 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 23:33 Git with Lader logic Bharat Suvarna
2015-03-18 11:29 ` Kevin D
2015-03-18 19:53 ` Randall S. Becker
2015-03-18 22:28 ` Doug Kelly
2015-03-18 22:38 ` Randall S. Becker
2015-03-19 7:14 ` Bharat Suvarna
2015-03-19 21:17 ` Kevin D
2015-03-27 15:09 ` Martin Pettersson
2015-03-27 15:39 ` Junio C Hamano [this message]
2015-03-27 16:32 ` Martin Pettersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqegoawiu0.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=martin@siamect$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox