Comments (8)
same here
from githacker.
Thanks for reporting, I will check it out soon.
from githacker.
Could you please provide the .git/HEAD
file? It seems that there is a corner case that GitHacker didn't handle correctly. @LeandroVCastro @JacobOzn
from githacker.
Currently, GitHacker parses the .git/HEAD
file to get the current branch name using the RegExp (ref: refs/heads/([a-zA-Z\d_-]+)
). GitHacker asserts that the number of current branch name equals 1 (see code).
The content of .git/HEAD
file will be like the following block by default.
ref: refs/heads/master
But when the git repo checkouts to some commit (say c768909c5199e94b13d2bae023986a6817df840d
), the content of .git/HEAD
file will be like:
c768909c5199e94b13d2bae023986a6817df840d
Under that circumstance, the RegExp can not match any result, so the assertion will fail.
I will try to figure out how to fix this issue. Thanks a lot for reporting this bug.
from githacker.
I pushed a hotfix to remedy this bug.
Please check it out.
pip install -U git+https://github.com/WangYihang/GitHacker
from githacker.
I pushed a hotfix to remedy this bug.
Please check it out.
pip install -U git+https://github.com/WangYihang/GitHacker
not work too.
Traceback (most recent call last):
File "/home/xx/.local/bin/githacker", line 8, in
sys.exit(main())
File "/home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py", line 475, in main
result = GitHacker(
File "/home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py", line 77, in init
self.complete_basic_files_list()
File "/home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py", line 322, in complete_basic_files_list
branch_names += self.parse_current_branch_name()
File "/home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py", line 284, in parse_current_branch_name
assert len(branch_names) == 1
AssertionError
from githacker.
@yyg12345678910, thanks for reporting.
It sees that your /home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py
file is not equivalent to the file https://github.com/WangYihang/GitHacker/blob/master/GitHacker/__init__.py
in latest master branch.
File "/home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py", line 284, in parse_current_branch_name
assert len(branch_names) == 1
See the latest code in line 284.
assert len(branch_names) <= 1
I will release the fixed version soon. Before that, please use the following command to reinstall GitHacker, sorry for the inconvenience.
pip uninstall GitHacker
git clone https://github.com/WangYihang/GitHacker
cd GitHacker/
pip install -r requirements.txt
python setup.py install
from githacker.
Related Issues (20)
- 未找到命令 HOT 8
- 如何在 docker 中找回进程 HOT 11
- Support git pack file HOT 1
- UnicodeDecodeError: 'utf-8' codec can't decode HOT 5
- Disable SSLCertVerification? HOT 7
- python: can't open file 'GitHacker.py': [Errno 2] No such file or directory HOT 2
- 当前分支若不为master将出现错误、多分支不会全部被克隆 HOT 2
- 在win10中无法在创建文件夹 HOT 2
- Support exploiting multiple urls HOT 1
- Vulnerabilities reported by Justin Steven
- git log not compelete in master branch HOT 2
- git log -relog 版本不全 HOT 6
- Infinit downloading 404 files (Deny of Service) HOT 2
- IsADirectoryError: [Errno 21] Is a directory: '/tmp/tmpqouh7cck/.git/objects/pack' HOT 2
- AssertionError: Invalid index file header: b'cons' HOT 2
- Git-dumper and dvcs-ripper appears twice on readme HOT 4
- use python3 version
- No such file or directory HOT 6
- error after success message HOT 12
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 githacker.