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
b16bd82d
Commit
b16bd82d
authored
Nov 24, 2007
by
Thien-Thi Nguyen
Browse files
(vc-git-show-log-entry): New func.
parent
bb78f352
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/vc-git.el
lisp/vc-git.el
+14
-1
No files found.
lisp/ChangeLog
View file @
b16bd82d
2007-11-24 Thien-Thi Nguyen <ttn@gnuvola.org>
* vc-git.el (vc-git-show-log-entry): New func.
2007-11-24 Glenn Morris <rgm@gnu.org>
* emacs-lisp/byte-run.el (declare-function): Doc fix.
...
...
lisp/vc-git.el
View file @
b16bd82d
...
...
@@ -81,7 +81,7 @@
;; HISTORY FUNCTIONS
;; * print-log (files &optional buffer) OK
;; - log-view-mode () OK
;; - show-log-entry (revision)
NOT NEEDED, DEFAULT IS GOOD
;; - show-log-entry (revision)
OK
;; - wash-log (file) COULD BE SUPPORTED
;; - logentry-check () NOT NEEDED
;; - comment-history (file) ??
...
...
@@ -312,6 +312,19 @@
(
"^Date: \\(.+\\)"
(
1
'change-log-date
))
(
"^summary:[ \t]+\\(.+\\)"
(
1
'log-view-message
))))))
(
defun
vc-git-show-log-entry
(
revision
)
"Move to the log entry for REVISION.
REVISION may have the form BRANCH, BRANCH~N,
or BRANCH^ (where \"^\" can be repeated)."
(
goto-char
(
point-min
))
(
search-forward
"\ncommit"
nil
t
(
cond
((
string-match
"~\\([0-9]\\)$"
revision
)
(
1+
(
string-to-number
(
match-string
1
revision
))))
((
string-match
"\\^+$"
revision
)
(
1+
(
length
(
match-string
0
revision
))))
(
t
nil
)))
(
beginning-of-line
))
(
defun
vc-git-diff
(
files
&optional
rev1
rev2
buffer
)
(
let
((
buf
(
or
buffer
"*vc-diff*"
)))
(
if
(
and
rev1
rev2
)
...
...
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