rename: Fix to pass named parameters to rcs_commit
authorJoey Hess <joey@kitenet.net>
Mon, 29 Nov 2010 17:28:28 +0000 (13:28 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 29 Nov 2010 17:28:28 +0000 (13:28 -0400)
IkiWiki/Plugin/rename.pm
debian/changelog
doc/bugs/git_commit_adds_files_that_were_not_tracked.mdwn
doc/bugs/rename_fixup_not_attributed_to_author.mdwn

index ad5e726458cedbbb63a069297372e3bb739fe486..a05e85be0106462f263a47468f72cf2f2c1261ff 100644 (file)
@@ -574,11 +574,10 @@ sub fixlinks ($$$) {
                                eval { writefile($file, $config{srcdir}, $content) };
                                next if $@;
                                my $conflict=IkiWiki::rcs_commit(
-                                       $file,
-                                       sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
-                                       $token,
-                                       $session->param("name"),
-                                       $session->remote_addr(),
+                                       file => $file,
+                                       message => sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
+                                       token => $token,
+                                       session => $session,
                                );
                                push @fixedlinks, $page if ! defined $conflict;
                        }
index 6f97399d8d1e9474e9d74cff4c252422729c209a..bab5eeb883fd20b51ebe6806bfe649a12f929e97 100644 (file)
@@ -14,6 +14,7 @@ ikiwiki (3.20101113) UNRELEASED; urgency=low
   * edittemplate: Fix crash if using a .tmpl file or other non-page file
     as a template for a new page.
   * git: Fix temp file location.
+  * rename: Fix to pass named parameters to rcs_commit.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 16 Nov 2010 14:23:47 -0400
 
index 1b6eeb2a58e811956ac9ba9339d775ab6db51109..829e80327c6787688b34792e39ec27a7c0fb9d2a 100644 (file)
@@ -9,3 +9,10 @@ I'm unsure yet why the recentchanges files were being committed. Possibly
 because of the link fixup code run when renaming a page. --[[Joey]] 
 
 > See also [[bugs/rename fixup not attributed to author]]. --[[smcv]]
+
+> Ok, there was a call to `rcs_commit` that was still using non-named
+> parameters, which confused it thuroughly, and I think caused
+> 'git add .' to be called. I've fixed that.
+> 
+> I think there is still potential for the problem I described above to
+> occur during a rename or possibly otherwise. --[[Joey]] 
index 3122307a2609cf4d12940a0c9cc24c67ee8de233..bcfafac22bf267c420d1ca04ae89dcec8ce63d24 100644 (file)
@@ -7,3 +7,6 @@ and didn't set a commit message.
 been committed, for which see [[bugs/git_commit_adds_files_that_were_not_tracked]].)
 
 --[[smcv]]
+
+> It was calling `rcs_commit` old-style, and so not passing the session
+> object that is used to get the user's name. [[fixed|done]] --[[Joey]]