Comments (9)
I have attached the repo where I see the hang.
from dgit.
I downloaded the repo to look into it:
100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0 path2/file2
100644 0aa34cae68d0878578ad119c86ca2b5ed5b28376 0 path3/file3
100644 00fb5908cb97c2564a9783c0c64087333b3b464f 0 path3/subp3/file3
Seems like a relatively hard index for the recursive algorithm. There should probably be a (dgit) test case that covers it too.
from dgit.
That took longer than I care to admit for a fix that ended up being trivial, but I added test cases for this now, and it seems to be good.
from dgit.
Looks like an infinite loop. Is the repo from the git test suite or one that you created organically?
from dgit.
It's one of the ones from the git test suite. t0000-basic. Instructions are here: https://github.com/driusan/dgit/wiki/Verify-dgit-using-official-git-tests
from dgit.
I enabled an fmt.Printf statement that was commented out in git/writetree.go. It's getting stuck like this:
This name: path0
This name: path2/file2
This name: file3
This name: path2/file2
This name: path2/file2
This name: path2/file2
This name: path2/file2
This name: path2/file2
This name: path2/file2
...
Also, the recursion seems to be in a section where it says that it has found the end of the tree, it's just trying to get the SHA-1 hash.
from dgit.
It's recursing on line 139 but before it gets there it is hitting line 125
from dgit.
What are prefix and newprefix at line 139? Line 125 is supposed to ensure that at least 1 part of the path is always stripped off to prevent this loop. And in the index are there 1 or more than 1 files under path2? git ls-files -c -s
will tell you exactly what's in the index that it's trying to convert into a tree.
from dgit.
Here's what I get when I dump prefix and new prefix at line 139:
prefix: path3/path2 newprefix: path3/path2/path2
prefix: path3/path2/path2 newprefix: path3/path2/path2/path2
prefix: path3/path2/path2/path2 newprefix: path3/path2/path2/path2/path2
...
from dgit.
Related Issues (20)
- Add support for local configuration parameters specified using "-c" global option
- Add log support for -n and -format options HOT 4
- Enhance fetch subcommand with -f and multiple groups HOT 4
- Clone is freezing when cloning from one local repo to another HOT 3
- Freeze cloning from a local repository HOT 6
- Support for git fetch depth HOT 1
- Hierarchical tags and branches aren't working properly HOT 1
- Slice bounds out of range error while running the t5510-fetch tests
- Fetch is not fetching to a destination specified by the remote.<repoid>.fetch config HOT 6
- Panic while cloning repo HOT 7
- git library is noisy HOT 2
- Unable to push - object not found HOT 7
- go master branch not invoking dgit HOT 1
- Could not find origin/master HOT 9
- panic while adding .gitignore HOT 1
- Can not index inflated thin packs
- go get fails due to bitbucket HOT 2
- dgit clone breaks on ARM64 (seems to relate to broken assumptions about memory safety/locking?)
- Migrate from Travis to GitHub Actions HOT 1
- module is not pure Go
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgit.