byplayer / egg

Emacs Got Git. This is a clone of Marius's excellent magit. Egg is an emacs interface to git.
bogolisk.blogspot.com
97 stars 20 forks source link

Possible bug with CR in merge filename #53

Open garyo opened 12 years ago

garyo commented 12 years ago

Unfortunately I don't know how I got into this situation, but today I got egg into a state where it stopped working, because of an extra CR (^M) in one of the .git/rebase-merge/* files. Egg failed to parse the branch name "topic/foo^M" (where ^M was a real CR in the actual file) as a rev.

I wonder if egg-file-as-string should strip CRs, at least on Windows?

bogolisk commented 11 years ago

I think the bug is: egg uses insert-file-contents-literally() instead of insert-file-contents(). We'll have to audit all the occurrences of insert-file-contents-literally() to see if it makes sense or not to convert them to insert-file-contents().

bogolisk commented 11 years ago

I've just looked through the code and realized that all the calls to insert-file-contents-literally should be changed to insert-file-contents.