summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:11 (GMT)
commitab48bc0aeadd7f6b661bc125a913e1c7d145cd5e (patch)
tree98bbbcf8dd2e210de83c71b2aecc508e9e7ba395 /Documentation
parent54db5c0e1edf0d92bd474f515fab349b98c18a24 (diff)
parent5cc044e02571e93048160d94e64fe6d8dd96597e (diff)
downloadgit-ab48bc0aeadd7f6b661bc125a913e1c7d145cd5e.zip
git-ab48bc0aeadd7f6b661bc125a913e1c7d145cd5e.tar.gz
git-ab48bc0aeadd7f6b661bc125a913e1c7d145cd5e.tar.bz2
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.txt17
1 files changed, 11 insertions, 6 deletions
diff --git a/Documentation/technical/api-oid-array.txt b/Documentation/technical/api-oid-array.txt
index b0c11f8..9febfb1 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
--------