aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/git.pm
Commit message (Collapse)AuthorAge
* git: change calling convention of safe_git to have named argumentsSimon McVittie2016-12-28
|
* git: Do the revert operation in a secondary working treeSimon McVittie2016-12-28
| | | | | This avoids leaving the git directory in an inconsistent state if the host system is rebooted while we are processing a revert.
* git: Turn $git_dir into a stackSimon McVittie2016-12-28
| | | | | | This will be necessary when we use a secondary working tree to do reverts without leaving the primary working tree in an inconsistent state.
* Try revert operations (on a branch) before approving themSimon McVittie2016-12-28
| | | | | | | | | | | | | | | | | Otherwise, we have a time-of-check/time-of-use vulnerability: rcs_preprevert previously looked at what changed in the commit we are reverting, not at what would result from reverting it now. In particular, if some files were renamed since the commit we are reverting, a revert of changes that were within the designated subdirectory and allowed by check_canchange() might now affect files that are outside the designated subdirectory or disallowed by check_canchange(). It is not sufficient to disable rename detection, since git older than 2.8.0rc0 (in particular the version in Debian stable) silently accepts and ignores the relevant options. OVE-20161226-0002
* Revert "Tell `git revert` not to follow renames"Simon McVittie2016-12-28
| | | | | | | This doesn't work prior to git 2.8: `git revert` silently ignores the option and succeeds. We will have to fix CVE-2016-10026 some other way. This reverts commit 9cada49ed6ad24556dbe9861ad5b0a9f526167f9.
* git: do not fail to commit if committer is anonymousSimon McVittie2016-12-28
|
* git: don't issue a warning if rcsinfo is undefinedSimon McVittie2016-12-28
| | | | | | The intention here seems to be that $prev may be undefined, and the only way that can legitimately happen is for $params{token} to be undefined too.
* Tell `git revert` not to follow renamesSimon McVittie2016-12-19
| | | | | | | | | | | | Otherwise, we have an authorization bypass vulnerability: rcs_preprevert looks at what changed in the commit we are reverting, not at what would result from reverting it now. In particular, if some files were renamed since the commit we are reverting, a revert of changes that were within the designated subdirectory and allowed by check_canchange() might now affect files that are outside the designated subdirectory or disallowed by check_canchange(). Signed-off-by: Simon McVittie <smcv@debian.org>
* Use git log --no-renames for recentchangesSimon McVittie2016-09-03
| | | | | | | Otherwise, recent git releases show renames as renames, and we do not see that newdir/test5 was affected. Bug-Debian: https://bugs.debian.org/835612
* Correctly handle filenames starting with a dash in add/rm/mv.Florian Wagner2016-03-17
|
* ensure_committer: don't do anything if we have the environment variablesSimon McVittie2015-11-30
|
* Don't memoize ensure_committerSimon McVittie2015-11-30
| | | | | This makes it harder to test, and if we're invoking git anyway, a couple of extra subprocesses are no big deal.
* git: if no committer identity is known, set it to "IkiWiki <ikiwiki.info>" ↵Simon McVittie2015-11-30
| | | | | | | in .git/config This resolves commit errors in versions of git that require a non-trivial committer identity.
* cloak user PII when making commits etc, and let cloaked PII be used in ↵Joey Hess2015-05-14
| | | | | | | | | | | | | | banned_users This was needed due to emailauth, but I've also wrapped all IP address exposure in cloak(), although the function doesn't yet cloak IP addresses. (One IP address I didn't cloak is the one that appears on the password reset email template. That is expected to be the user's own IP address, so ok to show it to them.) Thanks to smcv for the pointer to http://xmlns.com/foaf/spec/#term_mbox_sha1sum
* only_committed_changes could fail in a git repository merged with git merge ↵Joey Hess2014-04-05
| | | | -s ours.
* Merge remote-tracking branch 'remotes/smcv/ready/git-push-origin-master'Joey Hess2014-02-23
|\
| * git: explicitly specify the branch to push to originSimon McVittie2014-02-21
| | | | | | | | | | | | | | | | | | | | git's behaviour when doing "git push origin" is configurable, and the default is going to change in 2.0. In particular, if you've set push.default to "nothing", the regression test will warn: fatal: You didn't specify any refspecs to push, and push.default is "nothing". 'git push origin' failed: at .../lib/IkiWiki/Plugin/git.pm line 220.
* | Do not UTF8-escape "/" in Git's diffurl: cgit does not support this.intrigeri2013-12-31
|/
* deal with the case where oldrev is the same as newrevJoey Hess2013-11-16
|
* fix eqJoey Hess2013-11-16
|
* Added only_committed_changes config setting, which speeds up wiki refresh by ↵Joey Hess2013-11-16
| | | | querying git to find the files that were changed, rather than looking at the work tree. Not enabled by default as it can break some setups where not all files get committed to git.
* Pass --no-edit when used with git 1.7.8 and newer.Joey Hess2013-07-10
| | | | | | | | | Not sure if this is needed to avoid it trying to run an editor. Probably there is never a controlling terminal and probably git notices and does nothing. But I'm just copying what I have in git-annex assistant here. (Although with a much worse git version comparion, that only really works due to luck.)
* Deal with git behavior change in 1.7.8 and newer that broke support for ↵Joey Hess2013-07-10
| | | | commits with an empty commit message.
* Fix some warnigns in recent perls.Shlomi Fish2012-12-17
| | | | All existing tests pass.
* remove debug messageJoey Hess2012-03-22
| | | | | | A file may have no git sha1 if it's in the underlay, or just is not checked into git. This debug message doesn't add any value and is potentially confusing.
* URI escape filename when generating the diffurl.Joey Hess2012-03-13
| | | | | ikiwiki source files can contain at least one character that needs to be escaped in an url: +
* fix display of page name in recentchanges after a revertJoey Hess2012-02-07
| | | | | | | | | | | When the wiki is in a subdir of the git repo, a web revert would show in recentchanges as eg, doc/index, instead of just index. This happened because decode_git_file caches a $prefix that is dependant on the $git_dir setting, and the revert code runs with a different $git_dir, which polluted the $prefix for later. Fix this by adding a with_git_dir that juggles the variables properly.
* Fix web revert of a file deletion.Joey Hess2011-09-05
| | | | When reverting, an add is a remove, and a remove is an add.
* git: Fix bug involving attempting to web revert a commit that included ↵Joey Hess2010-12-29
| | | | changes to attachments.
* bugfixJoey Hess2010-12-29
|
* Add a second parameter to the rcs_diff hook, and avoid bloating memory ↵Joey Hess2010-12-29
| | | | reading in enormous commits.
* git: Avoid adding files when committing, so as not to implicitly add files ↵Joey Hess2010-11-29
| | | | like recentchanges files that are not normally checked in, when fixing links after rename.
* git: Fix temp file location.Joey Hess2010-11-29
|
* Use author date instead of commit dateTuomas Jormola2010-10-31
| | | | Signed-off-by: Tuomas Jormola <tj@solitudo.net>
* nice message if someone tries to revert a merge commitJoey Hess2010-10-23
|
* bugfixJoey Hess2010-10-23
|
* fix web reversion when the srcdir is in a subdir of the git repo.Joey Hess2010-10-23
|
* taint handling for revJoey Hess2010-10-08
|
* remove todo itemJoey Hess2010-10-08
| | | | | | | I understand the need to avoid chdir when running git_parse_changes for receive now. At that point, the changes have not been pushed to the srcdir's repo yet. When running the same code for preprevert, chdir to the srcdir is ok, and necessary.
* fix rcs_prepedit implementation to match specJoey Hess2010-10-08
|
* convert rcs_revert to only stage the reversionJoey Hess2010-10-06
|
* remove rcs_showpatchJoey Hess2010-10-06
|
* fix $git_root cachingJoey Hess2010-10-04
|
* fix indentationJoey Hess2010-10-04
|
* document new rcs reversion support functionsJoey Hess2010-10-04
|
* indentationJoey Hess2010-10-04
|
* fix bug if git_root is "0"Joey Hess2010-10-04
|
* Minor tidy-ups.Peter Gammie2010-10-01
|
* Complete rcs_preprevert and lightly test.Peter Gammie2010-10-01
|
* First cut at the revert plugin.Peter Gammie2010-09-29
|