git for-each-ref: allow general objectsfor-each-object
commit209509d68842002031dd87f8ab19123711345316
authorMichael J Gruber <git@drmicha.warpmail.net>
Wed, 25 Jan 2012 14:27:21 +0000 (25 15:27 +0100)
committerMichael J Gruber <git@drmicha.warpmail.net>
Fri, 19 Jun 2015 07:28:31 +0000 (19 09:28 +0200)
tree4552045fb15c5410eb247671267fc6a128963e22
parent6397abdce8831f34ac73793bdc73f48511c6d798
git for-each-ref: allow general objects

Introduce an `--objects` option which makes git-for-each-ref into
git-for-each-object, i.e. the non-option arguments are treated as
general revision arguments specifying any object. In this mode,
the refname output field reproduces the revision argument:

git for-each-ref --objects v1.7.9-rc2 v1.7.9-rc2^{commit} v1.7.9-rc2^{tree}
eab05abaeb51531e11835aaa4c26564a1babebac tag    v1.7.9-rc2
bddcefc6380bd6629f3f12b5ffd856ec436c6abd commit v1.7.9-rc2^{commit}
3382700b2f37c2e6e243c04b8c87bab6f125ca98 tree   v1.7.9-rc2^{tree}

`git for-each-ref --objects` can be aliased to `git for-each-object`
internally or by the user later on.
Documentation/git-for-each-ref.txt
builtin/for-each-ref.c