GitAlias / gitalias

Git alias commands for faster easier version control
2.45k stars 328 forks source link

prevent xargs running when input (from pipe) is empty #70

Closed kobusjooste closed 3 years ago

kobusjooste commented 3 years ago

Running git commands, via xargs, without input may lead to spurious error messages at best.

At worst it might have unforseen bad effects especially with remove and delete commands.

Use xargs' "-r" option to run only when non-zero input from the pipe is received.

joelparkerhenderson commented 3 years ago

Thank you, this is a great protection. Very much appreciated!