From: Karl Brand <k.brand@erasmusmc•nl>
To: Michael J Gruber <git@drmicha•warpmail.net>
Cc: git@vger•kernel.org
Subject: Re: How to avoid the ^M induced by Meld and Git
Date: Wed, 12 Dec 2012 16:34:27 +0100 [thread overview]
Message-ID: <50C8A403.9050304@erasmusmc.nl> (raw)
In-Reply-To: <50C89B68.8090309@drmicha.warpmail.net>
On 12/12/12 15:57, Michael J Gruber wrote:
> Karl Brand venit, vidit, dixit 11.12.2012 13:33:
>> Esteemed Git users,
>>
>> What i do:
>>
>> 1. Create a script.r using Emacs/ESS.
>> 2. Make some modifications to script.r with the nice diff gui, Meld
>> 3. Commit these modifications using git commit -am "my message"
>> 4. Reopen script.r in Emacs/ESS to continue working.
>>
>> The lines added (&/edited ?) using Meld all end with ^M which i
>> certainly don't want. Lines not added/edited with Meld do NOT end with ^M.
>
> What happens if you leave out step 3? If the same happens then Meld is
> the culprit. (Unless you've set some special options, git does not
> modify your file on commit, so this can't be git related.)
>
Leaving out step 3. results in exactly the same thing. Thus Git doesn't
appear to be responsible for the ^M's. Thanks a lot for your effort on
this and my apologies for not taking the care to dissect this more
carefully as you suggested. Over to the Meld mailing list...
>> There are plenty of posts around about these being line endings used for
>> windows which can appear when working on a script under a *nix OS which
>> has previously been edited in a Windows OS. This is not the case here -
>> everything is taking place on Ubuntu 12.04.
>>
>> FWIW: the directory is being synced by dropbox; and in Meld, Preferences
>> > Encoding tab, "utf8" is entered in the text box.
>>
>> Current work around is running in a terminal: dos2unix /path/to/script.r
>> which strips the ^M's
>>
>> But this just shouldn't be necessary and I'd really appreciate the
>> reflections & advice on how to stop inducing these ^M's !
>>
>> With thanks,
>>
>> Karl
>>
>> (re)posted here as suggested off topic at SO:
>> http://stackoverflow.com/questions/13799631/create-script-r-in-emacs-modify-with-meld-git-commit-reopen-in-emacs-m
>>
>
--
Karl Brand
Dept of Cardiology and Dept of Bioinformatics
Erasmus MC
Dr Molewaterplein 50
3015 GE Rotterdam
T +31 (0)10 703 2460 |M +31 (0)642 777 268 |F +31 (0)10 704 4161
next prev parent reply other threads:[~2012-12-12 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 12:33 How to avoid the ^M induced by Meld and Git Karl Brand
2012-12-12 14:57 ` Michael J Gruber
2012-12-12 15:34 ` Karl Brand [this message]
2012-12-12 16:08 ` Michael J Gruber
2012-12-12 16:17 ` Karl Brand
2012-12-14 13:45 ` Karl Brand
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=50C8A403.9050304@erasmusmc.nl \
--to=k.brand@erasmusmc$(echo .)nl \
--cc=git@drmicha$(echo .)warpmail.net \
--cc=git@vger$(echo .)kernel.org \
/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