I am trying to practice using xargs. I tried the following, passing the SHA1 via xargs: $ git show SHA1 --name-onlyI also tried:$ git log --author=jim --grep=patch |head -n 1|cut -d ' ' -f2|xargs {} git show {} --name-onlyIt returned xargs: {}: No such file or directorySo, I moved on to this:$ git log --author=jim --grep=patch |head -n 1|cut -d ' ' -f2|xargs -0 -I {} git show {} --name-onlyWhich returned:fatal: ambiguous argument 'a1237ac27321f2daea365787664e4119b339c483': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git <command> [<revision>...] -- [<file>...]'The SHA mentioned is the correct one, but I don't understand why this does not work either
Using xargs with git
bash;shell script;git;xargs