git.el: Prepend a slash to the file name when adding to .gitignore.
[gitweb.git] / contrib / emacs / git.el
index 7371d4b46333e7c924f4a9ea3572be7b0e85071f..58374713754cdc93ab9b5c810eb5990846816f4e 100644 (file)
@@ -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