Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show-ref not expected to return multiple results #2

Open
tucked opened this issue Oct 10, 2022 · 0 comments
Open

show-ref not expected to return multiple results #2

tucked opened this issue Oct 10, 2022 · 0 comments

Comments

@tucked
Copy link

tucked commented Oct 10, 2022

$ git stash push
No local changes to save
$ git log -n1
4fe079f85fb (HEAD, apache/trunk, apache/HEAD) HDFS-16795. Use secure XML parsers (#4979)
$ git -c advice.detachedHead=false checkout apache/trunk
HEAD is now at 4fe079f85fb HDFS-16795. Use secure XML parsers (#4979)
$ git branch --no-contains HEAD '--format=%(refname:short)'
$ git -c advice.detachedHead=false checkout '4fe079f85fb3d288f1b53a9f4668ad0025919e50
907ef6c2858dc42d83cc228d13409830a7d7b163'
error: pathspec '4fe079f85fb3d288f1b53a9f4668ad0025919e50
907ef6c2858dc42d83cc228d13409830a7d7b163' did not match any file(s) known to git
Traceback (most recent call last):
  File "/ifs/home/dtucker/.local/bin/git-rebase-branches", line 8, in <module>
    sys.exit(main())
  File "/ifs/home/dtucker/.local/pipx/venvs/git-rebase-branches/lib/python3.8/site-packages/git_rebase_branches.py", line 170, in main
    run(["git", "-c", "advice.detachedHead=false", "checkout", start], check=True)
  File "/ifs/home/dtucker/.local/pipx/venvs/git-rebase-branches/lib/python3.8/site-packages/git_rebase_branches.py", line 183, in run    return subprocess.run(command, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', '-c', 'advice.detachedHead=false', 'checkout', '4fe079f85fb3d288f1b53a9f4668ad0025919e50\n907ef6c2858dc42d83cc228d13409830a7d7b163']' returned non-zero exit status 1.
$ git show-ref --hash HEAD
4fe079f85fb3d288f1b53a9f4668ad0025919e50
907ef6c2858dc42d83cc228d13409830a7d7b163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant