From 231c4ba164580b8b78cf3019d14f24d59b2776d3 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 13 Aug 2008 07:32:04 +0300 Subject: [PATCH] Only ignore files in the current directory, not in subdirectories. * magit.el (magit-ignore-thing-at-point): Prefix .gitignore line with "/" so that it only matches in current directory. --- .gitignore | 0 magit.el | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/magit.el b/magit.el index 92c85d72..4844789f 100644 --- a/magit.el +++ b/magit.el @@ -931,7 +931,7 @@ the current line into your working tree. (if info (case (car info) ((other-file) - (append-to-file (concat (cadr info) "\n") nil ".gitignore") + (append-to-file (concat "/" (cadr info) "\n") nil ".gitignore") (magit-update-status (magit-find-status-buffer))))))) (defun magit-visit-thing-at-point ()