Files
git/builtin
Junio C Hamano 7ccc94ff45 check-ref-format --branch: strip refs/heads/ using skip_prefix
The expansion returned from strbuf_check_branch_ref always starts with
"refs/heads/" by construction, but there is nothing about its name or
advertised API making that obvious.  This command is used to process
human-supplied input from the command line and is usually not the
inner loop, so we can spare some cycles to be more defensive.  Instead
of hard-coding the offset strlen("refs/heads/") to skip, verify that
the expansion actually starts with refs/heads/.

[jn: split out from a larger patch, added explanation]

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-18 06:12:01 +09:00
..
2017-06-05 09:03:15 +09:00
2016-11-22 13:55:20 -08:00
2017-05-24 10:59:27 +09:00
2017-03-31 08:33:56 -07:00
2017-04-19 21:37:13 -07:00
2017-04-15 00:58:36 -07:00
2017-06-24 15:29:28 -07:00
2017-04-19 21:37:13 -07:00
2017-01-18 15:12:15 -08:00
2017-04-02 09:49:24 -07:00
2017-04-17 21:56:54 -07:00
2017-04-19 21:37:13 -07:00
2017-04-19 21:37:13 -07:00
2017-03-24 13:07:37 -07:00
2017-01-23 18:51:56 -08:00
2017-04-11 00:21:51 -07:00
2017-05-08 12:18:20 +09:00