From: Felipe Contreras Date: Sat, 28 Sep 2013 22:03:40 GMT Subject: [PATCH v2 15/44] ruby: request-pull: use native dwim_ref() Message-ID: <1380405849-13000-16-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1380405849-13000-1-git-send-email-felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras --- Notes: Our first real usage of the bindings doesn't look too different from what it would look like in C. In Ruby all variables are pointers to objects, and there's no concept of pointer to variables, so what in C looks like "ret1 = func(var, &ret2)", in Ruby looks like "ret1, ret2 = func(var)". git-request-pull.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-request-pull.rb b/git-request-pull.rb index 9d3e9ab..416f880 100755 --- a/git-request-pull.rb +++ b/git-request-pull.rb @@ -66,7 +66,7 @@ branch_name = branch_desc = nil usage unless base or url -headref = `git rev-parse -q --verify --symbolic-full-name "#{head}"`.chomp +_, _, headref = dwim_ref(head) if headref.start_with?('refs/heads') branch_name = headref[11..-1] -- 1.8.4-fc