fatal: -L invalid empty range
- Dominant language
- Python
- Stars
- 319
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
### Reproduce
```
git deps HEAD^! -e 10.4 -c 0
```
### Result
```
fatal: -L invalid empty range
Traceback (most recent call last):
File "/usr/local/bin/git-deps", line 11, in
sys.exit(run())
File "/usr/local/lib/python2.7/dist-packages/git_deps/cli.py", line 141, in run
main(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/git_deps/cli.py", line 135, in main
cli(options, args)
File "/usr/local/lib/python2.7/dist-packages/git_deps/cli.py", line 119, in cli
detector.find_dependencies(rev)
File "/usr/local/lib/python2.7/dist-packages/git_deps/detector.py", line 122, in find_dependencies
self.find_dependencies_with_parent(dependent, parent)
File "/usr/local/lib/python2.7/dist-packages/git_deps/detector.py", line 147, in find_dependencies_with_parent
self.blame_hunk(dependent, parent, path, hunk)
File "/usr/local/lib/python2.7/dist-packages/git_deps/detector.py", line 172, in blame_hunk
blame = subprocess.check_output(cmd, universal_newlines=True)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['git', 'blame', '--porcelain', '-L', '620,+0', 'a92663ea5341053f2645a7fd5beba802b67f5372', '--', 'mysql-test/suite/versioning/r/alter.result']' returned non-zero exit status 128
Status: 1
```
What is `-L`? I don't see it in --help.
Please, don't show stack traces to user. It is quite user-unfriendly!
### Additional info
```
$ git remote get-url origin
git@github.com:tempesta-tech/mariadb
```
Contributor guide
Research direction
Reproduce the command shown in the issue, then inspect git_deps/detector.py around blame_hunk and git_deps/cli.py around cli and main. Trace how the empty -L range reaches git blame and how the resulting failure is presented. Done means the reproduction no longer exposes the reported stack trace and the command’s failure is handled in a user-friendly way.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100