forked from git/git.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SoC-2022-Microprojects: remove --no-sort entry
- Loading branch information
Showing
1 changed file
with
0 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,25 +88,3 @@ worked on by asking on the mailing list before starting to work on it. | |
There should be only one kind of change per commit. For example if one | ||
of your commits indents test bodies with TABs, instead of spaces, then | ||
this should be the only kind of change in this commit. | ||
|
||
### Add --no-sort option for git-for-each-ref | ||
|
||
In "git for-each-ref", `ref_array_sort()` is used to sort ref_array with | ||
sorting options. Even if the user does not provide any `--sort` option, | ||
`ref_default_sorting()` will also provide the default sorting options with | ||
the sort key "refname". | ||
|
||
But it turns out that the ref_array we get through `filter_refs()` is | ||
already sorted by "refname". So providing a `--no-sort` option may | ||
improve the performance of git for-each-ref when we don't provide any | ||
sorting options on the command line. [thread](https://lore.kernel.org/git/[email protected]/), | ||
[thread](https://lore.kernel.org/git/[email protected]/) | ||
|
||
But the `--no-sort` option seems to be disabled in "git for-each-ref", | ||
see "NEEDWORK" hint in `parse_opt_ref_sorting()`. You may need a new | ||
list api to replace the original linked list implementation for ref_sorting. | ||
You can refer to the implementation of this patch: | ||
[thread](https://lore.kernel.org/git/e68635cda515a9cd504c1d7366e9c353ab2adb2e.1629882532.git.gitgitgadget@gmail.com/) | ||
|
||
You can use t/perf for performance testing between upstream and your patches. | ||
[t/perf/README](https://github.com/git/git/blob/master/t/perf/README) |