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 <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>maint
parent
51a6e56fb7
commit
9f56a7fda9
|
@ -258,7 +258,7 @@ and returns the process output as a string."
|
||||||
(set-buffer (find-file-noselect ignore-name))
|
(set-buffer (find-file-noselect ignore-name))
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(unless (zerop (current-column)) (insert "\n"))
|
(unless (zerop (current-column)) (insert "\n"))
|
||||||
(insert name "\n")
|
(insert "/" name "\n")
|
||||||
(sort-lines nil (point-min) (point-max))
|
(sort-lines nil (point-min) (point-max))
|
||||||
(save-buffer))
|
(save-buffer))
|
||||||
(when created
|
(when created
|
||||||
|
|
Loading…
Reference in New Issue