Merge http://www.kernel.org/pub/scm/gitk/gitk
[git.git] / Documentation / git-apply.txt
1 git-apply(1)
2 ============
3
4 NAME
5 ----
6 git-apply - Apply patch on a git index file and a work tree
7
8
9 SYNOPSIS
10 --------
11 'git-apply' [--stat] [--summary] [--check] [--index] [--apply] [--index-info] [-z] [<patch>...]
12
13 DESCRIPTION
14 -----------
15 Reads supplied diff output and applies it on a git index file
16 and a work tree.
17
18 OPTIONS
19 -------
20 <patch>...::
21         The files to read patch from.  '-' can be used to read
22         from the standard input.
23
24 --stat::
25         Instead of applying the patch, output diffstat for the
26         input.  Turns off "apply".
27
28 --summary::
29         Instead of applying the patch, output a condensed
30         summary of information obtained from git diff extended
31         headers, such as creations, renames and mode changes.
32         Turns off "apply".
33
34 --check::
35         Instead of applying the patch, see if the patch is
36         applicable to the current work tree and/or the index
37         file and detects errors.  Turns off "apply".
38
39 --index::
40         When --check is in effect, or when applying the patch
41         (which is the default when none of the options that
42         disables it is in effect), make sure the patch is
43         applicable to what the current index file records.  If
44         the file to be patched in the work tree is not
45         up-to-date, it is flagged as an error.  This flag also
46         causes the index file to be updated.
47
48 --index-info::
49         Newer git-diff output has embedded 'index information'
50         for each blob to help identify the original version that
51         the patch applies to.  When this flag is given, and if
52         the original version of the blob is available locally,
53         outputs information about them to the standard output.
54
55 -z::
56         When showing the index information, do not munge paths,
57         but use NUL terminated machine readable format.  Without
58         this flag, the pathnames output will have TAB, LF, and
59         backslash characters replaced with `\t`, `\n`, and `\\`,
60         respectively.
61
62 --apply::
63         If you use any of the options marked ``Turns off
64         "apply"'' above, git-apply reads and outputs the
65         information you asked without actually applying the
66         patch.  Give this flag after those flags to also apply
67         the patch.
68
69
70 Author
71 ------
72 Written by Linus Torvalds <torvalds@osdl.org>
73
74 Documentation
75 --------------
76 Documentation by Junio C Hamano
77
78 GIT
79 ---
80 Part of the gitlink:git[7] suite
81