clone`.)
A single combined diff, containing all the changes, follows.
+--- git-annex-10.20221003.orig/Annex/YoutubeDl.hs
++++ git-annex-10.20221003/Annex/YoutubeDl.hs
+@@ -249,8 +249,9 @@ youtubeDlOpts addopts = do
+ return (opts ++ addopts)
+
+ youtubeDlCommand :: Annex String
+-youtubeDlCommand = fromMaybe "youtube-dl" . annexYoutubeDlCommand
+- <$> Annex.getGitConfig
++youtubeDlCommand = annexYoutubeDlCommand <$> Annex.getGitConfig >>= \case
++ Just c -> pure c
++ Nothing -> fromMaybe "yt-dlp" <$> liftIO (searchPath "youtube-dl")
+
+ supportedScheme :: UrlOptions -> URLString -> Bool
+ supportedScheme uo url = case parseURIRelaxed url of
+@@ -264,8 +265,10 @@ supportedScheme uo url = case parseURIRe
+ _ -> allowedScheme uo u
+
+ {- Strategy: Look for chunks prefixed with \r, which look approximately
+- - like this:
++ - like this for youtube-dl:
+ - "ESC[K[download] 26.6% of 60.22MiB at 254.69MiB/s ETA 00:00"
++ - or for yt-dlp, like this:
++ - "\r[download] 1.8% of 1.14GiB at 1.04MiB/s ETA 18:23"
+ - Look at the number before "% of " and the number and unit after,
+ - to determine the number of bytes.
+ -}
+@@ -291,8 +294,11 @@ parseYoutubeDlProgress = go [] . reverse
+ calc percent total = round (percent * fromIntegral total / 100)
+
+ parsepercent :: String -> Maybe Double
+- parsepercent = readMaybe . reverse . takeWhile (not . isSpace) . reverse
++ parsepercent = readMaybe
++ . reverse . takeWhile (not . isSpace) . reverse
++ . dropWhile isSpace
+
+- parsebytes = readSize units . takeWhile (not . isSpace)
++ parsebytes = readSize units . takeWhile (not . isSpace)
++ . dropWhile isSpace
+
+ units = committeeUnits ++ storageUnits
--- git-annex-10.20221003.orig/COPYRIGHT
+++ git-annex-10.20221003/COPYRIGHT
@@ -64,6 +64,10 @@ License: GPL-2
License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
+--- git-annex-10.20221003.orig/doc/git-annex.mdwn
++++ git-annex-10.20221003/doc/git-annex.mdwn
+@@ -1719,8 +1719,8 @@ Remotes are configured using these setti
+
+ * `annex.youtube-dl-options`
+
+- Options to pass to youtube-dl when using it to find the url to download
+- for a video.
++ Options to pass to youtube-dl (or yt-dlp) when using it to find the url
++ to download for a video.
+
+ Some options may break git-annex's integration with youtube-dl. For
+ example, the --output option could cause it to store files somewhere
+@@ -1730,7 +1730,8 @@ Remotes are configured using these setti
+
+ * `annex.youtube-dl-command`
+
+- Command to run for youtube-dl. Default is "youtube-dl".
++ Command to run for youtube-dl. Default is to use "youtube-dl" or
++ if that is not available in the PATH, to use "yt-dlp".
+
+ * `annex.aria-torrent-options`
+