Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xargs -r invalid on OSX #2692

Closed
ryan-mars opened this issue Apr 6, 2014 · 5 comments
Closed

xargs -r invalid on OSX #2692

ryan-mars opened this issue Apr 6, 2014 · 5 comments

Comments

@ryan-mars
Copy link
Contributor

The alias in the git plugin uses the -r flag for xargs. This is invalid on OSX.
gwip='git add -A; git ls-files --deleted -z | xargs -r0 git rm; git commit -m "--wip--"'

@ncanceill
Copy link
Contributor

Confirmed here.

Mac OSX uses the BSD-flavored xargs, which runs with the -r flag implied. However (and, it seems, contrary to the FreeBSD version), the -r flag will return an error on Mac OSX.

So simple fix is:

XARGS_OPTS=
&>/dev/null xargs -r && XARGS_OPTS+="-r"
alias gwip="git add -A; git ls-files --deleted -z | xargs ${XARGS_OPTS} -0 git rm; git commit -m \"--wip--\""

@robbyrussell should I submit a PR?

@ncanceill
Copy link
Contributor

This is the second time this bites someone, so I submitted #2714. Please test it if you have time.

@mcornella
Copy link
Member

Effectively solved and ready to close once #2790 is merged. Just leaving this comment to update the issue and get it out of the way to triage the rest...

@apjanke
Copy link
Contributor

apjanke commented Jun 25, 2015

Looks like this was fixed by #2790. I don't see any remaining xargs -r uses in the repo. Could you confirm if this is fixed for you, and if so, close this issue?

@ncanceill
Copy link
Contributor

Indeed this should be fixed now.

Le 25 juin 2015 à 21:56, Andrew Janke notifications@github.com a écrit :

Looks like this was fixed by #2790. I don't see any remaining xargs -r uses in the repo. Could you confirm if this is fixed for you, and if so, close this issue?


Reply to this email directly or view it on GitHub.

@apjanke apjanke mentioned this issue Sep 30, 2015
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants