Hacker News new | past | comments | ask | show | jobs | submit login

You can fix it by replacing the awk with "cut -d ' ' -f 2-"

Haven't tested it, but you may also need to throw a "tr '\n' '\0'" in there and call xargs with "-0" to make it happy.

This will still break on files with a CR in the filename.

(CRs are allowed in unix filenames but, imho, they should not be.)




you also want to tell xargs not to run the command on an empty set, otherwise you'll just do 'git checkout --' which will just kill all your local changes, probably.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: