From: "tonka3100@gmail.com" <tonka3100@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: change the filetype from binary to text after the file is commited to a git repo
Date: Mon, 24 Jul 2017 22:34:43 +0200 [thread overview]
Message-ID: <1C78174C-36D7-44B6-92A9-8A77D12AC6D2@gmail.com> (raw)
In-Reply-To: <20170724203215.nnktj55xyvqfmcvj@sigill.intra.peff.net>
Thx jeff, i will try it tomorrow.
> Am 24.07.2017 um 22:32 schrieb Jeff King <peff@peff.net>:
>
> On Mon, Jul 24, 2017 at 10:26:22PM +0200, tonka3100@gmail.com wrote:
>
>>> I'm not sure exactly what you're trying to accomplish. If you're unhappy
>>> with the file as utf-16, then you should probably convert to utf-8 as a
>>> single commit (since the diff will otherwise be unreadable) and then
>>> make further changes in utf-8.
>
>> That was exactly what i'm searching for. The utf-16 back in the days
>> was by accident (thx to visual studio). So if the last commit and the
>> acutal change are both utf-8 the diff should work again. Just for my
>> understanding. Git just take the bytes of the whole file on every
>> commit, so there is no general problem with that, the size of the
>> utf-16 is just twice as big as the utf-8 one, is that correct?
>
> Right. The diff switching the encodings will be listed as "binary" (and
> you should write a good commit message explaining what's going on!), but
> then after that the changes to the utf-8 version will display as normal
> text. Git only looks at the actual bytes being diffed, not older
> versions of the file.
>
> -Peff
prev parent reply other threads:[~2017-07-24 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 5:11 change the filetype from binary to text after the file is commited to a git repo tonka tonka
2017-07-24 18:18 ` Jeff King
2017-07-24 19:02 ` tonka3100
2017-07-24 19:23 ` Jeff King
[not found] ` <DBBA7352-5276-4972-A437-F27F5F4C2641@gmail.com>
2017-07-24 20:32 ` Jeff King
2017-07-24 20:34 ` tonka3100 [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1C78174C-36D7-44B6-92A9-8A77D12AC6D2@gmail.com \
--to=tonka3100@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).