mirror of
https://github.com/git/git.git
synced 2025-09-10 22:44:50 +02:00
Merge branch 'ds/path-walk-1'
Introduce a new API to visit objects in batches based on a common path, or by type. * ds/path-walk-1: path-walk: drop redundant parse_tree() call path-walk: reorder object visits path-walk: mark trees and blobs as UNINTERESTING path-walk: visit tags and cached objects path-walk: allow consumer to specify object types t6601: add helper for testing path-walk API test-lib-functions: add test_cmp_sorted path-walk: introduce an object walk by path
This commit is contained in:
@@ -1268,6 +1268,16 @@ test_cmp () {
|
||||
eval "$GIT_TEST_CMP" '"$@"'
|
||||
}
|
||||
|
||||
# test_cmp_sorted runs test_cmp on sorted versions of the two
|
||||
# input files. Uses "$1.sorted" and "$2.sorted" as temp files.
|
||||
|
||||
test_cmp_sorted () {
|
||||
sort <"$1" >"$1.sorted" &&
|
||||
sort <"$2" >"$2.sorted" &&
|
||||
test_cmp "$1.sorted" "$2.sorted" &&
|
||||
rm "$1.sorted" "$2.sorted"
|
||||
}
|
||||
|
||||
# Check that the given config key has the expected value.
|
||||
#
|
||||
# test_cmp_config [-C <dir>] <expected-value>
|
||||
|
||||
Reference in New Issue
Block a user