Files
git/builtin
Jeff King ffddfc6328 rev-parse: simplify parsing of ref options
All of these options do the same thing "--foo" iterates over
the "foo" refs, and "--foo=<glob>" does the same with a
glob. We can factor this into its own function to avoid
repeating ourselves.

There are two subtleties to note:

  - the original called for_each_branch_ref(), etc, in the
    non-glob case. Now we will call for_each_ref_in("refs/heads/")
    which is exactly what for_each_branch_ref() did under
    the hood.

  - for --glob, we'll call for_each_glob_ref_in() with a
    NULL "prefix" argument. Which is exactly what
    for_each_glob_ref() was doing already.

So both cases should behave identically, and it seems
reasonable to assume that this will remain the same. The
functions we are calling now are the more-generic ones, and
the ones we are dropping are just convenience wrappers.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-15 14:02:36 -07:00
..
2016-12-21 14:55:01 -08:00
2016-11-22 13:55:20 -08:00
2017-02-02 13:36:55 -08:00
2016-09-29 15:42:18 -07:00
2017-01-30 14:17:00 -08:00
2017-01-30 14:17:00 -08:00
2016-09-29 15:42:18 -07:00
2016-10-10 14:03:50 -07:00
2016-09-26 16:09:17 -07:00
2016-11-22 13:13:16 -08:00
2016-12-27 00:11:41 -08:00
2016-09-29 15:42:18 -07:00
2017-01-18 15:12:15 -08:00
2016-09-29 15:42:18 -07:00
2017-01-31 13:14:56 -08:00
2015-10-05 13:20:08 -07:00
2016-10-03 12:46:47 -07:00
2017-01-23 18:51:56 -08:00
2017-01-31 13:14:58 -08:00