1cabdff1aSopenharmony_ci\input texinfo @c -*- texinfo -*-
2cabdff1aSopenharmony_ci@documentencoding UTF-8
3cabdff1aSopenharmony_ci
4cabdff1aSopenharmony_ci@settitle Using Git to develop FFmpeg
5cabdff1aSopenharmony_ci
6cabdff1aSopenharmony_ci@titlepage
7cabdff1aSopenharmony_ci@center @titlefont{Using Git to develop FFmpeg}
8cabdff1aSopenharmony_ci@end titlepage
9cabdff1aSopenharmony_ci
10cabdff1aSopenharmony_ci@top
11cabdff1aSopenharmony_ci
12cabdff1aSopenharmony_ci@contents
13cabdff1aSopenharmony_ci
14cabdff1aSopenharmony_ci@chapter Introduction
15cabdff1aSopenharmony_ci
16cabdff1aSopenharmony_ciThis document aims in giving some quick references on a set of useful Git
17cabdff1aSopenharmony_cicommands. You should always use the extensive and detailed documentation
18cabdff1aSopenharmony_ciprovided directly by Git:
19cabdff1aSopenharmony_ci
20cabdff1aSopenharmony_ci@example
21cabdff1aSopenharmony_cigit --help
22cabdff1aSopenharmony_ciman git
23cabdff1aSopenharmony_ci@end example
24cabdff1aSopenharmony_ci
25cabdff1aSopenharmony_cishows you the available subcommands,
26cabdff1aSopenharmony_ci
27cabdff1aSopenharmony_ci@example
28cabdff1aSopenharmony_cigit <command> --help
29cabdff1aSopenharmony_ciman git-<command>
30cabdff1aSopenharmony_ci@end example
31cabdff1aSopenharmony_ci
32cabdff1aSopenharmony_cishows information about the subcommand <command>.
33cabdff1aSopenharmony_ci
34cabdff1aSopenharmony_ciAdditional information could be found on the
35cabdff1aSopenharmony_ci@url{http://gitref.org, Git Reference} website.
36cabdff1aSopenharmony_ci
37cabdff1aSopenharmony_ciFor more information about the Git project, visit the
38cabdff1aSopenharmony_ci@url{http://git-scm.com/, Git website}.
39cabdff1aSopenharmony_ci
40cabdff1aSopenharmony_ciConsult these resources whenever you have problems, they are quite exhaustive.
41cabdff1aSopenharmony_ci
42cabdff1aSopenharmony_ciWhat follows now is a basic introduction to Git and some FFmpeg-specific
43cabdff1aSopenharmony_ciguidelines to ease the contribution to the project.
44cabdff1aSopenharmony_ci
45cabdff1aSopenharmony_ci@chapter Basics Usage
46cabdff1aSopenharmony_ci
47cabdff1aSopenharmony_ci@section Get Git
48cabdff1aSopenharmony_ci
49cabdff1aSopenharmony_ciYou can get Git from @url{http://git-scm.com/}
50cabdff1aSopenharmony_ciMost distribution and operating system provide a package for it.
51cabdff1aSopenharmony_ci
52cabdff1aSopenharmony_ci
53cabdff1aSopenharmony_ci@section Cloning the source tree
54cabdff1aSopenharmony_ci
55cabdff1aSopenharmony_ci@example
56cabdff1aSopenharmony_cigit clone https://git.ffmpeg.org/ffmpeg.git <target>
57cabdff1aSopenharmony_ci@end example
58cabdff1aSopenharmony_ci
59cabdff1aSopenharmony_ciThis will put the FFmpeg sources into the directory @var{<target>}.
60cabdff1aSopenharmony_ci
61cabdff1aSopenharmony_ci@example
62cabdff1aSopenharmony_cigit clone git@@source.ffmpeg.org:ffmpeg <target>
63cabdff1aSopenharmony_ci@end example
64cabdff1aSopenharmony_ci
65cabdff1aSopenharmony_ciThis will put the FFmpeg sources into the directory @var{<target>} and let
66cabdff1aSopenharmony_ciyou push back your changes to the remote repository.
67cabdff1aSopenharmony_ci
68cabdff1aSopenharmony_ci@example
69cabdff1aSopenharmony_cigit clone gil@@ffmpeg.org:ffmpeg-web <target>
70cabdff1aSopenharmony_ci@end example
71cabdff1aSopenharmony_ci
72cabdff1aSopenharmony_ciThis will put the source of the FFmpeg website into the directory
73cabdff1aSopenharmony_ci@var{<target>} and let you push back your changes to the remote repository.
74cabdff1aSopenharmony_ci(Note that @var{gil} stands for GItoLite and is not a typo of @var{git}.)
75cabdff1aSopenharmony_ci
76cabdff1aSopenharmony_ciIf you don't have write-access to the ffmpeg-web repository, you can
77cabdff1aSopenharmony_cicreate patches after making a read-only ffmpeg-web clone:
78cabdff1aSopenharmony_ci
79cabdff1aSopenharmony_ci@example
80cabdff1aSopenharmony_cigit clone git://ffmpeg.org/ffmpeg-web <target>
81cabdff1aSopenharmony_ci@end example
82cabdff1aSopenharmony_ci
83cabdff1aSopenharmony_ciMake sure that you do not have Windows line endings in your checkouts,
84cabdff1aSopenharmony_ciotherwise you may experience spurious compilation failures. One way to
85cabdff1aSopenharmony_ciachieve this is to run
86cabdff1aSopenharmony_ci
87cabdff1aSopenharmony_ci@example
88cabdff1aSopenharmony_cigit config --global core.autocrlf false
89cabdff1aSopenharmony_ci@end example
90cabdff1aSopenharmony_ci
91cabdff1aSopenharmony_ci
92cabdff1aSopenharmony_ci@anchor{Updating the source tree to the latest revision}
93cabdff1aSopenharmony_ci@section Updating the source tree to the latest revision
94cabdff1aSopenharmony_ci
95cabdff1aSopenharmony_ci@example
96cabdff1aSopenharmony_cigit pull (--rebase)
97cabdff1aSopenharmony_ci@end example
98cabdff1aSopenharmony_ci
99cabdff1aSopenharmony_cipulls in the latest changes from the tracked branch. The tracked branch
100cabdff1aSopenharmony_cican be remote. By default the master branch tracks the branch master in
101cabdff1aSopenharmony_cithe remote origin.
102cabdff1aSopenharmony_ci
103cabdff1aSopenharmony_ci@float IMPORTANT
104cabdff1aSopenharmony_ci@command{--rebase} (see below) is recommended.
105cabdff1aSopenharmony_ci@end float
106cabdff1aSopenharmony_ci
107cabdff1aSopenharmony_ci@section Rebasing your local branches
108cabdff1aSopenharmony_ci
109cabdff1aSopenharmony_ci@example
110cabdff1aSopenharmony_cigit pull --rebase
111cabdff1aSopenharmony_ci@end example
112cabdff1aSopenharmony_ci
113cabdff1aSopenharmony_cifetches the changes from the main repository and replays your local commits
114cabdff1aSopenharmony_ciover it. This is required to keep all your local changes at the top of
115cabdff1aSopenharmony_ciFFmpeg's master tree. The master tree will reject pushes with merge commits.
116cabdff1aSopenharmony_ci
117cabdff1aSopenharmony_ci
118cabdff1aSopenharmony_ci@section Adding/removing files/directories
119cabdff1aSopenharmony_ci
120cabdff1aSopenharmony_ci@example
121cabdff1aSopenharmony_cigit add [-A] <filename/dirname>
122cabdff1aSopenharmony_cigit rm [-r] <filename/dirname>
123cabdff1aSopenharmony_ci@end example
124cabdff1aSopenharmony_ci
125cabdff1aSopenharmony_ciGit needs to get notified of all changes you make to your working
126cabdff1aSopenharmony_cidirectory that makes files appear or disappear.
127cabdff1aSopenharmony_ciLine moves across files are automatically tracked.
128cabdff1aSopenharmony_ci
129cabdff1aSopenharmony_ci
130cabdff1aSopenharmony_ci@section Showing modifications
131cabdff1aSopenharmony_ci
132cabdff1aSopenharmony_ci@example
133cabdff1aSopenharmony_cigit diff <filename(s)>
134cabdff1aSopenharmony_ci@end example
135cabdff1aSopenharmony_ci
136cabdff1aSopenharmony_ciwill show all local modifications in your working directory as unified diff.
137cabdff1aSopenharmony_ci
138cabdff1aSopenharmony_ci
139cabdff1aSopenharmony_ci@section Inspecting the changelog
140cabdff1aSopenharmony_ci
141cabdff1aSopenharmony_ci@example
142cabdff1aSopenharmony_cigit log <filename(s)>
143cabdff1aSopenharmony_ci@end example
144cabdff1aSopenharmony_ci
145cabdff1aSopenharmony_ciYou may also use the graphical tools like @command{gitview} or @command{gitk}
146cabdff1aSopenharmony_cior the web interface available at @url{http://source.ffmpeg.org/}.
147cabdff1aSopenharmony_ci
148cabdff1aSopenharmony_ci@section Checking source tree status
149cabdff1aSopenharmony_ci
150cabdff1aSopenharmony_ci@example
151cabdff1aSopenharmony_cigit status
152cabdff1aSopenharmony_ci@end example
153cabdff1aSopenharmony_ci
154cabdff1aSopenharmony_cidetects all the changes you made and lists what actions will be taken in case
155cabdff1aSopenharmony_ciof a commit (additions, modifications, deletions, etc.).
156cabdff1aSopenharmony_ci
157cabdff1aSopenharmony_ci
158cabdff1aSopenharmony_ci@section Committing
159cabdff1aSopenharmony_ci
160cabdff1aSopenharmony_ci@example
161cabdff1aSopenharmony_cigit diff --check
162cabdff1aSopenharmony_ci@end example
163cabdff1aSopenharmony_ci
164cabdff1aSopenharmony_cito double check your changes before committing them to avoid trouble later
165cabdff1aSopenharmony_cion. All experienced developers do this on each and every commit, no matter
166cabdff1aSopenharmony_cihow small.
167cabdff1aSopenharmony_ci
168cabdff1aSopenharmony_ciEvery one of them has been saved from looking like a fool by this many times.
169cabdff1aSopenharmony_ciIt's very easy for stray debug output or cosmetic modifications to slip in,
170cabdff1aSopenharmony_ciplease avoid problems through this extra level of scrutiny.
171cabdff1aSopenharmony_ci
172cabdff1aSopenharmony_ciFor cosmetics-only commits you should get (almost) empty output from
173cabdff1aSopenharmony_ci
174cabdff1aSopenharmony_ci@example
175cabdff1aSopenharmony_cigit diff -w -b <filename(s)>
176cabdff1aSopenharmony_ci@end example
177cabdff1aSopenharmony_ci
178cabdff1aSopenharmony_ciAlso check the output of
179cabdff1aSopenharmony_ci
180cabdff1aSopenharmony_ci@example
181cabdff1aSopenharmony_cigit status
182cabdff1aSopenharmony_ci@end example
183cabdff1aSopenharmony_ci
184cabdff1aSopenharmony_cito make sure you don't have untracked files or deletions.
185cabdff1aSopenharmony_ci
186cabdff1aSopenharmony_ci@example
187cabdff1aSopenharmony_cigit add [-i|-p|-A] <filenames/dirnames>
188cabdff1aSopenharmony_ci@end example
189cabdff1aSopenharmony_ci
190cabdff1aSopenharmony_ciMake sure you have told Git your name, email address and GPG key
191cabdff1aSopenharmony_ci
192cabdff1aSopenharmony_ci@example
193cabdff1aSopenharmony_cigit config --global user.name "My Name"
194cabdff1aSopenharmony_cigit config --global user.email my@@email.invalid
195cabdff1aSopenharmony_cigit config --global user.signingkey ABCDEF0123245
196cabdff1aSopenharmony_ci@end example
197cabdff1aSopenharmony_ci
198cabdff1aSopenharmony_ciEnable signing all commits or use -S
199cabdff1aSopenharmony_ci
200cabdff1aSopenharmony_ci@example
201cabdff1aSopenharmony_cigit config --global commit.gpgsign true
202cabdff1aSopenharmony_ci@end example
203cabdff1aSopenharmony_ci
204cabdff1aSopenharmony_ciUse @option{--global} to set the global configuration for all your Git checkouts.
205cabdff1aSopenharmony_ci
206cabdff1aSopenharmony_ciGit will select the changes to the files for commit. Optionally you can use
207cabdff1aSopenharmony_cithe interactive or the patch mode to select hunk by hunk what should be
208cabdff1aSopenharmony_ciadded to the commit.
209cabdff1aSopenharmony_ci
210cabdff1aSopenharmony_ci
211cabdff1aSopenharmony_ci@example
212cabdff1aSopenharmony_cigit commit
213cabdff1aSopenharmony_ci@end example
214cabdff1aSopenharmony_ci
215cabdff1aSopenharmony_ciGit will commit the selected changes to your current local branch.
216cabdff1aSopenharmony_ci
217cabdff1aSopenharmony_ciYou will be prompted for a log message in an editor, which is either
218cabdff1aSopenharmony_ciset in your personal configuration file through
219cabdff1aSopenharmony_ci
220cabdff1aSopenharmony_ci@example
221cabdff1aSopenharmony_cigit config --global core.editor
222cabdff1aSopenharmony_ci@end example
223cabdff1aSopenharmony_ci
224cabdff1aSopenharmony_cior set by one of the following environment variables:
225cabdff1aSopenharmony_ci@var{GIT_EDITOR}, @var{VISUAL} or @var{EDITOR}.
226cabdff1aSopenharmony_ci
227cabdff1aSopenharmony_ci@section Writing a commit message
228cabdff1aSopenharmony_ci
229cabdff1aSopenharmony_ciLog messages should be concise but descriptive.
230cabdff1aSopenharmony_ci
231cabdff1aSopenharmony_ciThe first line must contain the context, a colon and a very short
232cabdff1aSopenharmony_cisummary of what the commit does. Details can be added, if necessary,
233cabdff1aSopenharmony_ciseparated by an empty line. These details should not exceed 60-72 characters
234cabdff1aSopenharmony_ciper line, except when containing code.
235cabdff1aSopenharmony_ci
236cabdff1aSopenharmony_ciExample of a good commit message:
237cabdff1aSopenharmony_ci
238cabdff1aSopenharmony_ci@example
239cabdff1aSopenharmony_ciavcodec/cbs: add a helper to read extradata within packet side data
240cabdff1aSopenharmony_ci
241cabdff1aSopenharmony_ciUsing ff_cbs_read() on the raw buffer will not parse it as extradata,
242cabdff1aSopenharmony_ciresulting in parsing errors for example when handling ISOBMFF avcC.
243cabdff1aSopenharmony_ciThis helper works around that.
244cabdff1aSopenharmony_ci@end example
245cabdff1aSopenharmony_ci
246cabdff1aSopenharmony_ci@example
247cabdff1aSopenharmony_ciptr might be NULL
248cabdff1aSopenharmony_ci@end example
249cabdff1aSopenharmony_ci
250cabdff1aSopenharmony_ciIf the summary on the first line is not enough, in the body of the message,
251cabdff1aSopenharmony_ciexplain why you made a change, what you did will be obvious from the changes
252cabdff1aSopenharmony_cithemselves most of the time. Saying just "bug fix" or "10l" is bad. Remember
253cabdff1aSopenharmony_cithat people of varying skill levels look at and educate themselves while
254cabdff1aSopenharmony_cireading through your code. Don't include filenames in log messages except in
255cabdff1aSopenharmony_cithe context, Git provides that information.
256cabdff1aSopenharmony_ci
257cabdff1aSopenharmony_ciIf the commit fixes a registered issue, state it in a separate line of the
258cabdff1aSopenharmony_cibody: @code{Fix Trac ticket #42.}
259cabdff1aSopenharmony_ci
260cabdff1aSopenharmony_ciThe first line will be used to name
261cabdff1aSopenharmony_cithe patch by @command{git format-patch}.
262cabdff1aSopenharmony_ci
263cabdff1aSopenharmony_ciCommon mistakes for the first line, as seen in @command{git log --oneline}
264cabdff1aSopenharmony_ciinclude: missing context at the beginning; description of what the code did
265cabdff1aSopenharmony_cibefore the patch; line too long or wrapped to the second line.
266cabdff1aSopenharmony_ci
267cabdff1aSopenharmony_ci@section Preparing a patchset
268cabdff1aSopenharmony_ci
269cabdff1aSopenharmony_ci@example
270cabdff1aSopenharmony_cigit format-patch <commit> [-o directory]
271cabdff1aSopenharmony_ci@end example
272cabdff1aSopenharmony_ci
273cabdff1aSopenharmony_ciwill generate a set of patches for each commit between @var{<commit>} and
274cabdff1aSopenharmony_cicurrent @var{HEAD}. E.g.
275cabdff1aSopenharmony_ci
276cabdff1aSopenharmony_ci@example
277cabdff1aSopenharmony_cigit format-patch origin/master
278cabdff1aSopenharmony_ci@end example
279cabdff1aSopenharmony_ci
280cabdff1aSopenharmony_ciwill generate patches for all commits on current branch which are not
281cabdff1aSopenharmony_cipresent in upstream.
282cabdff1aSopenharmony_ciA useful shortcut is also
283cabdff1aSopenharmony_ci
284cabdff1aSopenharmony_ci@example
285cabdff1aSopenharmony_cigit format-patch -n
286cabdff1aSopenharmony_ci@end example
287cabdff1aSopenharmony_ci
288cabdff1aSopenharmony_ciwhich will generate patches from last @var{n} commits.
289cabdff1aSopenharmony_ciBy default the patches are created in the current directory.
290cabdff1aSopenharmony_ci
291cabdff1aSopenharmony_ci@section Sending patches for review
292cabdff1aSopenharmony_ci
293cabdff1aSopenharmony_ci@example
294cabdff1aSopenharmony_cigit send-email <commit list|directory>
295cabdff1aSopenharmony_ci@end example
296cabdff1aSopenharmony_ci
297cabdff1aSopenharmony_ciwill send the patches created by @command{git format-patch} or directly
298cabdff1aSopenharmony_cigenerates them. All the email fields can be configured in the global/local
299cabdff1aSopenharmony_ciconfiguration or overridden by command line.
300cabdff1aSopenharmony_ciNote that this tool must often be installed separately (e.g. @var{git-email}
301cabdff1aSopenharmony_cipackage on Debian-based distros).
302cabdff1aSopenharmony_ci
303cabdff1aSopenharmony_ci
304cabdff1aSopenharmony_ci@section Renaming/moving/copying files or contents of files
305cabdff1aSopenharmony_ci
306cabdff1aSopenharmony_ciGit automatically tracks such changes, making those normal commits.
307cabdff1aSopenharmony_ci
308cabdff1aSopenharmony_ci@example
309cabdff1aSopenharmony_cimv/cp path/file otherpath/otherfile
310cabdff1aSopenharmony_cigit add [-A] .
311cabdff1aSopenharmony_cigit commit
312cabdff1aSopenharmony_ci@end example
313cabdff1aSopenharmony_ci
314cabdff1aSopenharmony_ci
315cabdff1aSopenharmony_ci@chapter Git configuration
316cabdff1aSopenharmony_ci
317cabdff1aSopenharmony_ciIn order to simplify a few workflows, it is advisable to configure both
318cabdff1aSopenharmony_ciyour personal Git installation and your local FFmpeg repository.
319cabdff1aSopenharmony_ci
320cabdff1aSopenharmony_ci@section Personal Git installation
321cabdff1aSopenharmony_ci
322cabdff1aSopenharmony_ciAdd the following to your @file{~/.gitconfig} to help @command{git send-email}
323cabdff1aSopenharmony_ciand @command{git format-patch} detect renames:
324cabdff1aSopenharmony_ci
325cabdff1aSopenharmony_ci@example
326cabdff1aSopenharmony_ci[diff]
327cabdff1aSopenharmony_ci        renames = copy
328cabdff1aSopenharmony_ci@end example
329cabdff1aSopenharmony_ci
330cabdff1aSopenharmony_ci@section Repository configuration
331cabdff1aSopenharmony_ci
332cabdff1aSopenharmony_ciIn order to have @command{git send-email} automatically send patches
333cabdff1aSopenharmony_cito the ffmpeg-devel mailing list, add the following stanza
334cabdff1aSopenharmony_cito @file{/path/to/ffmpeg/repository/.git/config}:
335cabdff1aSopenharmony_ci
336cabdff1aSopenharmony_ci@example
337cabdff1aSopenharmony_ci[sendemail]
338cabdff1aSopenharmony_ci        to = ffmpeg-devel@@ffmpeg.org
339cabdff1aSopenharmony_ci@end example
340cabdff1aSopenharmony_ci
341cabdff1aSopenharmony_ci@chapter FFmpeg specific
342cabdff1aSopenharmony_ci
343cabdff1aSopenharmony_ci@section Reverting broken commits
344cabdff1aSopenharmony_ci
345cabdff1aSopenharmony_ci@example
346cabdff1aSopenharmony_cigit reset <commit>
347cabdff1aSopenharmony_ci@end example
348cabdff1aSopenharmony_ci
349cabdff1aSopenharmony_ci@command{git reset} will uncommit the changes till @var{<commit>} rewriting
350cabdff1aSopenharmony_cithe current branch history.
351cabdff1aSopenharmony_ci
352cabdff1aSopenharmony_ci@example
353cabdff1aSopenharmony_cigit commit --amend
354cabdff1aSopenharmony_ci@end example
355cabdff1aSopenharmony_ci
356cabdff1aSopenharmony_ciallows one to amend the last commit details quickly.
357cabdff1aSopenharmony_ci
358cabdff1aSopenharmony_ci@example
359cabdff1aSopenharmony_cigit rebase -i origin/master
360cabdff1aSopenharmony_ci@end example
361cabdff1aSopenharmony_ci
362cabdff1aSopenharmony_ciwill replay local commits over the main repository allowing to edit, merge
363cabdff1aSopenharmony_cior remove some of them in the process.
364cabdff1aSopenharmony_ci
365cabdff1aSopenharmony_ci@float NOTE
366cabdff1aSopenharmony_ci@command{git reset}, @command{git commit --amend} and @command{git rebase}
367cabdff1aSopenharmony_cirewrite history, so you should use them ONLY on your local or topic branches.
368cabdff1aSopenharmony_ciThe main repository will reject those changes.
369cabdff1aSopenharmony_ci@end float
370cabdff1aSopenharmony_ci
371cabdff1aSopenharmony_ci@example
372cabdff1aSopenharmony_cigit revert <commit>
373cabdff1aSopenharmony_ci@end example
374cabdff1aSopenharmony_ci
375cabdff1aSopenharmony_ci@command{git revert} will generate a revert commit. This will not make the
376cabdff1aSopenharmony_cifaulty commit disappear from the history.
377cabdff1aSopenharmony_ci
378cabdff1aSopenharmony_ci@section Pushing changes to remote trees
379cabdff1aSopenharmony_ci
380cabdff1aSopenharmony_ci@example
381cabdff1aSopenharmony_cigit push origin master --dry-run
382cabdff1aSopenharmony_ci@end example
383cabdff1aSopenharmony_ci
384cabdff1aSopenharmony_ciWill simulate a push of the local master branch to the default remote
385cabdff1aSopenharmony_ci(@var{origin}). And list which branches and ranges or commits would have been
386cabdff1aSopenharmony_cipushed.
387cabdff1aSopenharmony_ciGit will prevent you from pushing changes if the local and remote trees are
388cabdff1aSopenharmony_ciout of sync. Refer to @ref{Updating the source tree to the latest revision}.
389cabdff1aSopenharmony_ci
390cabdff1aSopenharmony_ci@example
391cabdff1aSopenharmony_cigit remote add <name> <url>
392cabdff1aSopenharmony_ci@end example
393cabdff1aSopenharmony_ci
394cabdff1aSopenharmony_ciWill add additional remote with a name reference, it is useful if you want
395cabdff1aSopenharmony_cito push your local branch for review on a remote host.
396cabdff1aSopenharmony_ci
397cabdff1aSopenharmony_ci@example
398cabdff1aSopenharmony_cigit push <remote> <refspec>
399cabdff1aSopenharmony_ci@end example
400cabdff1aSopenharmony_ci
401cabdff1aSopenharmony_ciWill push the changes to the @var{<remote>} repository.
402cabdff1aSopenharmony_ciOmitting @var{<refspec>} makes @command{git push} update all the remote
403cabdff1aSopenharmony_cibranches matching the local ones.
404cabdff1aSopenharmony_ci
405cabdff1aSopenharmony_ci@section Finding a specific svn revision
406cabdff1aSopenharmony_ci
407cabdff1aSopenharmony_ciSince version 1.7.1 Git supports @samp{:/foo} syntax for specifying commits
408cabdff1aSopenharmony_cibased on a regular expression. see man gitrevisions
409cabdff1aSopenharmony_ci
410cabdff1aSopenharmony_ci@example
411cabdff1aSopenharmony_cigit show :/'as revision 23456'
412cabdff1aSopenharmony_ci@end example
413cabdff1aSopenharmony_ci
414cabdff1aSopenharmony_ciwill show the svn changeset @samp{r23456}. With older Git versions searching in
415cabdff1aSopenharmony_cithe @command{git log} output is the easiest option (especially if a pager with
416cabdff1aSopenharmony_cisearch capabilities is used).
417cabdff1aSopenharmony_ci
418cabdff1aSopenharmony_ciThis commit can be checked out with
419cabdff1aSopenharmony_ci
420cabdff1aSopenharmony_ci@example
421cabdff1aSopenharmony_cigit checkout -b svn_23456 :/'as revision 23456'
422cabdff1aSopenharmony_ci@end example
423cabdff1aSopenharmony_ci
424cabdff1aSopenharmony_cior for Git < 1.7.1 with
425cabdff1aSopenharmony_ci
426cabdff1aSopenharmony_ci@example
427cabdff1aSopenharmony_cigit checkout -b svn_23456 $SHA1
428cabdff1aSopenharmony_ci@end example
429cabdff1aSopenharmony_ci
430cabdff1aSopenharmony_ciwhere @var{$SHA1} is the commit hash from the @command{git log} output.
431cabdff1aSopenharmony_ci
432cabdff1aSopenharmony_ci
433cabdff1aSopenharmony_ci@chapter gpg key generation
434cabdff1aSopenharmony_ci
435cabdff1aSopenharmony_ciIf you have no gpg key yet, we recommend that you create a ed25519 based key as it
436cabdff1aSopenharmony_ciis small, fast and secure. Especially it results in small signatures in git.
437cabdff1aSopenharmony_ci
438cabdff1aSopenharmony_ci@example
439cabdff1aSopenharmony_cigpg --default-new-key-algo "ed25519/cert,sign+cv25519/encr" --quick-generate-key "human@@server.com"
440cabdff1aSopenharmony_ci@end example
441cabdff1aSopenharmony_ci
442cabdff1aSopenharmony_ciWhen generating a key, make sure the email specified matches the email used in git as some sites like
443cabdff1aSopenharmony_cigithub consider mismatches a reason to declare such commits unverified. After generating a key you
444cabdff1aSopenharmony_cican add it to the MAINTAINER file and upload it to a keyserver.
445cabdff1aSopenharmony_ci
446cabdff1aSopenharmony_ci@chapter Pre-push checklist
447cabdff1aSopenharmony_ci
448cabdff1aSopenharmony_ciOnce you have a set of commits that you feel are ready for pushing,
449cabdff1aSopenharmony_ciwork through the following checklist to doublecheck everything is in
450cabdff1aSopenharmony_ciproper order. This list tries to be exhaustive. In case you are just
451cabdff1aSopenharmony_cipushing a typo in a comment, some of the steps may be unnecessary.
452cabdff1aSopenharmony_ciApply your common sense, but if in doubt, err on the side of caution.
453cabdff1aSopenharmony_ci
454cabdff1aSopenharmony_ciFirst, make sure that the commits and branches you are going to push
455cabdff1aSopenharmony_cimatch what you want pushed and that nothing is missing, extraneous or
456cabdff1aSopenharmony_ciwrong. You can see what will be pushed by running the git push command
457cabdff1aSopenharmony_ciwith @option{--dry-run} first. And then inspecting the commits listed with
458cabdff1aSopenharmony_ci@command{git log -p 1234567..987654}. The @command{git status} command
459cabdff1aSopenharmony_cimay help in finding local changes that have been forgotten to be added.
460cabdff1aSopenharmony_ci
461cabdff1aSopenharmony_ciNext let the code pass through a full run of our test suite.
462cabdff1aSopenharmony_ci
463cabdff1aSopenharmony_ci@itemize
464cabdff1aSopenharmony_ci@item @command{make distclean}
465cabdff1aSopenharmony_ci@item @command{/path/to/ffmpeg/configure}
466cabdff1aSopenharmony_ci@item @command{make fate}
467cabdff1aSopenharmony_ci@item if fate fails due to missing samples run @command{make fate-rsync} and retry
468cabdff1aSopenharmony_ci@end itemize
469cabdff1aSopenharmony_ci
470cabdff1aSopenharmony_ciMake sure all your changes have been checked before pushing them, the
471cabdff1aSopenharmony_citest suite only checks against regressions and that only to some extend. It does
472cabdff1aSopenharmony_ciobviously not check newly added features/code to be working unless you have
473cabdff1aSopenharmony_ciadded a test for that (which is recommended).
474cabdff1aSopenharmony_ci
475cabdff1aSopenharmony_ciAlso note that every single commit should pass the test suite, not just
476cabdff1aSopenharmony_cithe result of a series of patches.
477cabdff1aSopenharmony_ci
478cabdff1aSopenharmony_ciOnce everything passed, push the changes to your public ffmpeg clone and post a
479cabdff1aSopenharmony_cimerge request to ffmpeg-devel. You can also push them directly but this is not
480cabdff1aSopenharmony_cirecommended.
481cabdff1aSopenharmony_ci
482cabdff1aSopenharmony_ci@chapter Server Issues
483cabdff1aSopenharmony_ci
484cabdff1aSopenharmony_ciContact the project admins at @email{root@@ffmpeg.org} if you have technical
485cabdff1aSopenharmony_ciproblems with the Git server.
486