-
Notifications
You must be signed in to change notification settings - Fork 1k
Unable to update checked out version: fatal: reference is not a tree #484
Comments
If retrying worked, then it suggests a stale repo cache not getting updated like it should. That's a big 😢 - unfortunately, very difficult to reproduce. If you run into this again, please take as detailed notes as possible about what happened throughout the process; run all |
should not be that hard, me and my coworkers have seen that many times today, when it happens once it tends to keep happening for a while from our experience... I will try to do a -v if it happens again. |
awesome! well, for us anyway - if we can reproduce, we can fix. i'm sorry it's happening to you :/ keep us posted! |
I just saw this happen today. I pulled in the gps merge and suddenly Realize something is wrong:
I noticed that I have Then I remembered that dep has a cache! So I poked around in it:
Then I ran
Not sure if it's helpful but here's the cache reflog
I tried resetting the cache back to a point where it didn't have that commit anymore. Originally when I looked for the commit in the cache I got an error:
I'm missing the magic git calls to get back to that state. None of the branches or tags have that commit (--contains returns nothing) but |
Should be fixed now - thanks so much, @carolynvs 😄 |
We have been experiencing this as well:
Like @carolynvs, I had to mess with dep's cache. In my case, the culprit was a forked repository:
I had to add the forked branch and pull from it. |
whoa - this really shouldn't happen. could you please open a fresh issue, ideally including steps to reproduce? |
iam having the same problem.
|
there are a couple things that can cause that, but it's generally cache corruption 😢 . try
these are very different, unrelated questions - please, we need to deal with things one at a time. |
i think cache corruption is still happening.
i don't mind to clear manually for local development, but might be a noticeable issue for CI pipelines. |
that's with dep's latest master?
…On November 11, 2017 7:28:01 AM CST, Engin Dumlu ***@***.***> wrote:
i think cache corruption is still happening.
```
Solver wall times by segment:
b-gmal: 8.195051225s
b-list-pkgs: 3.525748667s
b-list-versions: 3.178189184s
b-source-exists: 670.437286ms
satisfy: 41.444956ms
unselect: 33.011194ms
select-atom: 23.776166ms
new-atom: 1.609525ms
backtrack: 1.474227ms
select-root: 988.551µs
b-deduce-proj-root: 497.385µs
add-atom: 172.254µs
other: 82.242µs
b-pair-rev: 35.447µs
b-matches: 29.491µs
b-pair-version: 3.502µs
TOTAL: 15.672551302s
ensure Solve(): No versions of golang.org/x/text met constraints:
master: unable to update checked out version: : command failed: [git
checkout 88f656faf3f37f690df1a32515b479415e1a6769]: exit status 1
master: unable to update checked out version: : command failed: [git
checkout 88f656faf3f37f690df1a32515b479415e1a6769]: exit status 1
```
```
~ cd ~/go/pkg/dep/sources/https---go.googlesource.com-text
https---go.googlesource.com-text (44f4f65) ✗ git checkout
88f656faf3f37f690df1a32515b479415e1a6769
(44f4f65) ✗ -!?
error: Your local changes to the following files would be overwritten
by checkout:
.gitignore
cases/cases.go
cases/gen.go
cases/tables.go
cases/tables_test.go
cases/trieval.go
collate/build/builder.go
collate/build/colelem_test.go
collate/build/contract.go
collate/collate.go
collate/tables.go
collate/tools/colcmp/colcmp.go
collate/tools/colcmp/icu.go
currency/common.go
currency/tables.go
encoding/charmap/charmap.go
encoding/charmap/charmap_test.go
encoding/charmap/maketables.go
encoding/charmap/tables.go
encoding/encoding_test.go
encoding/htmlindex/gen.go
encoding/htmlindex/htmlindex.go
encoding/htmlindex/tables.go
encoding/ianaindex/example_test.go
encoding/ianaindex/ianaindex.go
encoding/internal/identifier/identifier.go
encoding/internal/identifier/mib.go
encoding/japanese/all_test.go
encoding/japanese/eucjp.go
encoding/japanese/iso2022jp.go
encoding/japanese/shiftjis.go
encoding/korean/all_test.go
encoding/korean/euckr.go
encoding/simplifiedchinese/all_test.go
encoding/simplifiedchinese/gbk.go
encoding/simplifiedchinese/hzgb2312.go
encoding/traditionalchinese/all_test.go
encoding/traditionalchinese/big5.go
encoding/unicode/unicode_test.go
encoding/unicode/utf32/utf32_test.go
gen.go
internal/colltab/collelem.go
internal/export/idna/common_test.go
internal/export/idna/gen.go
internal/export/idna/gen_test.go
internal/export/idna/gen_trieval.go
internal/export/idna/idna.go
internal/export/idna/idna_test.go
internal/export/idna/tables.go
internal/export/idna/trie.go
internal/export/idna/trieval.go
internal/format/format.go
internal/gen/gen.go
internal/number/common.go
internal/number/decimal.go
internal/number/gen.go
internal/number/gen_common.go
internal/number/number.go
internal/number/number_test.go
internal/number/pattern.go
internal/number/pattern_test.go
internal/number/tables.go
internal/tables.go
internal/ucd/ucd.go
language/common.go
Please commit your changes or stash them before you switch branches.
error: The following untracked working tree files would be overwritten
by checkout:
README.md
date/data_test.go
date/gen.go
date/gen_test.go
date/tables.go
encoding/ianaindex/gen.go
encoding/ianaindex/ianaindex_test.go
encoding/ianaindex/tables.go
encoding/internal/enctest/enctest.go
feature/plural/common.go
feature/plural/data_test.go
feature/plural/example_test.go
feature/plural/gen.go
feature/plural/gen_common.go
feature/plural/message.go
feature/plural/message_test.go
feature/plural/plural.go
feature/plural/plural_test.go
feature/plural/tables.go
internal/catmsg/catmsg.go
internal/catmsg/catmsg_test.go
internal/catmsg/codec.go
internal/catmsg/varint.go
internal/catmsg/varint_test.go
internal/cldrtree/cldrtree.go
internal/cldrtree/cldrtree_test.go
internal/cldrtree/generate.go
internal/cldrtree/option.go
internal/cldrtree/testdata/test1/common/main/root.xml
internal/cldrtree/testdata/test1/output.go
internal/cldrtree/testdata/test2/common/main/en.xml
internal/cldrtree/testdata/test2/common/main/en_001.xml
internal/cldrtree/testdata/test2/common/main/en_GB.xml
internal/cldrtree/testdata/test2/common/main/root.xml
internal/cldrtree/testdata/test2/output.go
internal/cldrtree/tree.go
internal/cldrtree/type.go
internal/export/idna/example_test.go
internal/number/decimal_test.go
internal/number/format.go
internal/number/format_test.go
internal/number/roundingmode_string.go
Please move or remove them before you switch branches.
Aborting
https---go.googlesource.com-text (44f4f65) ✗
```
i don't mind to clear manually for local development, but might be a
noticeable issue for CI pipelines.
--
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub:
#484 (comment)
|
@sdboyer, release v0.3.2 |
@roadrunner we've got adaptive healing of basic problems like this in the latest tip, and it will be in the next release. if you could confirm it fixes your problem, that'd be lovely - but I'm 99% sure it will 😁 |
Ran into the same issue today. Glad to find this thread. Checked the cache. The source folder was in a "detached head" doing git checkout master then allowed everything to work smoothly.
|
I wonder why doesn't "dep ensure -update github.com/XXX/XXX" try to sync the repo in $GOPATH/pkg/dep/sources/https-github.1485827954.workers.dev/XXX/XXX if it complains that the revision(commit id) doesn't exist. |
I ran into the same issue today trying to The solution that worked for me was removing Dep Version
Dep Init Output
|
Happened to me again today. A coworker shared a new golang project. I did a git checkout, then dep ensure, and it failed.
I had to |
"failed to unpack tree object" is a surprising one - seems like deeper corruption than I've seen reported before. in general though, the only case I'm aware of us not automatically recovering from is when the target dir exists, but it's empty. we haven't fixed that yet just because it requires a bit of a refactor in the adaptive recovery logic. |
You understand the internals better than I do, but in the previous case it was a detached head. There was definitely stuff in there. I forgot about this thread so I didn't go into the subfolder to look today, but I would speculate something happened again with the status of the git repo in the dep sources folder. |
detached HEAD is also interesting - we've generally aimed the command set to not rely on any assumptions about that state, as it's one that we intentionally enter under a number of circumstances. would def be interested in repro steps, and/or a tarball of repo state when things go wrong 🙂 |
I can try to tarball everything in |
https://drive.google.com/file/d/12DBvgQO9P4Jj6XYXU7ZOYx72YF8RyADt/view?usp=sharing Here's a link to download my sources. You can see in the folder
Which yields
(Duplicating post as I posted it on the wrong issue yesterday.) |
thing is: b6670618482fee2e320b92c8aaabaa18d805ff20 exists and have been pushed, any hints?
I'm using dep from header, just updated it.
Edit
After some retries, it worked, yet that's an annoying bug...
The text was updated successfully, but these errors were encountered: