Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom GIT_DIR is not respected when starting git-cola #1233

Open
sergei-dyshel opened this issue May 26, 2022 · 2 comments
Open

Custom GIT_DIR is not respected when starting git-cola #1233

sergei-dyshel opened this issue May 26, 2022 · 2 comments

Comments

@sergei-dyshel
Copy link
Contributor

Steps to reproduce:

# run in blank dir

export GIT_DIR=.gitgit
export GIT_WORK_TREE=.

# create empty repo
git init

ls
# => should show .gitgit

git status
# => should not error, git respects these variables

git-cola
# doesn't recognize the repo  in current dir, shows repo chooser dialog instead

This kind of breaks git-cola for custom .git dirs, although all the machinery is there (in git.py).

@sergei-dyshel
Copy link
Contributor Author

seems to be solved by sergei-dyshel@2607799

@davvid
Copy link
Member

davvid commented May 27, 2022

That commit does seem sensible. We did intend to support custom GIT_DIR and GIT_WORK_TREE settings.

There might be a few places (which I think you already found) where .git might be hard-coded but I'd be happy to take patches that trim those away.

There is one wrinkle when running in that mode ~ doing things like trying to open a different repository may behave unexpectedly / incorrectly, but that's acceptable as long as the single-repo use case is kept working when a custom GIT_DIR is being used.

Thanks for digging into these edge cases, that's really helpful.

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

No branches or pull requests

2 participants