Commit Graph

83 Commits (52131b21203a9e6ed3597e6bcda79b0758261d43)

Author SHA1 Message Date
Joey Hess 59cfb9b6d0 only_committed_changes could fail in a git repository merged with git merge -s ours. 2014-04-05 19:09:05 -04:00
Joey Hess c1fbd66c03 Merge remote-tracking branch 'remotes/smcv/ready/git-push-origin-master' 2014-02-23 14:19:39 -04:00
Simon McVittie be3483fe9b git: explicitly specify the branch to push to origin
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.
2014-02-21 16:39:17 +00:00
intrigeri d52774dd45 Do not UTF8-escape "/" in Git's diffurl: cgit does not support this. 2013-12-31 01:47:10 +00:00
Joey Hess 441002e3e6 deal with the case where oldrev is the same as newrev 2013-11-16 20:48:23 -04:00
Joey Hess 727d39b92a fix eq 2013-11-16 18:56:39 -04:00
Joey Hess 654530fa8b Added only_committed_changes config setting, which speeds up wiki refresh by 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. 2013-11-16 17:26:20 -04:00
Joey Hess 946af13ae6 Pass --no-edit when used with git 1.7.8 and newer.
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.)
2013-07-10 21:52:49 -04:00
Joey Hess b162563dc1 Deal with git behavior change in 1.7.8 and newer that broke support for commits with an empty commit message. 2013-07-10 21:50:18 -04:00
Shlomi Fish 12c9219d67 Fix some warnigns in recent perls.
All existing tests pass.
2012-12-17 22:44:54 +02:00
Joey Hess e7bf599ee0 remove debug message
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.
2012-03-22 13:07:30 -04:00
Joey Hess f0733e6b96 URI escape filename when generating the diffurl.
ikiwiki source files can contain at least one character that
needs to be escaped in an url: +
2012-03-13 11:50:39 -04:00
Joey Hess 1b6c189578 fix display of page name in recentchanges after a revert
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.
2012-02-07 03:06:40 -04:00
Joey Hess 5cb0ecc000 Fix web revert of a file deletion.
When reverting, an add is a remove, and a remove is an add.
2011-09-05 14:51:49 -04:00
Joey Hess 7d0ef85d80 git: Fix bug involving attempting to web revert a commit that included changes to attachments. 2010-12-29 20:19:58 -04:00
Joey Hess 8517aa8687 bugfix 2010-12-29 20:10:28 -04:00
Joey Hess 4fb26f4e60 Add a second parameter to the rcs_diff hook, and avoid bloating memory reading in enormous commits. 2010-12-29 19:58:49 -04:00
Joey Hess 170cb02479 git: Avoid adding files when committing, so as not to implicitly add files like recentchanges files that are not normally checked in, when fixing links after rename. 2010-11-29 13:42:03 -04:00
Joey Hess 78a22e2eb2 git: Fix temp file location. 2010-11-29 12:01:50 -04:00
Tuomas Jormola d32a1028ab Use author date instead of commit date
Signed-off-by: Tuomas Jormola <tj@solitudo.net>
2010-10-31 16:06:25 -04:00
Joey Hess 5db2d6f6b2 nice message if someone tries to revert a merge commit 2010-10-23 17:19:48 -04:00
Joey Hess 62a0f2f3d6 bugfix 2010-10-23 16:31:58 -04:00
Joey Hess 9ca9959eda fix web reversion when the srcdir is in a subdir of the git repo. 2010-10-23 16:19:16 -04:00
Joey Hess 4efc1f22d4 taint handling for rev 2010-10-08 18:58:47 -04:00
Joey Hess e7d6dcfed6 remove todo item
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.
2010-10-08 18:46:30 -04:00
Joey Hess 5c6f7a8d1b fix rcs_prepedit implementation to match spec 2010-10-08 18:02:47 -04:00
Joey Hess 238e8b95a5 convert rcs_revert to only stage the reversion 2010-10-06 15:08:12 -04:00
Joey Hess 237ea79d71 remove rcs_showpatch 2010-10-06 14:39:10 -04:00
Joey Hess 80da2b2840 fix $git_root caching 2010-10-04 16:35:17 -04:00
Joey Hess f025923d14 fix indentation 2010-10-04 16:33:36 -04:00
Joey Hess 3f3aab3793 document new rcs reversion support functions 2010-10-04 16:22:50 -04:00
Joey Hess 68670cad82 indentation 2010-10-04 16:03:00 -04:00
Joey Hess 49ef98505a fix bug if git_root is "0" 2010-10-04 16:01:21 -04:00
Peter Gammie 7d1c3aa1cb Minor tidy-ups. 2010-10-01 14:08:07 +10:00
Peter Gammie 8024a2636f Complete rcs_preprevert and lightly test. 2010-10-01 14:06:00 +10:00
Peter Gammie acecbad0ff First cut at the revert plugin. 2010-09-29 15:14:19 +10:00
Joey Hess cd794613b6 git: When updating from remote, use git pull --prune, to avoid possible errors from conflicting obsolete remote branches. 2010-09-14 15:45:38 -04:00
Joey Hess aa78c142b8 avoid generating receive wrapper if there are no untrusted committers
The wrapper is pointless in that configuration. Also, the code for it
doesn't compile w/o untrusted commiters to test. :)
2010-07-26 13:30:45 -04:00
Joey Hess a7454c0e32 git: Fix gitweb historyurl examples so "diff to current" links work. (Thanks jrayhawk) 2010-07-24 06:18:19 -04:00
Joey Hess 7fdf1f1d00 move nickname sanitization out
Probably best to store it unsanitized and sanitize as needed on use.
And it already was for comments, leaving only the need to sanitize the
nickname when git committing, to ensure the email address is legal.
2010-07-04 16:44:38 -04:00
Joey Hess 0eabe6f794 git: Added git_wrapper_background_command option. Can be used to eg, make the git wrapper push to github in the background after ikiwiki runs. 2010-07-01 16:57:20 -04:00
Joey Hess 38bf2f6388 bugfix 2010-06-23 20:26:09 -04:00
Joey Hess 9a32451986 finializing openid nickname support
Renamed usershort => nickname.

