Search code examples
gitcygwin

How can I tell Cygwin that a dependency was built from source?


I'm using Git with Cygwin (I prefer Cygwin to Mingw, and I do not grok PoshGit).

Unfortunately, the version of Git available on Cygwin repository is kind of old (1.7.9-1). So I built git 1.8 from source (which btw was in fact not so hard as I thought it would be, but I digress).

The only problem is that the Cygwin setup does not become "aware" that Git is already installed. If I try to install some package that depends on Git (for instance, Tig), the Cygwin setup will tell me that it needs to install Git.

Is there any way to fix that? Can I inform, somehow, that Git is already installed, and that the Cygwin setup should try to use that to resolve any dependency on the Git package?


Solution

  • Had the same problem. Instead of installing a package for git-completion, there is another way to do it. Download the git-completion.bash file from https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash, put it in /etc/bash_completion.d/ directory, rename the file to "git" and restart Cygwin. You get git completion (assuming you have bash-completion installed already) without any dependencies. The disadvantage is that you don't have auto update for this file, but the Cygwin version is more ancient anyway.