On Thu, Oct 20, 2016 at 02:53:36PM -0700, Stefan Beller wrote: > >> That said I really like the idea of having a helper that would eliminate the cat > >> for you, e.g. : > >> > >> git_test_helper_equal_stdin_or_diff_and_die -C super_repo status > >> --porcelain=v2 --branch --untracked-files=all <<-EOF > >> 1 A. N... 000000 100644 100644 $_z40 $HMOD .gitmodules > >> 1 AM S.M. 000000 160000 160000 $_z40 $HSUP sub1 > >> EOF > > > > I think that helper still ends up using "cat" and "diff" under the hood, > > I assumed that helper being a C program, that only needs to fork once > for the actual git call and then it sits idle to compare the exact output > from stdout to its stdin. Ah, I see. I thought you meant a shell helper. A C helper does drop 2 forks down to 1, but it would be nice if we could drop it to 0. -Peff