From b2794c18a13c3889dd68bb2701871023a84140ab Mon Sep 17 00:00:00 2001 From: Tobias Fendin Date: Fri, 25 Feb 2022 16:45:54 +0100 Subject: [PATCH] Removed xargs from git-effort --- bin/git-effort | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/bin/git-effort b/bin/git-effort index 0d78da7a7..6524637d8 100755 --- a/bin/git-effort +++ b/bin/git-effort @@ -203,28 +203,15 @@ export columns hide_cursor trap show_cursor_and_cleanup INT -# export functions so subshells can call them -export -f effort -export -f color_for -export -f active_days -export -f dates -export -f tputq -export to_tty -export above -export log_args - - -bash_params= -# If bash exits successfully with --import-functions, -# then we need to pass it (FreeBSD probably) -bash --import-functions -c ":" 1>/dev/null 2>&1 -if [ $? -eq 0 ] ; then - bash_params="--import-functions" -fi - heading + # send paths to effort -printf "%s\0" "${paths[@]}" | xargs -0 -n 1 -P 4 -I % bash $bash_params -c "effort \"%\"" | tee $tmp +nPaths=${#paths[@]} +for ((i=0; i