Skip to content

Commit

Permalink
git.el: Prepend a slash to the file name when adding to .gitignore.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Julliard authored and Junio C Hamano committed Jul 24, 2006
1 parent 51a6e56 commit 9f56a7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/emacs/git.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f56a7f

Please sign in to comment.