Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Enforcing autocrlf=false

Hi,

I also think that we should add the possibility to specify config parameters when doing clone. You described the problem with core.autocrlf and I saw use-cases where it was needed to specify http.proxy.

But maybe for your use case there is a little bit better solution. Use CloneCommand to clone the repo but prevent a checkout with setCheckout(false). After cloning set the config as described about and then checkout. You don't have to deal with explicit RemoteAdd commands in that case.

A little bit on how JGit (and also native git) handles core.autocrlf: the core.autcrlf parameter doesn't influence the transport commands "git push", "git fetch" commands. This config parameter is relevant only when reading content from the working tree or writing content to the working tree (which neiter fetch or push do).
- Reading from the working tree happens when add new content from the working tree to git's objects store during the "git add" command. There is also "git commit -a" which implicitly calls a "git add" and is therefore also influenced by this parameter. Also commands like "git status" have to deal with this parameter when they read from the working tree and compare it to what you have in the index.
- Writing to the working tree happens when your working tree files are updated by doing a "git checkout". Since the clone command or the pull command also do checkouts after they have done the transport work they are also influenced.

Ciao
  Chris





 



Ciao
  Chris

Back to the top