Bug 10883 - git not works with GIT_DIR and repository without .git
Summary: git not works with GIT_DIR and repository without .git
Status: CLOSED NOTABUG
Alias: None
Product: Sisyphus
Classification: Development
Component: git (show other bugs)
Version: unstable
Hardware: all Linux
: P2 major
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-20 16:56 MSK by nbr
Modified: 2008-07-21 12:35 MSD (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nbr 2007-02-20 16:56:34 MSK
Git dishonours GIT_DIR where gitdir doesn't contain .git
at all. Note: git-repo-config core.bare false didn't help also.
Steps to Reproduce:
1.Make GIT_DIR pointing to some directory, not starting with "."
2.cd to some other dir
3.git-reset -hard
Actual Results:  
fatal: /usr/bin/git-reset cannot be used without a working tree.

Expected Results:  
some other tree filled with working dir contents
Comment 1 Dmitry V. Levin 2007-02-20 18:12:25 MSK
git-reset --hard cannot be used without a working tree.
When you specify GIT_DIR out of your working tree, git-reset
just fails to find it.