зеркало из https://github.com/github/grit.git
Repo#batch uses new input option instead of block
This is mostly so it works over RPC.
This commit is contained in:
Родитель
2fb7d5d232
Коммит
df91441aba
|
@ -167,11 +167,7 @@ module Grit
|
||||||
# Returns an Array of Grit objects (Grit::Commit).
|
# Returns an Array of Grit objects (Grit::Commit).
|
||||||
def batch(*shas)
|
def batch(*shas)
|
||||||
shas.flatten!
|
shas.flatten!
|
||||||
text = git.native(:cat_file, {:batch => true}) do |stdin|
|
text = git.native(:cat_file, {:batch => true, :input => (shas * "\n")})
|
||||||
stdin.write(shas * "\n")
|
|
||||||
stdin.close
|
|
||||||
end
|
|
||||||
|
|
||||||
parse_batch(text)
|
parse_batch(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче