Sign inSign up

douglasnaphas/gitsource

By douglasnaphas

Updated about 8 years ago

Compiled Git source on Fedora

Image
0

144

douglasnaphas/gitsource repository overview

This image has Git source and the prerequisites necessary to compile it on Fedora.

You can use this image to check whether a bug in Git that you've found has been fixed.

For example, I made this image because the --git-dir option to git didn't work on my Mac if I used = to specify the option's value.

On my Mac:

$ git --git-dir ~/repos/configs/.git --work-tree ~/repos/configs status
On branch master
Your branch is ahead of 'pencils/master' by 4 commits.
  (use "git push" to publish your local commits)
nothing to commit, working tree clean

$ git --git-dir=~/repos/configs/.git --work-tree ~/repos/configs status
fatal: Not a git repository: '~/repos/configs/.git'

$ git --version
git version 2.13.5 (Apple Git-94)

$ man git | grep -A 3 "git-dir=<path>$"
       --git-dir=<path>
           Set the path to the repository. This can also be controlled by
           setting the GIT_DIR environment variable. It can be an absolute
           path or relative path to current working directory.

Using this image to see if --git-dir=<path> works at the head of Git's master branch:

$ docker run -it douglasnaphas/gitsource /bin/bash
[root@adff2e1752d8 /]# update-git.sh
...(Git compiles)...
[root@adff2e1752d8 /]# cd /usr/local/src/git
[root@adff2e1752d8 git]# git --git-dir=/usr/local/src/git/.git --work-tree /usr/local/src/git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
[root@adff2e1752d8 git]# git --version
git version 2.18.0.129.ge3331758f
[root@adff2e1752d8 git]# git log --pretty="%h" -1 origin/master
e3331758f
[root@adff2e1752d8 git]# exit
exit

Compilation instructions based on https://gist.github.com/samrocketman/8671036.

Source repo for this Dockerfile: https://github.com/douglasnaphas/gitsource.

Tag summary

Content type

Image

Digest

Size

610 MB

Last updated

about 8 years ago

docker pull douglasnaphas/gitsource