chiark / gitweb /
git_get_ref: Move to Dgit.pm and reimplement
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 27 May 2015 20:28:39 +0000 (21:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 11:17:08 +0000 (12:17 +0100)
Use
  git for-each-ref --format=%(objectname) [r]efs/whatever

This pattern won't match literally as a prefix because a ref name
cannot contain [, so it must match according to fnmatch.  whatever
cannot contain fnmatch metacharacters because they're not valid in ref
names.

This is a better idiom because it might directly look up the ref in
question (although currently it probably doesn't).


No differences found