|
|
|
|
|
by soraminazuki
860 days ago
|
|
> "git am" test could've been written as "git am patch1 patch2" instead This is off topic, but the Git devs were correct in doing `cat pine patch1 | git am`, since the test in question is test_expect_success 'am takes patches from a Pine mailbox'
The test requires the mailbox not be split in two, so `git am pine patch1` is out of the question. patch1 is reused across multiple tests, so it makes sense for it to be in separate files. Concatenating is the logical conclusion. cat patch1 >> pine
git am pine
is possible, but why? It's more code and it mutates the contents of files after initial creation, making the tests as a whole slightly harder to reason about. |
|