Announcement

Collapse
No announcement yet.

Error Git symlinks with OSFMount ramdisk

Collapse
X
 
  • 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 2.19.1.windows.1 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 2.19.1.windows.1
    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'...
    >done.
    >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"


    ================================================== ====
    create_repo.bat
    ================================================== ====
    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

    pause
    ================================================== ====

  • #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.
    https://stackoverflow.com/questions/...in-a-work-tree
    https://stackoverflow.com/questions/...in-a-work-tree
    https://github.com/Requarks/wiki/issues/7

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

    Comment


    • #3
      Ok,
      Git really exists a ticket on this issue https://github.com/git-for-windows/git/issues/1405
      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.

      Comment


      • #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.

        Comment

        Working...
        X