aspiers / aspiers/git-deps

Stack dump testing paramiko 2.2.3 against 56c96a65

Open
#79 1 comment 0 reactions 0 assignees View on GitHub
bug easy
Dominant language
Python
Stars
319
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Running these commands

```
git clone https://github.com/paramiko/paramiko.git
cd paramiko
git checkout -b my2.2.3 2.2.3
git tag to-backport 56c96a65
git deps -r -e my2.2.3
```

I get

```
Fatal: -L invalid line number: 0
Traceback (most recent call last):
File "/usr/bin/git-deps", line 10, in
sys.exit(run())
File "/usr/lib/python3.6/site-packages/git_deps/cli.py", line 141, in run
main(sys.argv[1:])
File "/usr/lib/python3.6/site-packages/git_deps/cli.py", line 135, in main
cli(options, args)
File "/usr/lib/python3.6/site-packages/git_deps/cli.py", line 119, in cli
detector.find_dependencies(rev)
File "/usr/lib/python3.6/site-packages/git_deps/detector.py", line 122, in find_dependencies
self.find_dependencies_with_parent(dependent, parent)
File "/usr/lib/python3.6/site-packages/git_deps/detector.py", line 147, in find_dependencies_with_parent
self.blame_hunk(dependent, parent, path, hunk)
File "/usr/lib/python3.6/site-packages/git_deps/detector.py", line 172, in blame_hunk
blame = subprocess.check_output(cmd, universal_newlines=True)
File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib64/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'blame', '--porcelain', '-L', '0,+0', '20b69e7735e8c7e8bf63ee4df2c6a6b34743e646', '--', 'tests/__init__.py']' returned non-zero exit status 128.
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the listed git clone, checkout, tag, and git deps commands. Start in git_deps/cli.py and git_deps/detector.py, then inspect how tests/__init__.py produces the `-L 0,+0` blame range. Done means the command no longer exits with the invalid line-number error.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.