diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-30 14:04:11 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-30 14:04:11 +0900 |
commit | ab48bc0aeadd7f6b661bc125a913e1c7d145cd5e (patch) | |
tree | 98bbbcf8dd2e210de83c71b2aecc508e9e7ba395 /Documentation | |
parent | Merge branch 'jt/partial-clone-proto-v2' (diff) | |
parent | get_short_oid: sort ambiguous objects by type, then SHA-1 (diff) | |
download | tgif-ab48bc0aeadd7f6b661bc125a913e1c7d145cd5e.tar.xz |
Merge branch 'ab/get-short-oid'
When a short hexadecimal string is used to name an object but there
are multiple objects that share the string as the prefix of their
names, the code lists these ambiguous candidates in a help message.
These object names are now sorted according to their types for
easier eyeballing.
* ab/get-short-oid:
get_short_oid: sort ambiguous objects by type, then SHA-1
sha1-name.c: move around the collect_ambiguous() function
git-p4: change "commitish" typo to "committish"
sha1-array.h: align function arguments
sha1-name.c: remove stray newline
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/technical/api-oid-array.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Documentation/technical/api-oid-array.txt b/Documentation/technical/api-oid-array.txt index b0c11f868d..9febfb1d52 100644 --- a/Documentation/technical/api-oid-array.txt +++ b/Documentation/technical/api-oid-array.txt @@ -35,13 +35,18 @@ Functions Free all memory associated with the array and return it to the initial, empty state. +`oid_array_for_each`:: + Iterate over each element of the list, executing the callback + function for each one. Does not sort the list, so any custom + hash order is retained. If the callback returns a non-zero + value, the iteration ends immediately and the callback's + return is propagated; otherwise, 0 is returned. + `oid_array_for_each_unique`:: - Efficiently iterate over each unique element of the list, - executing the callback function for each one. If the array is - not sorted, this function has the side effect of sorting it. If - the callback returns a non-zero value, the iteration ends - immediately and the callback's return is propagated; otherwise, - 0 is returned. + Iterate over each unique element of the list in sorted order, + but otherwise behave like `oid_array_for_each`. If the array + is not sorted, this function has the side effect of sorting + it. Examples -------- |