loggable_activity 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/GETTING-STARTED.md +1 -0
- data/docker-compose.yml +27 -0
- data/docs/CHANGELOG_md.html +318 -0
- data/docs/CHEAT_SHEET_md.html +168 -0
- data/docs/CODE_OF_CONDUCT_md.html +250 -0
- data/docs/CreateLoggableActivities.html +175 -0
- data/docs/CreateLoggableActivityTables.html +173 -0
- data/docs/GETTING-STARTED_md.html +211 -0
- data/docs/Gemfile.html +153 -0
- data/docs/Gemfile_lock.html +438 -0
- data/docs/LoggableActivity/ActivitiesController.html +160 -0
- data/docs/LoggableActivity/ActivitiesHelper.html +158 -0
- data/docs/LoggableActivity/Activity.html +565 -0
- data/docs/LoggableActivity/ApplicationController.html +97 -0
- data/docs/LoggableActivity/ApplicationHelper.html +91 -0
- data/docs/LoggableActivity/ApplicationJob.html +97 -0
- data/docs/LoggableActivity/ApplicationMailer.html +97 -0
- data/docs/LoggableActivity/ApplicationRecord.html +97 -0
- data/docs/LoggableActivity/Configuration.html +237 -0
- data/docs/LoggableActivity/ConfigurationError.html +142 -0
- data/docs/LoggableActivity/CurrentActor.html +166 -0
- data/docs/LoggableActivity/DataOwner.html +138 -0
- data/docs/LoggableActivity/Encryption.html +321 -0
- data/docs/LoggableActivity/EncryptionError.html +142 -0
- data/docs/LoggableActivity/EncryptionKey.html +399 -0
- data/docs/LoggableActivity/Engine.html +108 -0
- data/docs/LoggableActivity/Error.html +142 -0
- data/docs/LoggableActivity/Generators/InstallGenerator.html +212 -0
- data/docs/LoggableActivity/Generators.html +91 -0
- data/docs/LoggableActivity/Hooks.html +841 -0
- data/docs/LoggableActivity/Payload.html +430 -0
- data/docs/LoggableActivity/Sanitizer.html +134 -0
- data/docs/LoggableActivity/Services/BasePayloadsBuilder.html +472 -0
- data/docs/LoggableActivity/Services/CustomPayloadsBuilder.html +225 -0
- data/docs/LoggableActivity/Services/DestroyPayloadsBuilder.html +396 -0
- data/docs/LoggableActivity/Services/PayloadsBuilder.html +348 -0
- data/docs/LoggableActivity/Services/UpdatePayloadsBuilder.html +540 -0
- data/docs/LoggableActivity/Services.html +93 -0
- data/docs/LoggableActivity.html +173 -0
- data/docs/MIT-LICENSE.html +132 -0
- data/docs/Object.html +110 -0
- data/docs/README_md.html +186 -0
- data/docs/Rakefile.html +134 -0
- data/docs/app/assets/config/loggable_activity_manifest_js.html +126 -0
- data/docs/app/assets/javascripts/loggable_activity/application_js.html +124 -0
- data/docs/app/assets/stylesheets/loggable_activity/activities_scss.html +154 -0
- data/docs/app/assets/stylesheets/loggable_activity/application_scss.html +142 -0
- data/docs/app/views/layouts/loggable_activity/application_html_slim.html +145 -0
- data/docs/app/views/loggable_activity/activities/_activities_html_slim.html +159 -0
- data/docs/created.rid +74 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +687 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/git-org/HEAD.html +126 -0
- data/docs/git-org/config.html +128 -0
- data/docs/git-org/description.html +126 -0
- data/docs/git-org/hooks/applypatch-msg_sample.html +128 -0
- data/docs/git-org/hooks/commit-msg_sample.html +138 -0
- data/docs/git-org/hooks/fsmonitor-watchman_sample.html +302 -0
- data/docs/git-org/hooks/post-update_sample.html +128 -0
- data/docs/git-org/hooks/pre-applypatch_sample.html +128 -0
- data/docs/git-org/hooks/pre-commit_sample.html +174 -0
- data/docs/git-org/hooks/pre-merge-commit_sample.html +133 -0
- data/docs/git-org/hooks/pre-push_sample.html +161 -0
- data/docs/git-org/hooks/pre-rebase_sample.html +282 -0
- data/docs/git-org/hooks/pre-receive_sample.html +144 -0
- data/docs/git-org/hooks/prepare-commit-msg_sample.html +136 -0
- data/docs/git-org/hooks/push-to-checkout_sample.html +178 -0
- data/docs/git-org/hooks/update_sample.html +226 -0
- data/docs/git-org/info/exclude.html +126 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +166 -0
- data/docs/js/darkfish.js +97 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/lib/loggable_activity/config_schema_json.html +205 -0
- data/docs/lib/tasks/loggable_activity_tasks_rake.html +128 -0
- data/docs/table_of_contents.html +954 -0
- data/lib/loggable_activity/concerns/current_actor.rb +25 -0
- data/lib/loggable_activity/hooks.rb +41 -19
- data/lib/loggable_activity/version.rb +1 -1
- data/lib/loggable_activity.rb +1 -1
- metadata +114 -3
- data/lib/loggable_activity/concerns/current_user.rb +0 -26
@@ -0,0 +1,282 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>pre-rebase.sample - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../../";
|
11
|
+
var index_rel_prefix = "../../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../../js/navigation.js" defer></script>
|
15
|
+
<script src="../../js/search.js" defer></script>
|
16
|
+
<script src="../../js/search_index.js" defer></script>
|
17
|
+
<script src="../../js/searcher.js" defer></script>
|
18
|
+
<script src="../../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="project-metadata">
|
59
|
+
|
60
|
+
<div id="fileindex-section" class="nav-section">
|
61
|
+
<h3>Pages</h3>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
<li><a href="../../CHANGELOG_md.html">CHANGELOG</a>
|
65
|
+
<li><a href="../../CHEAT_SHEET_md.html">CHEAT_SHEET</a>
|
66
|
+
<li><a href="../../CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
67
|
+
<li><a href="../../GETTING-STARTED_md.html">GETTING-STARTED</a>
|
68
|
+
<li><a href="../../Gemfile.html">Gemfile</a>
|
69
|
+
<li><a href="../../Gemfile_lock.html">Gemfile.lock</a>
|
70
|
+
<li><a href="../../MIT-LICENSE.html">MIT-LICENSE</a>
|
71
|
+
<li><a href="../../README_md.html">README</a>
|
72
|
+
<li><a href="../../Rakefile.html">Rakefile</a>
|
73
|
+
<li><details><summary>app</summary>
|
74
|
+
<ul class="link-list">
|
75
|
+
<li><a href="../../app/assets/config/loggable_activity_manifest_js.html">loggable_activity_manifest.js</a>
|
76
|
+
<li><a href="../../app/assets/javascripts/loggable_activity/application_js.html">application.js</a>
|
77
|
+
<li><a href="../../app/assets/stylesheets/loggable_activity/activities_scss.html">activities.scss</a>
|
78
|
+
<li><a href="../../app/assets/stylesheets/loggable_activity/application_scss.html">application.scss</a>
|
79
|
+
<li><a href="../../app/views/layouts/loggable_activity/application_html_slim.html">application.html.slim</a>
|
80
|
+
<li><a href="../../app/views/loggable_activity/activities/_activities_html_slim.html">_activities.html.slim</a>
|
81
|
+
</ul></details>
|
82
|
+
<li><details open><summary>git-org</summary>
|
83
|
+
<ul class="link-list">
|
84
|
+
<li><a href="../../git-org/HEAD.html">HEAD</a>
|
85
|
+
<li><a href="../../git-org/config.html">config</a>
|
86
|
+
<li><a href="../../git-org/description.html">description</a>
|
87
|
+
<li><a href="../../git-org/hooks/applypatch-msg_sample.html">applypatch-msg.sample</a>
|
88
|
+
<li><a href="../../git-org/hooks/commit-msg_sample.html">commit-msg.sample</a>
|
89
|
+
<li><a href="../../git-org/hooks/fsmonitor-watchman_sample.html">fsmonitor-watchman.sample</a>
|
90
|
+
<li><a href="../../git-org/hooks/post-update_sample.html">post-update.sample</a>
|
91
|
+
<li><a href="../../git-org/hooks/pre-applypatch_sample.html">pre-applypatch.sample</a>
|
92
|
+
<li><a href="../../git-org/hooks/pre-commit_sample.html">pre-commit.sample</a>
|
93
|
+
<li><a href="../../git-org/hooks/pre-merge-commit_sample.html">pre-merge-commit.sample</a>
|
94
|
+
<li><a href="../../git-org/hooks/pre-push_sample.html">pre-push.sample</a>
|
95
|
+
<li><a href="../../git-org/hooks/pre-rebase_sample.html">pre-rebase.sample</a>
|
96
|
+
<li><a href="../../git-org/hooks/pre-receive_sample.html">pre-receive.sample</a>
|
97
|
+
<li><a href="../../git-org/hooks/prepare-commit-msg_sample.html">prepare-commit-msg.sample</a>
|
98
|
+
<li><a href="../../git-org/hooks/push-to-checkout_sample.html">push-to-checkout.sample</a>
|
99
|
+
<li><a href="../../git-org/hooks/update_sample.html">update.sample</a>
|
100
|
+
<li><a href="../../git-org/info/exclude.html">exclude</a>
|
101
|
+
</ul></details>
|
102
|
+
<li><details><summary>lib</summary>
|
103
|
+
<ul class="link-list">
|
104
|
+
<li><a href="../../lib/loggable_activity/config_schema_json.html">config_schema.json</a>
|
105
|
+
<li><a href="../../lib/tasks/loggable_activity_tasks_rake.html">loggable_activity_tasks.rake</a>
|
106
|
+
</ul></details>
|
107
|
+
</ul>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</nav>
|
112
|
+
|
113
|
+
<main role="main" aria-label="Page git-org/hooks/pre-rebase.sample">
|
114
|
+
|
115
|
+
<p>!/bin/sh # # Copyright © 2006, 2008 Junio C Hamano # # The “pre-rebase” hook is run just before “git rebase” starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 – the upstream the series was forked from. # $2 – the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to ‘next’ branch from getting rebased, because allowing it # would result in rebasing already published history.</p>
|
116
|
+
|
117
|
+
<p>publish=next basebranch=“$1” if test “$#” = 2 then</p>
|
118
|
+
|
119
|
+
<pre class="ruby"><span class="ruby-identifier">topic</span>=<span class="ruby-string">"refs/heads/$2"</span>
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
<p>else</p>
|
123
|
+
|
124
|
+
<pre>topic=`git symbolic-ref HEAD` ||
|
125
|
+
exit 0 ;# we do not interrupt rebasing detached HEAD</pre>
|
126
|
+
|
127
|
+
<p>fi</p>
|
128
|
+
|
129
|
+
<p>case “$topic” in refs/heads/??/*)</p>
|
130
|
+
|
131
|
+
<pre class="ruby">;;
|
132
|
+
</pre>
|
133
|
+
|
134
|
+
<p>*)</p>
|
135
|
+
|
136
|
+
<pre class="ruby"><span class="ruby-identifier">exit</span> <span class="ruby-value">0</span> ;<span class="ruby-comment"># we do not interrupt others.</span>
|
137
|
+
;;
|
138
|
+
</pre>
|
139
|
+
|
140
|
+
<p>esac</p>
|
141
|
+
|
142
|
+
<p># Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it?</p>
|
143
|
+
|
144
|
+
<p># Does the topic really exist? git show-ref -q “$topic” || {</p>
|
145
|
+
|
146
|
+
<pre>echo >&2 "No such branch $topic"
|
147
|
+
exit 1</pre>
|
148
|
+
|
149
|
+
<p>}</p>
|
150
|
+
|
151
|
+
<p># Is topic fully merged to master? not_in_master=‘git rev-list –pretty=oneline ^master “$topic”` if test -z “$not_in_master” then</p>
|
152
|
+
|
153
|
+
<pre>echo >&2 "$topic is fully merged to master; better remove it."
|
154
|
+
exit 1 ;# we could allow it, but there is no point.</pre>
|
155
|
+
|
156
|
+
<p>fi</p>
|
157
|
+
|
158
|
+
<p># Is topic ever merged to next? If so you should not be rebasing it. only_next_1=‘git rev-list ^master “^$topic” ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test “$only_next_1” = “$only_next_2” then</p>
|
159
|
+
|
160
|
+
<pre>not_in_topic=`git rev-list "^$topic" master`
|
161
|
+
if test -z "$not_in_topic"
|
162
|
+
then
|
163
|
+
echo >&2 "$topic is already up to date with master"
|
164
|
+
exit 1 ;# we could allow it, but there is no point.
|
165
|
+
else
|
166
|
+
exit 0
|
167
|
+
fi</pre>
|
168
|
+
|
169
|
+
<p>else</p>
|
170
|
+
|
171
|
+
<pre>not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
|
172
|
+
/usr/bin/perl -e '
|
173
|
+
my $topic = $ARGV[0];
|
174
|
+
my $msg = "* $topic has commits already merged to public branch:\n";
|
175
|
+
my (%not_in_next) = map {
|
176
|
+
/^([0-9a-f]+) /;
|
177
|
+
($1 => 1);
|
178
|
+
} split(/\n/, $ARGV[1]);
|
179
|
+
for my $elem (map {
|
180
|
+
/^([0-9a-f]+) (.*)$/;
|
181
|
+
[$1 => $2];
|
182
|
+
} split(/\n/, $ARGV[2])) {
|
183
|
+
if (!exists $not_in_next{$elem->[0]}) {
|
184
|
+
if ($msg) {
|
185
|
+
print STDERR $msg;
|
186
|
+
undef $msg;
|
187
|
+
}
|
188
|
+
print STDERR " $elem->[1]\n";
|
189
|
+
}
|
190
|
+
}
|
191
|
+
' "$topic" "$not_in_next" "$not_in_master"
|
192
|
+
exit 1</pre>
|
193
|
+
|
194
|
+
<p>fi</p>
|
195
|
+
|
196
|
+
<p><<DOC_END</p>
|
197
|
+
|
198
|
+
<p>This sample hook safeguards topic branches that have been published from being rewound.</p>
|
199
|
+
|
200
|
+
<p>The workflow assumed here is:</p>
|
201
|
+
|
202
|
+
<pre>* Once a topic branch forks from "master", "master" is never
|
203
|
+
merged into it again (either directly or indirectly).
|
204
|
+
|
205
|
+
* Once a topic branch is fully cooked and merged into "master",
|
206
|
+
it is deleted. If you need to build on top of it to correct
|
207
|
+
earlier mistakes, a new topic branch is created by forking at
|
208
|
+
the tip of the "master". This is not strictly necessary, but
|
209
|
+
it makes it easier to keep your history simple.
|
210
|
+
|
211
|
+
* Whenever you need to test or publish your changes to topic
|
212
|
+
branches, merge them into "next" branch.</pre>
|
213
|
+
|
214
|
+
<p>The script, being an example, hardcodes the publish branch name to be “next”, but it is trivial to make it configurable via $GIT_DIR/config mechanism.</p>
|
215
|
+
|
216
|
+
<p>With this workflow, you would want to know:</p>
|
217
|
+
|
218
|
+
<p>(1) … if a topic branch has ever been merged to “next”. Young</p>
|
219
|
+
|
220
|
+
<pre>topic branches can have stupid mistakes you would rather
|
221
|
+
clean up before publishing, and things that have not been
|
222
|
+
merged into other branches can be easily rebased without
|
223
|
+
affecting other people. But once it is published, you would
|
224
|
+
not want to rewind it.</pre>
|
225
|
+
|
226
|
+
<p>(2) … if a topic branch has been fully merged to “master”.</p>
|
227
|
+
|
228
|
+
<pre>Then you can delete it. More importantly, you should not
|
229
|
+
build on top of it -- other people may already want to
|
230
|
+
change things related to the topic as patches against your
|
231
|
+
"master", so if you need further changes, it is better to
|
232
|
+
fork the topic (perhaps with the same name) afresh from the
|
233
|
+
tip of "master".</pre>
|
234
|
+
|
235
|
+
<p>Let’s look at this example:</p>
|
236
|
+
|
237
|
+
<pre> o---o---o---o---o---o---o---o---o---o "next"
|
238
|
+
/ / / /
|
239
|
+
/ a---a---b A / /
|
240
|
+
/ / / /
|
241
|
+
/ / c---c---c---c B /
|
242
|
+
/ / / \ /
|
243
|
+
/ / / b---b C \ /
|
244
|
+
/ / / / \ /
|
245
|
+
---o---o---o---o---o---o---o---o---o---o---o "master"</pre>
|
246
|
+
|
247
|
+
<p>A, B and C are topic branches.</p>
|
248
|
+
|
249
|
+
<pre>* A has one fix since it was merged up to "next".
|
250
|
+
|
251
|
+
* B has finished. It has been fully merged up to "master" and "next",
|
252
|
+
and is ready to be deleted.
|
253
|
+
|
254
|
+
* C has not merged to "next" at all.</pre>
|
255
|
+
|
256
|
+
<p>We would want to allow C to be rebased, refuse A, and encourage B to be deleted.</p>
|
257
|
+
|
258
|
+
<p>To compute (1):</p>
|
259
|
+
|
260
|
+
<pre>git rev-list ^master ^topic next
|
261
|
+
git rev-list ^master next
|
262
|
+
|
263
|
+
if these match, topic has not merged in next at all.</pre>
|
264
|
+
|
265
|
+
<p>To compute (2):</p>
|
266
|
+
|
267
|
+
<pre>git rev-list master..topic
|
268
|
+
|
269
|
+
if this is empty, it is fully merged to "master".</pre>
|
270
|
+
|
271
|
+
<p>DOC_END</p>
|
272
|
+
|
273
|
+
</main>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<footer id="validator-badges" role="contentinfo">
|
278
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
279
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
280
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
281
|
+
</footer>
|
282
|
+
|
@@ -0,0 +1,144 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>pre-receive.sample - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../../";
|
11
|
+
var index_rel_prefix = "../../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../../js/navigation.js" defer></script>
|
15
|
+
<script src="../../js/search.js" defer></script>
|
16
|
+
<script src="../../js/search_index.js" defer></script>
|
17
|
+
<script src="../../js/searcher.js" defer></script>
|
18
|
+
<script src="../../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="project-metadata">
|
59
|
+
|
60
|
+
<div id="fileindex-section" class="nav-section">
|
61
|
+
<h3>Pages</h3>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
<li><a href="../../CHANGELOG_md.html">CHANGELOG</a>
|
65
|
+
<li><a href="../../CHEAT_SHEET_md.html">CHEAT_SHEET</a>
|
66
|
+
<li><a href="../../CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
67
|
+
<li><a href="../../GETTING-STARTED_md.html">GETTING-STARTED</a>
|
68
|
+
<li><a href="../../Gemfile.html">Gemfile</a>
|
69
|
+
<li><a href="../../Gemfile_lock.html">Gemfile.lock</a>
|
70
|
+
<li><a href="../../MIT-LICENSE.html">MIT-LICENSE</a>
|
71
|
+
<li><a href="../../README_md.html">README</a>
|
72
|
+
<li><a href="../../Rakefile.html">Rakefile</a>
|
73
|
+
<li><details><summary>app</summary>
|
74
|
+
<ul class="link-list">
|
75
|
+
<li><a href="../../app/assets/config/loggable_activity_manifest_js.html">loggable_activity_manifest.js</a>
|
76
|
+
<li><a href="../../app/assets/javascripts/loggable_activity/application_js.html">application.js</a>
|
77
|
+
<li><a href="../../app/assets/stylesheets/loggable_activity/activities_scss.html">activities.scss</a>
|
78
|
+
<li><a href="../../app/assets/stylesheets/loggable_activity/application_scss.html">application.scss</a>
|
79
|
+
<li><a href="../../app/views/layouts/loggable_activity/application_html_slim.html">application.html.slim</a>
|
80
|
+
<li><a href="../../app/views/loggable_activity/activities/_activities_html_slim.html">_activities.html.slim</a>
|
81
|
+
</ul></details>
|
82
|
+
<li><details open><summary>git-org</summary>
|
83
|
+
<ul class="link-list">
|
84
|
+
<li><a href="../../git-org/HEAD.html">HEAD</a>
|
85
|
+
<li><a href="../../git-org/config.html">config</a>
|
86
|
+
<li><a href="../../git-org/description.html">description</a>
|
87
|
+
<li><a href="../../git-org/hooks/applypatch-msg_sample.html">applypatch-msg.sample</a>
|
88
|
+
<li><a href="../../git-org/hooks/commit-msg_sample.html">commit-msg.sample</a>
|
89
|
+
<li><a href="../../git-org/hooks/fsmonitor-watchman_sample.html">fsmonitor-watchman.sample</a>
|
90
|
+
<li><a href="../../git-org/hooks/post-update_sample.html">post-update.sample</a>
|
91
|
+
<li><a href="../../git-org/hooks/pre-applypatch_sample.html">pre-applypatch.sample</a>
|
92
|
+
<li><a href="../../git-org/hooks/pre-commit_sample.html">pre-commit.sample</a>
|
93
|
+
<li><a href="../../git-org/hooks/pre-merge-commit_sample.html">pre-merge-commit.sample</a>
|
94
|
+
<li><a href="../../git-org/hooks/pre-push_sample.html">pre-push.sample</a>
|
95
|
+
<li><a href="../../git-org/hooks/pre-rebase_sample.html">pre-rebase.sample</a>
|
96
|
+
<li><a href="../../git-org/hooks/pre-receive_sample.html">pre-receive.sample</a>
|
97
|
+
<li><a href="../../git-org/hooks/prepare-commit-msg_sample.html">prepare-commit-msg.sample</a>
|
98
|
+
<li><a href="../../git-org/hooks/push-to-checkout_sample.html">push-to-checkout.sample</a>
|
99
|
+
<li><a href="../../git-org/hooks/update_sample.html">update.sample</a>
|
100
|
+
<li><a href="../../git-org/info/exclude.html">exclude</a>
|
101
|
+
</ul></details>
|
102
|
+
<li><details><summary>lib</summary>
|
103
|
+
<ul class="link-list">
|
104
|
+
<li><a href="../../lib/loggable_activity/config_schema_json.html">config_schema.json</a>
|
105
|
+
<li><a href="../../lib/tasks/loggable_activity_tasks_rake.html">loggable_activity_tasks.rake</a>
|
106
|
+
</ul></details>
|
107
|
+
</ul>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</nav>
|
112
|
+
|
113
|
+
<main role="main" aria-label="Page git-org/hooks/pre-receive.sample">
|
114
|
+
|
115
|
+
<p>!/bin/sh # # An example hook script to make use of push options. # The example simply echoes all push options that start with ‘echoback=’ # and rejects all pushes when the “reject” push option is used. # # To enable this hook, rename this file to “pre-receive”.</p>
|
116
|
+
|
117
|
+
<p>if test -n “$GIT_PUSH_OPTION_COUNT” then</p>
|
118
|
+
|
119
|
+
<pre>i=0
|
120
|
+
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
|
121
|
+
do
|
122
|
+
eval "value=\$GIT_PUSH_OPTION_$i"
|
123
|
+
case "$value" in
|
124
|
+
echoback=*)
|
125
|
+
echo "echo from the pre-receive-hook: ${value#*=}" >&2
|
126
|
+
;;
|
127
|
+
reject)
|
128
|
+
exit 1
|
129
|
+
esac
|
130
|
+
i=$((i + 1))
|
131
|
+
done</pre>
|
132
|
+
|
133
|
+
<p>fi</p>
|
134
|
+
|
135
|
+
</main>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<footer id="validator-badges" role="contentinfo">
|
140
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
141
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
142
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
143
|
+
</footer>
|
144
|
+
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>prepare-commit-msg.sample - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../../";
|
11
|
+
var index_rel_prefix = "../../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../../js/navigation.js" defer></script>
|
15
|
+
<script src="../../js/search.js" defer></script>
|
16
|
+
<script src="../../js/search_index.js" defer></script>
|
17
|
+
<script src="../../js/searcher.js" defer></script>
|
18
|
+
<script src="../../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="project-metadata">
|
59
|
+
|
60
|
+
<div id="fileindex-section" class="nav-section">
|
61
|
+
<h3>Pages</h3>
|
62
|
+
|
63
|
+
<ul class="link-list">
|
64
|
+
<li><a href="../../CHANGELOG_md.html">CHANGELOG</a>
|
65
|
+
<li><a href="../../CHEAT_SHEET_md.html">CHEAT_SHEET</a>
|
66
|
+
<li><a href="../../CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
67
|
+
<li><a href="../../GETTING-STARTED_md.html">GETTING-STARTED</a>
|
68
|
+
<li><a href="../../Gemfile.html">Gemfile</a>
|
69
|
+
<li><a href="../../Gemfile_lock.html">Gemfile.lock</a>
|
70
|
+
<li><a href="../../MIT-LICENSE.html">MIT-LICENSE</a>
|
71
|
+
<li><a href="../../README_md.html">README</a>
|
72
|
+
<li><a href="../../Rakefile.html">Rakefile</a>
|
73
|
+
<li><details><summary>app</summary>
|
74
|
+
<ul class="link-list">
|
75
|
+
<li><a href="../../app/assets/config/loggable_activity_manifest_js.html">loggable_activity_manifest.js</a>
|
76
|
+
<li><a href="../../app/assets/javascripts/loggable_activity/application_js.html">application.js</a>
|
77
|
+
<li><a href="../../app/assets/stylesheets/loggable_activity/activities_scss.html">activities.scss</a>
|
78
|
+
<li><a href="../../app/assets/stylesheets/loggable_activity/application_scss.html">application.scss</a>
|
79
|
+
<li><a href="../../app/views/layouts/loggable_activity/application_html_slim.html">application.html.slim</a>
|
80
|
+
<li><a href="../../app/views/loggable_activity/activities/_activities_html_slim.html">_activities.html.slim</a>
|
81
|
+
</ul></details>
|
82
|
+
<li><details open><summary>git-org</summary>
|
83
|
+
<ul class="link-list">
|
84
|
+
<li><a href="../../git-org/HEAD.html">HEAD</a>
|
85
|
+
<li><a href="../../git-org/config.html">config</a>
|
86
|
+
<li><a href="../../git-org/description.html">description</a>
|
87
|
+
<li><a href="../../git-org/hooks/applypatch-msg_sample.html">applypatch-msg.sample</a>
|
88
|
+
<li><a href="../../git-org/hooks/commit-msg_sample.html">commit-msg.sample</a>
|
89
|
+
<li><a href="../../git-org/hooks/fsmonitor-watchman_sample.html">fsmonitor-watchman.sample</a>
|
90
|
+
<li><a href="../../git-org/hooks/post-update_sample.html">post-update.sample</a>
|
91
|
+
<li><a href="../../git-org/hooks/pre-applypatch_sample.html">pre-applypatch.sample</a>
|
92
|
+
<li><a href="../../git-org/hooks/pre-commit_sample.html">pre-commit.sample</a>
|
93
|
+
<li><a href="../../git-org/hooks/pre-merge-commit_sample.html">pre-merge-commit.sample</a>
|
94
|
+
<li><a href="../../git-org/hooks/pre-push_sample.html">pre-push.sample</a>
|
95
|
+
<li><a href="../../git-org/hooks/pre-rebase_sample.html">pre-rebase.sample</a>
|
96
|
+
<li><a href="../../git-org/hooks/pre-receive_sample.html">pre-receive.sample</a>
|
97
|
+
<li><a href="../../git-org/hooks/prepare-commit-msg_sample.html">prepare-commit-msg.sample</a>
|
98
|
+
<li><a href="../../git-org/hooks/push-to-checkout_sample.html">push-to-checkout.sample</a>
|
99
|
+
<li><a href="../../git-org/hooks/update_sample.html">update.sample</a>
|
100
|
+
<li><a href="../../git-org/info/exclude.html">exclude</a>
|
101
|
+
</ul></details>
|
102
|
+
<li><details><summary>lib</summary>
|
103
|
+
<ul class="link-list">
|
104
|
+
<li><a href="../../lib/loggable_activity/config_schema_json.html">config_schema.json</a>
|
105
|
+
<li><a href="../../lib/tasks/loggable_activity_tasks_rake.html">loggable_activity_tasks.rake</a>
|
106
|
+
</ul></details>
|
107
|
+
</ul>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</nav>
|
112
|
+
|
113
|
+
<main role="main" aria-label="Page git-org/hooks/prepare-commit-msg.sample">
|
114
|
+
|
115
|
+
<p>!/bin/sh # # An example hook script to prepare the commit log message. # Called by “git commit” with the name of the file that has the # commit message, followed by the description of the commit # message’s source. The hook’s purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to “prepare-commit-msg”.</p>
|
116
|
+
|
117
|
+
<p># This hook includes three examples. The first one removes the # “# Please enter the commit message…” help message. # # The second includes the output of “git diff –name-status -r” # into the message, just before the “git status” output. It is # commented because it doesn’t cope with –amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea.</p>
|
118
|
+
|
119
|
+
<p>COMMIT_MSG_FILE=$1 COMMIT_SOURCE=$2 SHA1=$3</p>
|
120
|
+
|
121
|
+
<p>/usr/bin/perl -i.bak -ne ‘print unless(m/^. Please enter the commit message/..m/^#$/)’ “$COMMIT_MSG_FILE”</p>
|
122
|
+
|
123
|
+
<p># case “$COMMIT_SOURCE,$SHA1” in # ,|template,) # /usr/bin/perl -i.bak -pe ‘ # print “n” . `git diff –cached –name-status -r` # if /^#/ && $first++ == 0’ “$COMMIT_MSG_FILE” ;; # *) ;; # esac</p>
|
124
|
+
|
125
|
+
<p># SOB=$(git var GIT_COMMITTER_IDENT | sed -n ‘s/^(.*>).*$/Signed-off-by: 1/p’) # git interpret-trailers –in-place –trailer “$SOB” “$COMMIT_MSG_FILE” # if test -z “$COMMIT_SOURCE” # then # /usr/bin/perl -i.bak -pe ‘print “n” if !$first_line++’ “$COMMIT_MSG_FILE” # fi</p>
|
126
|
+
|
127
|
+
</main>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<footer id="validator-badges" role="contentinfo">
|
132
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
133
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
134
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
135
|
+
</footer>
|
136
|
+
|