Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full repo with ref is broken #135

Open
steakunderscore opened this issue Feb 14, 2016 · 3 comments
Open

Full repo with ref is broken #135

steakunderscore opened this issue Feb 14, 2016 · 3 comments

Comments

@steakunderscore
Copy link

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.

@steakunderscore
Copy link
Author

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.

@steakunderscore
Copy link
Author

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.

steakunderscore added a commit to steakunderscore/fresh that referenced this issue Feb 14, 2016
Having a `"` (double quote) or `$` (dollar) character in a file name of
a fresh source breaks when using the `--ref` flag. Work around is to strip
the double quotes from the string ends then escape the `$` and `"`
characters.

[issue/135](freshshell#135)
steakunderscore added a commit to steakunderscore/fresh that referenced this issue Feb 14, 2016
Having a `"` (double quote) or `$` (dollar) character in the file name
in a git repo of a fresh source breaks when using the `--ref` flag. Work
around is to strip the double quotes from the string ends then escape
the `$` and `"` characters.

[issue/135](freshshell#135)
@rosenstrauch
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants