You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require 'git'
g = Git.clone("https://github.com/ruby-git/ruby-git","/tmp/github.com/ruby-git/ruby-git")
g.branches.remote.first.gcommit.sha
Expected behaviour
Return the sha of the commit from branch master
Actual behaviour
Git::GitExecuteError (git '--git-dir=/tmp/github.com/ruby-git/ruby-git/.git' '--work-tree=/tmp/github.com/ruby-git/ruby-git' '-c' 'color.ui=false' rev-parse 'remotes/origin/HEAD -> origin/master' 2>&1:fatal: ambiguous argument 'remotes/origin/HEAD -> origin/master': unknown revision or path not in the working tree.)
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
remotes/origin/HEAD -> origin/master
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Subject of the issue
First remote branch
HEAD -> origin/master
is a special case and failsgcommit.sha
So something like this fails on first iteration
Your environment
Steps to reproduce
Expected behaviour
Return the sha of the commit from branch master
Actual behaviour
The text was updated successfully, but these errors were encountered: