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
b91f0762
Commit
b91f0762
authored
Aug 26, 2009
by
Dan Nicolaescu
Browse files
(vc-git-register): Use "git add" for directories.
parent
b8e54362
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
48 deletions
+58
-48
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/vc-git.el
lisp/vc-git.el
+56
-48
No files found.
lisp/ChangeLog
View file @
b91f0762
2009-08-26 Dan Nicolaescu <dann@ics.uci.edu>
* vc-git.el (vc-git-register): Use "git add" for directories.
* vc-dir.el (vc-dir-node-directory, vc-dir-update): Get the parent
directory correctly in case the item is a directory itself.
...
...
lisp/vc-git.el
View file @
b91f0762
...
...
@@ -43,64 +43,64 @@
;; beginning of vc.el. The current status is:
;; ("??" means: "figure out what to do about it")
;;
;; FUNCTION NAME STATUS
;; FUNCTION NAME
STATUS
;; BACKEND PROPERTIES
;; * revision-granularity OK
;; * revision-granularity
OK
;; STATE-QUERYING FUNCTIONS
;; * registered (file)
OK
;; * state (file)
OK
;; - state-heuristic (file)
NOT NEEDED
;; * working-revision (file)
OK
;; - latest-on-branch-p (file)
NOT NEEDED
;; * checkout-model (files)
OK
;; - workfile-unchanged-p (file)
OK
;; - mode-line-string (file)
OK
;; * registered (file)
OK
;; * state (file)
OK
;; - state-heuristic (file)
NOT NEEDED
;; * working-revision (file)
OK
;; - latest-on-branch-p (file)
NOT NEEDED
;; * checkout-model (files)
OK
;; - workfile-unchanged-p (file)
OK
;; - mode-line-string (file)
OK
;; STATE-CHANGING FUNCTIONS
;; * create-repo ()
OK
;; * register (files &optional rev comment) OK
;; - init-revision (file)
NOT NEEDED
;; - responsible-p (file)
OK
;; - could-register (file)
NOT NEEDED, DEFAULT IS GOOD
;; - receive-file (file rev)
NOT NEEDED
;; - unregister (file)
OK
;; * checkin (files rev comment)
OK
;; * find-revision (file rev buffer)
OK
;; * checkout (file &optional editable rev)
OK
;; * revert (file &optional contents-done)
OK
;; - rollback (files)
COULD BE SUPPORTED
;; * create-repo ()
OK
;; * register (files &optional rev comment)
OK
;; - init-revision (file)
NOT NEEDED
;; - responsible-p (file)
OK
;; - could-register (file)
NOT NEEDED, DEFAULT IS GOOD
;; - receive-file (file rev)
NOT NEEDED
;; - unregister (file)
OK
;; * checkin (files rev comment)
OK
;; * find-revision (file rev buffer)
OK
;; * checkout (file &optional editable rev)
OK
;; * revert (file &optional contents-done)
OK
;; - rollback (files)
COULD BE SUPPORTED
;; - merge (file rev1 rev2) It would be possible to merge
;; changes into a single file, but when
;; committing they wouldn't
;; be identified as a merge
;; by git, so it's probably
;; not a good idea.
;; - merge-news (file)
see `merge'
;; - steal-lock (file &optional revision)
NOT NEEDED
;; - merge-news (file)
see `merge'
;; - steal-lock (file &optional revision)
NOT NEEDED
;; HISTORY FUNCTIONS
;; * print-log (files &optional buffer
)
OK
;; - log-view-mode ()
OK
;; - show-log-entry (revision)
OK
;; - comment-history (file)
??
;; - update-changelog (files)
COULD BE SUPPORTED
;; * diff (file &optional rev1 rev2 buffer)
OK
;; - revision-completion-table (files)
OK
;; - annotate-command (file buf &optional rev)
OK
;; - annotate-time ()
OK
;; - annotate-current-time ()
NOT NEEDED
;; - annotate-extract-revision-at-line ()
OK
;; * print-log (files &optional buffer
shortlog)
OK
;; - log-view-mode ()
OK
;; - show-log-entry (revision)
OK
;; - comment-history (file)
??
;; - update-changelog (files)
COULD BE SUPPORTED
;; * diff (file &optional rev1 rev2 buffer) OK
;; - revision-completion-table (files)
OK
;; - annotate-command (file buf &optional rev)
OK
;; - annotate-time ()
OK
;; - annotate-current-time ()
NOT NEEDED
;; - annotate-extract-revision-at-line () OK
;; TAG SYSTEM
;; - create-tag (dir name branchp)
OK
;; - retrieve-tag (dir name update)
OK, needs to update buffers
;; - create-tag (dir name branchp)
OK
;; - retrieve-tag (dir name update)
OK
;; MISCELLANEOUS
;; - make-version-backups-p (file)
NOT NEEDED
;; - repository-hostname (dirname)
NOT NEEDED
;; - previous-revision (file rev)
OK
;; - next-revision (file rev)
OK
;; - check-headers ()
COULD BE SUPPORTED
;; - clear-headers ()
NOT NEEDED
;; - delete-file (file)
OK
;; - rename-file (old new)
OK
;; - find-file-hook ()
NOT NEEDED
;; - make-version-backups-p (file)
NOT NEEDED
;; - repository-hostname (dirname)
NOT NEEDED
;; - previous-revision (file rev)
OK
;; - next-revision (file rev)
OK
;; - check-headers ()
COULD BE SUPPORTED
;; - clear-headers ()
NOT NEEDED
;; - delete-file (file)
OK
;; - rename-file (old new)
OK
;; - find-file-hook ()
NOT NEEDED
(
eval-when-compile
(
require
'cl
)
...
...
@@ -426,8 +426,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(
vc-git-command
nil
0
nil
"init"
))
(
defun
vc-git-register
(
files
&optional
rev
comment
)
"Register FILE into the git version-control system."
(
vc-git-command
nil
0
files
"update-index"
"--add"
"--"
))
"Register FILES into the git version-control system."
(
let
(
flist
dlist
)
(
dolist
(
crt
files
)
(
if
(
file-directory-p
crt
)
(
push
crt
dlist
)
(
push
crt
flist
)))
(
when
flist
(
vc-git-command
nil
0
flist
"update-index"
"--add"
"--"
))
(
when
dlist
(
vc-git-command
nil
0
dlist
"add"
))))
(
defalias
'vc-git-responsible-p
'vc-git-root
)
...
...
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