-
Notifications
You must be signed in to change notification settings - Fork 0
/
git-weave.txt
178 lines (145 loc) · 5.15 KB
/
git-weave.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
git-weave(1)
============
NAME
----
git-weave - Weave a sequence of trees and log data into a repository
SYNOPSIS
--------
[verse]
'git-weave' [-v] [-m limit] [-q] indir outdir
DESCRIPTION
-----------
git-weave accepts an input directory containing a sequence of
subdirectories and a metadata file (named "log"), and composes them
into a git repository created under the specified output directory
(which must not exist).
If the input directory is identifiably a git repository, the weave
operation is reversed; tree states from each commit are unraveled into
the output directory with a "log" file holding commit metadata
(committer/author/comment information and parent headers representing
links of the repository DAG) and tags.
Commits are unraveled in commit-time order into directories named for
integers from 1 increasing, but their order of composition when
re-woven is actually set by the sequence of entries in the metadata
file. File trees may be inserted or removed without hindering
re-weaving provided the pointers in the log's parent fields are fixed
up properly.
METADATA FILE FORMAT
--------------------
The metadata file format will contain three kinds of stanzas: entries
for commits, entries for lightweight tags, and entries for annotated
tags. These may optionally be separated by comment lines, beginning
with '#', which are ignored.
A commit stanza has headers similar to those in a commit raw log:
commit, committer, author, and optionally parent headers. The header
contents are not hash IDs, but arbitrary text cookies either declared
by a previous commit stanza or referencing one. The following example
declares "8" to be a commit ID, and references a previous commit
identified as '7'. Note that commit IDs are not required to be
numeric strings, though the unravel operation generates them that way.
------------
commit 8
parent 7
author Eric S. Raymond <[email protected]> 1325026869 +0000
committer Eric S. Raymond <[email protected]> 1325026869 +0000
Initial revision
.
------------
The text body of a commit comment or tag comment entry is delimited
from the headers by an empty line; the text body must always end with
"." on a line by itself; and text lines beginning with "." will have
an additional "." prepended to them.
A commit stanza may also have a "directory" header. If present, this
sets the name of the subdirectory in which git-weave expects to
find the content tree for this commit. For example
------------
commit 24
directory intercal-0.17
parent 23
author Eric S. Raymond <[email protected]> 1325026489 +0000
committer Eric S. Raymond <[email protected]> 1325026489 +0000
The state of the INTERCAL project at release 0.17.
.
------------
A label stanza declares a lightweight tag. This example declares a
tag 'sample' pointing at the commit identified as 102.
------------
label sample
refers-to 102
------------
A branch stanza declares a named branch to be pointing at a specified
tip commit. This example declares a named branch 'devel' with the
commit identified as 417 as its tip.
------------
branch devel
refers-to 417
------------
A tag stanza declares an annotated tag. This one declares a tag named
'annotated1' pointing at the commit declared as 99.
------------
tag annotated1
refers-to 99
tagger Eric S. Raymond <[email protected]> Sat Nov 17 03:16:26 2012 -0500
This is an example annotated tag.
.
------------
When you are composing commit and tag stanzas by hand, you can count
on any of the date formats normally acceptable to git to be
recognized.
If, when weaving, any committer or author or tagger line, the date is omitted,
git-weave will supply as a default the latest modification time of
any file in the corresponding tree.
If a committer or author or tagger line is omitted entirely, the
user's name and email address as retrieved by ''git-config'' will
be supplied as defaults, and the date will default as above.
Thus, the following variation on one of the previous examples
is a valid stanza:
------------
commit 24
directory intercal-0.17
parent 23
The state of the INTERCAL project at release 0.17.
.
------------
OPTIONS
-------
-q::
Be quiet. Suppress the normal spinning-baton progress meter
with timing information.
-m::
Limit the number of commits or trees processed to a specified
integer maximum. '0' means process all of them.
-v::
Be verbose, enabling progress and command-execution messages
This option will probably be of interest only to developers;
consult the source code for details.
EXAMPLES
--------
* Weave a sequence of trees in the directory 'unraveled'
into a git repository in the directory 'repo'.
+
------------
$ rm -fr repo; git-weave unraveled repo
------------
+
The metadata is expected to be in 'unraveled/log'. This mode of
operation is triggered when there is no file 'unraveled/.git',
* Unravel a repository in the directory 'repo' into a sequence
of file trees and a metadata log in the directory 'unraveled'.
+
------------
$ rm -fr unraveled; git-weave repo unraveled
------------
+
This mode of operation is triggered when there is a 'repo/.git' file.
SEE ALSO
--------
git-log(1)
git-checkout(1)
git-add(1)
git-mktree(1)
git-ls-tree(1)
git-update-references(1)
GIT
---
Not yet part of the git(1) suite