]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1409: let sed open its own input file
authorDenton Liu <liu.denton@gmail.com>
Fri, 20 Dec 2019 18:15:57 +0000 (10:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Dec 2019 19:30:45 +0000 (11:30 -0800)
In one case, we were using a redirection operator to feed input into
sed. However, since sed is capable of opening its own input file, make
sed do that instead of redirecting input into it.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1409-avoid-packing-refs.sh

index c46848eb8e6bc1121fbdb97be45152db6f1802e3..f74d890e8225c770cebfacf87962602eb8f22928 100755 (executable)
@@ -8,7 +8,7 @@ test_description='avoid rewriting packed-refs unnecessarily'
 # shouldn't upset readers, and it should be omitted if the file is
 # ever rewritten.
 mark_packed_refs () {
-       sed -e "s/^\(#.*\)/\1 t1409 /" <.git/packed-refs >.git/packed-refs.new &&
+       sed -e "s/^\(#.*\)/\1 t1409 /" .git/packed-refs >.git/packed-refs.new &&
        mv .git/packed-refs.new .git/packed-refs
 }