Skip to content
This repository has been archived by the owner on Sep 8, 2018. It is now read-only.

git projects with --separate-git-dir don't get processed by git-diff #134

Closed
1 task done
karldw opened this issue Jun 7, 2017 · 1 comment
Closed
1 task done

Comments

@karldw
Copy link

karldw commented Jun 7, 2017

Prerequisites

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

  1. 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
  2. Repeat without separate-git-dir:
    git clone git@github.com:atom/git-diff.git git-diff2
  3. 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.

screenshot comparison

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.

@maxbrunsfeld
Copy link
Contributor

Closing this as a duplicate of #134.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants