Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
983664c0
Commit
983664c0
authored
Jan 22, 2014
by
Glenn Morris
Browse files
* version.el (emacs-repository-get-version): Avoid error if .git exists but
the git executable is not found.
parent
2a5bce4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lisp/ChangeLog
lisp/ChangeLog
+1
-0
lisp/version.el
lisp/version.el
+4
-2
No files found.
lisp/ChangeLog
View file @
983664c0
...
...
@@ -4,6 +4,7 @@
Check either .bzr or .git, but not both.
Make the git case actually use the DIR argument, and return nil
rather than the empty string.
Avoid error if .git exists but the git executable is not found.
2014-01-22 Martin Rudalics <rudalics@gmx.at>
...
...
lisp/version.el
View file @
983664c0
...
...
@@ -185,8 +185,10 @@ only ask the VCS if we cannot find any information ourselves."
(
message
"Waiting for git..."
)
(
with-temp-buffer
(
let
((
default-directory
(
file-name-as-directory
dir
)))
(
and
(
zerop
(
call-process
"git"
nil
'
(
t
nil
)
nil
"log"
"-1"
"--pretty=format:%N"
))
(
and
(
eq
0
(
ignore-errors
(
call-process
"git"
nil
'
(
t
nil
)
nil
"log"
"-1"
"--pretty=format:%N"
)))
(
not
(
zerop
(
buffer-size
)))
(
replace-regexp-in-string
"\n"
""
(
buffer-string
))))))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment