Hi,
here is a temporary implementation.
Masatake
--- a/lisp/xgit-dvc.el
+++ b/lisp/xgit-dvc.el
@@ -133,5 +133,27 @@
;;;###autoload
(defalias 'xgit-dvc-add 'xgit-add)
+(defun xgit-dvc-edit-ignore-files ()
+ "Edit git's ignore file.
+TODO: Support per directory ignore file.
+ This only supports exclude file now."
+ (interactive)
+ (find-file-other-window (xgit-get-root-exclude-file)))
+
+(defun xgit-dvc-ignore-files (file-list)
+ "Added FILE-LIST to git's ignore file.
+TODO: Support per directory ignore file.
+ This only supports exclude file now."
+ (interactive (list (dvc-current-file-list)))
+ (when (y-or-n-p (format "Ignore %S for %s? " file-list (xgit-tree-root)))
+ (with-current-buffer
+ (find-file-noselect (xgit-get-root-exclude-file))
+ (goto-char (point-max))
+ (dolist (f-name file-list)
+ (insert (format "%s\n" f-name)))
+ (save-buffer))))
+
+
+
(provide 'xgit-dvc)
;;; xgit-dvc.el ends here
--- a/lisp/xgit.el
+++ b/lisp/xgit.el
@@ -835,5 +835,9 @@
\(y/n/a/e/c/?)? "))))
answer))))
+(defun xgit-get-root-exclude-file (&optional root)
+ "returns exclude file for ROOT"
+ (concat (xgit-tree-root) ".git/" "info/" "exclude"))
+
(provide 'xgit)
;;; xgit.el ends here
_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev