]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Add_instructive_commit_messages_for_removing_pages.mdwn
Change Projects link to point to projects DB
[ikiwiki.git] / doc / todo / Add_instructive_commit_messages_for_removing_pages.mdwn
1 As [[Add instructive commit messages for add _47_ edit pages]], but for `remove.pm`.
2
3 I use a `join()` since it at least looks like the plugin is able to remove several pages at once (`foreach` looping over file parameters), thus holding multiple entries in `@pages`. I haven't seen this happen, though.
4
5 > I feel that anything that shows a change should show what files were
6 > changed (at least as an easily accessible option), so mentioning
7 > filenames in commits is almost always clutter.
8
9 > It could be argued that there should be no message at all here, unless
10 > the user provides one (which they currently cannot), as is done when
11 > adding files. But the entire removal of a page from a wiki is a fairly
12 > unusual circumstance that is probably best highlighted as such in
13 > recentchanges. --[[Joey]]
14
15 Diff follows. --[[Daniel Andersson]]
16
17 [[!tag patch]]
18
19 ---
20
21         diff -r 4f2ad3a5377e Plugin/remove.pm
22         --- a/Plugin/remove.pm  Fri Jul 15 17:39:04 2011 +0200
23         +++ b/Plugin/remove.pm  Sat Jul 16 03:20:35 2011 +0200
24         @@ -228,7 +228,7 @@
25                                                 IkiWiki::rcs_remove($file);
26                                         }
27                                         IkiWiki::rcs_commit_staged(
28         -                                       message => gettext("removed"),
29         +                                       message => sprintf(gettext("remove %s"), join(', ', @files)),
30                                                 session => $session,
31                                         );
32                                         IkiWiki::enable_commit_hook();