Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

core.worktree #270

Closed
Closed

Description

@Keepun

core.worktree sets the path to the --git-dir :(

In 1.9.2-preview20140411 setting works, but the files will not open.

Activity

  1. Keepun commented on Oct 29, 2014

    @Keepun
    Author

    git gui:

    couldn't open ".git/HEAD": no such file or directory
    couldn't open ".git/HEAD": no such file or directory
        while executing
    "open [gitdir HEAD] r"
        (procedure "load_current_branch" line 4)
        invoked from within
    "load_current_branch"
        (procedure "repository_state" line 7)
        invoked from within
    "repository_state newType newHEAD newMERGE_HEAD"
        (procedure "rescan" line 9)
        invoked from within
    "rescan ui_ready"
        (procedure "do_rescan" line 2)
        invoked from within
    "do_rescan"
        ("after" script)
    
  2. dscho commented on Oct 29, 2014

    @dscho
    Member

    It does not seem like this is a Window-specific problem, or is it, @Keepun?

  3. Keepun commented on Oct 31, 2014

    @Keepun
    Author

    Window-specific

  4. Keepun commented on Oct 31, 2014

    @Keepun
    Author

    But the problem is probably in "git gui".
    "git status" shows a list of files.

  5. dscho commented on Oct 31, 2014

    @dscho
    Member

    Thanks-clarify

  6. Keepun commented on Nov 23, 2014

    @Keepun
    Author

    Bug in Git\libexec\git-core\git-gui.tcl:

    1266: set _gitdir [git rev-parse --git-dir]
    _gitdir = .git
    1335: if {[catch {cd $_gitworktree} err]} {
    Change PWD. But _gitdir is not an absolute path, and it depends on the PWD.
    

    And bug in:

    1278: if {$_gitdir eq "."} {
    1279:   set _gitdir [pwd]
    1280: }
    
    GIT_DIR=. git gui
    

    Atlassian SourceTree and GitExtensions can not work with core.worktree

    Temporary fix for Git GUI:

    git config --global alias.ngui '!git --git-dir=`pwd`/.git gui'
    git ngui
    
  7. dscho commented on Nov 24, 2014

    @dscho
    Member

    EEXPLANTOOSHORT

    ;-)

  8. dscho commented on Aug 25, 2015

    @dscho
    Member

    @Keepun I missed that you updated your very terse explanation. So now it looks as if your problem might be solved by extending

    if {$_gitdir eq "."} {
       set _gitdir [pwd]
    }

    to

    if {$_gitdir eq "."} {
       set _gitdir [pwd]
    } elseif ($_gitdir eq .git) {
       set _gitdir [pwd]/.git
    }

    If that fixes your problem, please report back and I will integrate the patch into Git for Windows 2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions