0
~/github/hub $ git rev-parse HEAD
4777bd363058213605ebb292b35ef1a6edb3663c

~/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.

2

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! – Sean Allred Sep 22 '16 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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