~/github/hub $ git rev-parse HEAD

~/github/hub $ git --no-pager log \
                --grep='\[ci skip\]' --invert-grep \
                --format=oneline --max-count=1
cbf7ab1ba3fa91287085ce0cbebdc11c84388888 Improve `hub merge` to not generate leftover remote refs

~/github/hub $ (magit-git-lines "log"
                "--grep='\\[ci skip\\]'" "--invert-grep"
                "--format=oneline" "--max-count=1")
("4777bd363058213605ebb292b35ef1a6edb3663c Update `merge` documentation")

The repository I'm working with is github/hub. I can only assume I'm misapplying the arguments, but I can't see my error.

1 Answer 1


magit-git-lines does not run a shell, so you don't need the single quotes to protect the argument value.

(magit-git-lines "log"
                 "--grep=\\[ci skip\\]" "--invert-grep"
                 "--format=oneline" "--max-count=1")
  • Ah, did the single quotes get passed literally to process-file? That'd explain it. Thanks! Sep 22, 2016 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.