diff options
| author | Nicklas Lindgren <nili@gulmohar.se> | 2015-08-13 17:27:46 +0300 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2015-08-13 18:18:01 +0200 |
| commit | 998c9b5ad27befe60459deece3f60f70994cf13a (patch) | |
| tree | 72012906e33cc3d5dc5b886694ee4c4502a7e3ac /lisp | |
| parent | 05ca7a211ed79b79c23d53260bf746feeae4111a (diff) | |
magit-rev-format: Append "--" to command line
This fixes cases where the git show command would fail becuase the
revision argument also happened to be a filename.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/magit-git.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el index ba7d1f6..2225b30 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -809,8 +809,8 @@ Return a list of two integers: (A>B B>A)." (magit-git-success "update-ref" "-m" "enable reflog" ref oldrev ""))))) (defun magit-rev-format (format &optional rev) - "Return output of `git show -s --format=FORMAT [REV]'." - (magit-git-string "show" "-s" (concat "--format=" format) rev)) + "Return output of `git show -s --format=FORMAT [REV]' --." + (magit-git-string "show" "-s" (concat "--format=" format) rev "--")) (defun magit-format-rev-summary (rev) (--when-let (magit-rev-format "%h %s" rev) |
