gnucash git line endings (CR/LF)?

John Ralls jralls at ceridwen.us
Mon Jul 1 13:01:53 EDT 2013


On Jul 1, 2013, at 9:29 AM, Geert Janssens <janssens-geert at telenet.be> wrote:

> On 01-07-13 18:02, Derek Atkins wrote:
>> John,
>> 
>> On Mon, July 1, 2013 11:47 am, John Ralls wrote:
>> [snip]
>> 
>>>> What are the contents of your ~/.gitconfig?  Mine are:
>> [snip]
>> 
>>> Geert probably has autocrlf=input in his ~/.gitconfig, and you should,
>>> too. See
>>> https://help.github.com/articles/dealing-with-line-endings#platform-all .
>> That must be it.  I just ran:
>> 
>> git config --global core.autocrlf input
>> 
>> which added this to my .gitconfig:
>> 
>> [core]
>> 	autocrlf = input
>> 
>> and then I did a new local clone and it worked as expected:
>> 
>> [warlord at mocana gnucash]$ rm -rf gnucash-trunk
>> [warlord at mocana gnucash]$ git clone --local -b trunk gnucash.git
>> gnucash-trunk
>> Cloning into 'gnucash-trunk'...
>> done.
>> [warlord at mocana gnucash]$ cd gnucash-trunk
>> [warlord at mocana gnucash-trunk]$ git st
>> # On branch trunk
>> nothing to commit, working directory clean
>> [warlord at mocana gnucash-trunk]$
>> 
>> Thanks.
>> 
>> So I think I have my gnucash setup mostly up to date to how I want to work
>> for now..  I've got a bare (mirrored) repo from which I will fetch updates
>> from git, then I will git-update in my separate branch WCs where I want
>> will do my work and from those WCs I'll perform the dcommit.  It does mean
>> I need to svn init in each WC, but that's relatively minor, I think.
>> 
>> For my work system, however, there is no intermediate repo so I'll have a
>> master git-svn repo and then do local git clones from that for my WCs,
>> which means I'll need to commit back to my master repo and then dcommit
>> from there.
>> 
>> It kinda sucks that I have to work this way, but I don't want to be able
>> to have multiple branches checked out at all times, which means I need
>> some additional repo that I'm willing to constantly change the working
>> branch in order to dcommit.
>> 
>>> Regards,
>>> John Ralls
>> -derek
>> 
> Nice!
> 
> So the only thing missing in the wiki is probably the setup of core.autcrlf = input before cloning any repo.

Except on M$Win, where it should be core.autocrlf = true (according to Github, anyway) unless one uses an
editor like emacs which respects line endings and is really careful when creating new files to set unix line endings
except for windows cmd.exe scripts.

Regards,
John Ralls




More information about the gnucash-devel mailing list