git projects with --separate-git-dir don't get processed by git-diff
karldw opened this issue · 1 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When a git directory is initialized with --separate-git-dir
(as an option to git init
or git clone
), git creates a .git file pointing to the repository location. It would be a nice feature if git-diff followed that pointer to perform diffs with the actual git repo.
Steps to Reproduce
- Initialize a git repository with a separate repo directory:
git clone --separate-git-dir=$HOME/separated_git-diff git@github.com:atom/git-diff.git git-diff1
- Repeat without separate-git-dir:
git clone git@github.com:atom/git-diff.git git-diff2
- Open the projects in Atom:
atom git-diff1 git-diff2
Expected behavior:
The two projects look and act the same.
Actual behavior:
The one with a separated git dir, git-diff1, is treated as a folder with no git repo.
In the screenshot below, I've added a line to the coffeelint file in both repos, but only git-diff2 has color.
Reproduces how often:
100% of the time.
Versions
Atom: 1.17.2
Electron: 1.3.15
Chrome: 52.0.2743.82
Node: 6.5.0
apm: 1.17.0
npm: 3.10.5
python 3.6.1
git: 2.13.0.windows.1
visual studio
Windows: 10
Additional Information
Related to atom/atom#2203
I used git bash for the command line steps, but the result is the same in git cmd.
Closing this as a duplicate of #134.