freshshell/fresh

Full repo with ref is broken

steakunderscore opened this issue · 3 comments

I have the following in my freshrc:

fresh creationix/nvm . --file=~/.nvm/ --ref=v0.30.2

Which appears to break fresh giving the following output

root@518be8f14404:~/.dotfiles# fresh
Current branch master is up to date.
Cloning into '/root/.fresh/source/creationix/nvm'...
remote: Counting objects: 4374, done.
remote: Total 4374 (delta 0), reused 0 (delta 0), pack-reused 4374
Receiving objects: 100% (4374/4374), 1.08 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (2569/2569), done.
Checking connectivity... done.
fatal: Path '"test/fast/Aliases/Running "nvm alias " again should change the target"' does not exist in 'v0.30.2'

I have reproduced this in a clean Ubuntu docker image, with everything commented out apart from fresh itself and the nvm line above.

Also note, removing the --ref flag, fresh works fine.

A couple of thoughts so far, it seems that _file_list() is returning relative paths for when a --ref flag is passed. But when there is no --ref flag, the full paths are returned.

Another possibility is that there are double quotes in the file names :(. They could perhaps be causing problems.

I have tracked this down to some bad escaping of double quotes in the file name which is breaking line289

When git show "$REF:$SOURCE_FILE" is passed a $SOURCE_FILE with double quotes I think it is being interpreted wrong by git.

i am now seeing full repos failing if --ref="branchname" but working with --ref="commitid"