Merge branch 'jk/for-each-ref-multi-key-sort-fix'

"git branch" and other "for-each-ref" variants accepted multiple
--sort=<key> options in the increasing order of precedence, but it
had a few breakages around "--ignore-case" handling, and tie-breaking
with the refname, which have been fixed.

* jk/for-each-ref-multi-key-sort-fix:
  ref-filter: apply fallback refname sort only after all user sorts
  ref-filter: apply --ignore-case to all sorting keys
This commit is contained in:
Junio C Hamano
2020-05-08 14:25:04 -07:00
6 changed files with 104 additions and 11 deletions

View File

@ -70,7 +70,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
if (!sorting)
sorting = ref_default_sorting();
sorting->ignore_case = icase;
ref_sorting_icase_all(sorting, icase);
filter.ignore_case = icase;
filter.name_patterns = argv;