Menu

Package msys/git 1.8.5.2-1 problems

2014-01-12
2016-04-26
  • Matthieu Vachon

    Matthieu Vachon - 2014-01-12

    Hi,

    I have some problems with the current git package from msys
    repository. I have two different ones, that are separate issues but
    could potentially be related.

    Cannot open git gui

    When I run the git gui command, I hit a Tcl error about a missing
    function, the offending call is "bitmap
    /usr/share/git-gui/lib/git-gui.ico" and the full error message is:

    bitmap "/usr/share/git-gui/lib/git-gui.ico" not defined while executin
    
    "wm iconbitmap . -default $oguilib/git-gui.ico"
      invoke from within
    
    "if {[is_Windows]} {
                 wm iconbitmap . -default $oguilib/git-gui.ico
                 set ::tk::AlwaysShowSelection 1
                 bind . <Control-F2> {console show}
    
                 # Spoof an X ..."
      (file "C:/Msys/lib/git-core/git-gui" line 747)
    

    I tried removing the offending line (i.e. wm iconbitmap . -default $oguilib/git-gui.ico) and it pass the original error point but
    another one is then thrown:

    "couldn't open "/usr/share/git-gui/lib/tclIndex": no such file or directory.
    

    This seems to be a path transformation problem because the file is
    accessible from the shell:

    $ file /usr/share/git-gui/lib/tclIndex
    /usr/share/git-gui/lib/tclIndex: ASCII text
    

    Git clone from local absolute path to local absolute path

    This problem seems to be a path problem and I hit it using ruby to
    install a bundle (using the bundler gem). When bundle install is
    called on a project for which there is a dependency on a git
    repository, the command bundler will first clone the repository to a
    system wide cache and then make a clone of the cached repository. The
    git command used is something like:

    git clone --no-checkout "C:/the/repository/cache/path"
    

    "C:/the/clone/target/path"

    But it generates the following error using the msys/git package:

    Cloning into 'C:/the/clone/target/path'...
    ssh: Could not resolve hostname C: Name or service not known
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists
    

    And it creates a folder named "C:" in the folder where I execute the
    command. And if manually run the command to check, it results instead
    in:

    > ~/Work/ruby/nugrant
    $  git clone --no-checkout "C:/the/repository/cache/path"
    

    "C:/the/clone/target/path"
    Cloning into 'C:/the/clone/target/path'...
    fatal: '/c/Users/Matt/Work/ruby/nugrant/C:/the/repository/cache/path'
    does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    

    Which is different than the previous error message. It seems to be a
    path translation problem, maybe the git clone command thinks it's a
    relative path to the current directly or the problem may be elsewhere.

    As a reference, for both command, it works using git version 1.8.5.2.msysgit.0 from the msysgit project.

    Regards,
    Matt

     
  • -

    - - 2015-01-29

    I have the same problem... tcl/tk seems to think /usr relative to the drive root.

     
  • Alexx83

    Alexx83 - 2015-02-12

    Are you sure you use MSYS2?
    MSYS2 have it's own git package. Don't use git from msysgit under MSYS2.

     

    Last edit: Alexx83 2015-06-25
  • shlinux

    shlinux - 2015-06-25

    Same Problem.
    I use MSYS2's own git package and mingw-w64-x86_64-tk.

     
  • Alexx83

    Alexx83 - 2015-06-25

    This is because git is msys-program that work with unix paths, while tcl/tk is mingw-program and it not understand unix paths. All native Win32 programs when try open any unix path decide that this is relative path from system disk

     

    Last edit: Alexx83 2015-06-25
  • Alexx83

    Alexx83 - 2015-06-25

    As workaround you can edit /usr/lib/git-core/git-gui and replace UNIX path with full Windows path.
    For me, for example, I change:
    set oguilib {/usr/share/git-gui/lib}
    to
    set oguilib {c:/msys64/usr/share/git-gui/lib}

     
    • shlinux

      shlinux - 2015-06-25

      OK. Thanks.

       
    • WaffleSouffle

      WaffleSouffle - 2015-12-18

      It does check for an environment variable so I'm successfully running like this:
      GIT_GUI_LIB_DIR=/c/msys64/usr/share/git-gui/lib git gui &
      GIT_GUI_LIB_DIR=/c/msys64/usr/share/git-gui/lib gitk &

       
  • Jay Satiro

    Jay Satiro - 2016-04-26

    I notice this is still an issue in msys2. Fortunately WaffleSouffle's workaround works for me. Any chance this will be fixed in msys2?