Skip to content

Commit

Permalink
Make previous PR pass checkdoc and bumped revision.
Browse files Browse the repository at this point in the history
  • Loading branch information
pidu committed Jul 29, 2014
1 parent 8b10363 commit cf89165
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git-timemachine.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Copyright (C) 2014 Peter Stiernström

;; Author: Peter Stiernström <[email protected]>
;; Version: 1.4
;; Version: 1.5
;; URL: https://github.com/pidu/git-timemachine
;; Package-Requires: ((cl-lib "0.5"))
;; Keywords: git
Expand Down Expand Up @@ -98,11 +98,12 @@
:group 'git-timemachine)

(defun git-timemachine-validate (file)
"Validate that there is a FILE and that it belongs to a git repository. Call with the value of 'buffer-file-name."
(unless file
(error "This buffer is not related to file."))
(error "This buffer is not related to file"))
(with-temp-buffer
(unless (zerop (call-process "git" nil nil nil "ls-files" "--error-unmatch" file))
(error "This file is not git tracked."))))
(error "This file is not git tracked"))))

;;;###autoload
(defun git-timemachine ()
Expand Down

0 comments on commit cf89165

Please sign in to comment.