Note that this means existing user login sessions will not have the nickname
recorded, and so it won't be used for those.
2010-06-23 20:16:01 -04:00
Joey Hess a4f381ace8 git: Record the username from openid in the git author email. (This avoids display of ugly google openids.) 2010-06-23 19:44:41 -04:00
Joey Hess d8e4b51a41 rcs_getctime and rcs_getmtime take relative filenames
There was some confusion about whether the filename was
relative to srcdir or not. Some test cases, and the bzr
plugin assumed it was relative to the srcdir. Most everything else
assumed it was absolute.

Changed it to relative, for consistency with the rest
of the rcs_ functions.
2010-06-23 19:32:53 -04:00
Joey Hess ecdfd1b864 rcs_commit and rcs_commit_staged api changes
Using named parameters for these is overdue. Passing the session in a
parameter instead of passing username and IP separately will later allow
storing other session info, like username or part of the email.

Note that these functions are not part of the exported API,
and the prototype change will catch (most) skew, so I am not changing
API versions. Any third-party plugins that call them will need updated
though.
2010-06-23 19:04:36 -04:00
Joey Hess b4a43406f6 API: rcs_commit and rcs_commit_staged are passed a new parameter
that may contain the username component of the email address of
the user making the commit.
2010-06-23 16:05:49 -04:00
Joey Hess c46bcb425a Add new optional field usershort to rcs_recentchanges.
Now the git plugin supports commits with author fields that look like:
Author: http://my.openid/ <me@web>

Then in recentchanges, the short username will be displayed, linking
to the openid.

Particularly useful for the horrible google openids, of course.
2010-06-23 15:54:52 -04:00
Joey Hess eff5e233a2 force list context
run_or_die returns a status code in scalar context
2010-06-16 16:07:41 -04:00
Joey Hess da2be6e85c git: Gix --gettime to properly support utf8 filenames.
In passing, fixed a bug where the srcdir was in a subdir of a repository
named "0".
2010-06-15 23:21:55 -04:00