From: Alexandre Julliard Date: Sat, 22 Jul 2006 13:39:32 +0000 (+0200) Subject: git.el: Prepend a slash to the file name when adding to .gitignore. X-Git-Tag: v1.4.2-rc2~20 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f56a7fda940caa7d4a1b06947481b5157510557;p=git.git git.el: Prepend a slash to the file name when adding to .gitignore. This way the ignore command will really only ignore the marked files and not files with the same name in subdirectories. Signed-off-by: Alexandre Julliard Signed-off-by: Junio C Hamano --- diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el index 7371d4b46..583747137 100644 --- a/contrib/emacs/git.el +++ b/contrib/emacs/git.el @@ -258,7 +258,7 @@ and returns the process output as a string." (set-buffer (find-file-noselect ignore-name)) (goto-char (point-max)) (unless (zerop (current-column)) (insert "\n")) - (insert name "\n") + (insert "/" name "\n") (sort-lines nil (point-min) (point-max)) (save-buffer)) (when created