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

Sometimes throws a strange error #78

Open
raszi opened this issue Jun 2, 2017 · 8 comments
Open

Sometimes throws a strange error #78

raszi opened this issue Jun 2, 2017 · 8 comments
Labels

Comments

@raszi
Copy link

raszi commented Jun 2, 2017

$ git fresh -f
Fetching origin
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From github.***:***/***
   b5a9630..36fb856  master     -> origin/master
Fetching ***
Fetching ***
Fetching ***
Deleted branch *** (was b01d5c1).
Deleted branch *** (was a9f8bb3).
[git-fresh] Error on line 263: fi
@imsky
Copy link
Owner

imsky commented Jun 6, 2017

interesting. it's not obvious what the problem is.

if you can reproduce it, let me know

@imsky imsky added the bug label Jun 6, 2017
@raszi
Copy link
Author

raszi commented Aug 22, 2017

Happened again. A bit differently on a clean repo after just simply hitting git fresh -f:

$ git fresh -f
c96ce8f583d4f2cd0353d73571565c79609c6842
warning: ignoring broken ref refs/heads/master.
warning: ignoring broken ref refs/heads/master.
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[git-fresh] Error on line 146: fi

@raszi
Copy link
Author

raszi commented Aug 22, 2017

I stopped using this script, since after this error I lost all my changes in the repository and the only thing I could do is to start from scratch and clone it out again.

@imsky
Copy link
Owner

imsky commented Aug 22, 2017

@raszi i've seen this happen where the ref is lost. can you provide details about your OS? i suspect it has something to do with file system conflicts.

your changes are not lost (git-fresh does not do anything destructive by default or with -f flag) - they should still be recoverable.

@raszi
Copy link
Author

raszi commented Sep 28, 2017

From the reported issue above I could not get back my repository only by cloning it again unfortunately.

@imsky
Copy link
Owner

imsky commented Sep 28, 2017

ok @raszi sorry to hear that

can you provide any details about your system? OS, bash version, file system, whether you're the only contributor to the Git repo, etc.

@raszi
Copy link
Author

raszi commented Sep 28, 2017

OS: macOS Sierra 10.12.6 (16G29)
bash: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
fs: hfs

I had multiple remote repositories from multiple contributors.

@imsky
Copy link
Owner

imsky commented Sep 28, 2017

thanks. i wonder if the "missing master HEAD ref recovery" is causing this issue...i've only ever seen it happen due to file system problems (and fairly crufty Git checkouts), e.g. race conditions between Git and the file system.

without a repro case, this is difficult to diagnose, but i'll keep an eye on it.

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

No branches or pull requests

2 participants