No announcement yet.

Error Git symlinks with OSFMount ramdisk

  • Filter
  • Time
  • Show
Clear All
new posts

  • Error Git symlinks with OSFMount ramdisk

    I work on Windows 7 Pro 64bit
    I use OSFMount 2.0 (1001) 64bit for windows 8 for work on ramdisk.
    I use Git for save work result to HDD (2 synchronized repo).
    I use windows ntfs symlinks and save it in git repo.

    Windows ntfs symlinks work fine on OSFMount ramdisk
    Windows ntfs symlinks work fine in Git
    But, Windows ntfs symlinks bad work in git repo on OSFMount ramdisk.

    I create simple example example.
    This example work on any HDD and Dataram RAMDisk V4_4_0_RC36.
    But work on OSFMount ramdisk with error:
    >E:\test_git_symlink>git clone -c core.symlinks=true repo.git repo_b
    >Cloning into 'repo_b'...
    >fatal: this operation must be run in a work tree
    >warning: Clone succeeded, but checkout failed.
    >You can inspect what was checked out with 'git status'
    >and retry the checkout with 'git checkout -f HEAD'

    Reproduction steps
    1) creqate empty OSFMount ramdisk
    2) create test folder test_git_symlink
    3) create bat file create_repo.bat, content bellow
    4) change first line in create_repo.bat to correct path
    5) execute create_repo.bat on admin rights
    6) last command must create repo_b with content or throw error "fatal: this operation must be run in a work tree"

    ================================================== ====
    ================================================== ====
    cd /D T:\test_git_symlink

    REM Create bare repo
    mkdir repo.git
    cd repo.git
    git init --bare
    git config --system core.symlinks true
    cd ..

    REM Create source repo
    mkdir repo_a
    cd repo_a
    mkdir src
    echo "text_a" >src\file.txt
    mklink file_link.txt src\file.txt
    git init
    git config --system core.symlinks true
    git add .
    git commit -m "add file.txt"
    git push --all ..\repo.git
    cd ..

    REM Create dest repo
    git clone -c core.symlinks=true repo.git repo_b

    ================================================== ====

  • #2
    We don't use GIT and don't really want to learn it and debug its behaviour.

    The error, "this operation must be run in a work tree" seems to have many causes which aren't related to the disk in use.

    If you think it really is the RAMDrive that has a problem, do you have scenario that shows a problem in an unambiguous way.


    • #3
      Git really exists a ticket on this issue
      there is something about using undocumented api IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH unsupported on ImDisk
      I will try to solve the problem with us.


      • #4
        OK, thanks for the additional information. Yes, it is totally possible some undocumented API calls never got implemented.
        You wouldn't think GIT would be need to call this type of obscure low level function.

        If you can give us a week or so, we can look into it and see what's required to support IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH.