Fixed issue #4140: TortoiseGitMerge Dark mode flashes white when maximized
[TortoiseGit.git] / doc / source / en / TortoiseMerge / tme_app_automation.xml
bloba10bbe3ed0963268ef27d34d1e84d5e2de02f4a9
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE appendix SYSTEM "../../dtd/dblite.dtd">\r
3 <appendix id="tme-automation">\r
4         <title>Automating TortoiseGitMerge</title>\r
5         <simplesect>\r
6                 <para>\r
7                         TortoiseGitMerge can be started with command line parameters to avoid having\r
8                         to go through the <guilabel>Open</guilabel> dialog to select the files\r
9                         yourself. This is useful also if you want to use TortoiseGitMerge from\r
10                         another application.\r
11                 </para>\r
12         </simplesect>\r
13         <!-- ================================================================= -->\r
14         <!-- ======================== SECTION 1 ============================== -->\r
15         <!-- ================================================================= -->\r
16         <sect1 id="tme-automation-basics">\r
17                 <title>TortoiseGitMerge Command Line Switches</title>\r
18                 <indexterm>\r
19                         <primary>automation</primary>\r
20                 </indexterm>\r
21                 <indexterm>\r
22                         <primary>command line</primary>\r
23                 </indexterm>\r
24                 <para>\r
25                         Most switches require additional information like a path or some\r
26                         other string. In those cases, append an ':' to the switch and put\r
27                         the string/path after it. Example:\r
28 <screen>\r
29 /base:"c:\folder\my base file.txt"\r
30 </screen>\r
31                 </para>\r
32 <!--\r
33 ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION\r
34 Don't touch these lines:\r
35 <entry condition="pot">/about</entry>\r
37   The condition="pot" prevents the strings from being extracted into\r
38   the .pot file, so nobody translates them.\r
39   The '/' in front of the command has to stay there to prevent these strings\r
40   from being translated if the po file "by chance" contains a matching translation.\r
41 -->\r
42                 <para>\r
43                         <table id="tme-automation-1-table">\r
44                                 <title>List of available command line options</title>\r
45                                 <tgroup cols="2">\r
46                                         <colspec colnum="1" colwidth="2*"/>\r
47                                         <colspec colnum="2" colwidth="6*"/>\r
48                                         <thead>\r
49                                                 <row>\r
50                                                         <entry>Command</entry>\r
51                                                         <entry>Description</entry>\r
52                                                 </row>\r
53                                         </thead>\r
54                                         <tbody>\r
55                                                 <row>\r
56                                                         <entry condition="pot">/?</entry>\r
57                                                         <entry>\r
58                                                                 Shows a dialog box with the most important command line\r
59                                                                 switches.\r
60                                                         </entry>\r
61                                                 </row>\r
62                                                 <row>\r
63                                                         <entry condition="pot">/help</entry>\r
64                                                         <entry>\r
65                                                                 The same as <option>?</option>.\r
66                                                         </entry>\r
67                                                 </row>\r
68                                                 <row>\r
69                                                         <entry condition="pot">/base</entry>\r
70                                                         <entry>\r
71                                                                 Specifies the <emphasis>base</emphasis> file used\r
72                                                                 in three way diffs. This is the common ancestor\r
73                                                                 of the files being diffed, although it is not\r
74                                                                 shown in a separate window.\r
75                                                                 For two way diffs, this is the left file.\r
76                                                         </entry>\r
77                                                 </row>\r
78                                                 <row>\r
79                                                         <entry condition="pot">/basename</entry>\r
80                                                         <entry>\r
81                                                                 The name of the base file.\r
82                                                                 This is shown in the view title instead of the file path.\r
83                                                                 For three way diffs it is shown in a tooltip for the\r
84                                                                 view title.\r
85                                                         </entry>\r
86                                                 </row>\r
87                                                 <row>\r
88                                                         <entry condition="pot">/basereflectedname</entry>\r
89                                                         <entry>\r
90                                                                 The name to use for EditorConfig templates.\r
91                                                         </entry>\r
92                                                 </row>\r
93                                                 <row>\r
94                                                         <entry condition="pot">/theirs</entry>\r
95                                                         <entry>\r
96                                                                 Specifies the <emphasis>theirs</emphasis> file used\r
97                                                                 in three way diffs, displayed in the left pane.\r
98                                                         </entry>\r
99                                                 </row>\r
100                                                 <row>\r
101                                                         <entry condition="pot">/theirsname</entry>\r
102                                                         <entry>\r
103                                                                 The name of the theirs file. This is shown in the\r
104                                                                 view title instead of the file path.\r
105                                                         </entry>\r
106                                                 </row>\r
107                                                 <row>\r
108                                                         <entry condition="pot">/theirsreflectedname</entry>\r
109                                                         <entry>\r
110                                                                 The name to use for EditorConfig templates.\r
111                                                         </entry>\r
112                                                 </row>\r
113                                                 <row>\r
114                                                         <entry condition="pot">/mine</entry>\r
115                                                         <entry>\r
116                                                                 Specifies the <emphasis>mine</emphasis> file used\r
117                                                                 in three way diffs, displayed in the right pane.\r
118                                                                 For two way diffs, this is the right file.\r
119                                                         </entry>\r
120                                                 </row>\r
121                                                 <row>\r
122                                                         <entry condition="pot">/minename</entry>\r
123                                                         <entry>\r
124                                                                 The name of the mine file. This is shown in the\r
125                                                                 view title instead of the file path.\r
126                                                         </entry>\r
127                                                 </row>\r
128                                                 <row>\r
129                                                         <entry condition="pot">/minereflectedname</entry>\r
130                                                         <entry>\r
131                                                                 The name to use for EditorConfig templates.\r
132                                                         </entry>\r
133                                                 </row>\r
134                                                 <row>\r
135                                                         <entry condition="pot">/merged</entry>\r
136                                                         <entry>\r
137                                                                 Specifies the resulting <emphasis>merged</emphasis> file used\r
138                                                                 in three way diffs. This is the file path where the result of\r
139                                                                 the merge/conflict resolving is saved.\r
140                                                                 If this is not set, then TortoiseGitMerge will ask the user where\r
141                                                                 to save the result.\r
142                                                         </entry>\r
143                                                 </row>\r
144                                                 <row>\r
145                                                         <entry condition="pot">/mergedname</entry>\r
146                                                         <entry>\r
147                                                                 The name of the merged file. This is shown in the\r
148                                                                 view title instead of the file path.\r
149                                                         </entry>\r
150                                                 </row>\r
151                                                 <row>\r
152                                                         <entry condition="pot">/mergedreflectedname</entry>\r
153                                                         <entry>\r
154                                                                 The name to use for EditorConfig templates.\r
155                                                         </entry>\r
156                                                 </row>\r
157                                                 <row>\r
158                                                         <entry condition="pot">/patchpath</entry>\r
159                                                         <entry>\r
160                                                                 The path where a patch should be applied to. If you don't\r
161                                                                 set this path, then TortoiseGitMerge will try to find the path\r
162                                                                 itself to match the paths in the patch file, but that can take\r
163                                                                 <emphasis>very long</emphasis>.\r
164                                                         </entry>\r
165                                                 </row>\r
166                                                 <row>\r
167                                                         <entry condition="pot">/saverequired</entry>\r
168                                                         <entry>\r
169                                                                 If specified, forces TortoiseGitMerge to ask to save the file\r
170                                                                 before exiting, even if the user does not modify the files.\r
171                                                         </entry>\r
172                                                 </row>\r
173                                                 <row>\r
174                                                         <entry condition="pot">/saverequiredonconflicts</entry>\r
175                                                         <entry>\r
176                                                                 If specified, forces TortoiseGitMerge to ask to save the file\r
177                                                                 before exiting if there are conflicts found, even if the user\r
178                                                                 does not modify the files.\r
179                                                         </entry>\r
180                                                 </row>\r
181                                                 <row>\r
182                                                         <entry condition="pot">/patchoriginal</entry>\r
183                                                         <entry>\r
184                                                                 The name of the original file to patch. Used for the view\r
185                                                                 title.\r
186                                                         </entry>\r
187                                                 </row>\r
188                                                 <row>\r
189                                                         <entry condition="pot">/patchpatched</entry>\r
190                                                         <entry>\r
191                                                                 The name of the resulting patched file. Used for the view\r
192                                                                 title.\r
193                                                         </entry>\r
194                                                 </row>\r
195                                                 <row>\r
196                                                         <entry condition="pot">/diff</entry>\r
197                                                         <entry>\r
198                                                                 The path to the patch/diff file to apply to a directory.\r
199                                                         </entry>\r
200                                                 </row>\r
201                                                 <row>\r
202                                                         <entry condition="pot">/oneway</entry>\r
203                                                         <entry>\r
204                                                                 Forces TortoiseGitMerge to start with the one-way view\r
205                                                                 instead of the view the user specified in the settings.\r
206                                                         </entry>\r
207                                                 </row>\r
208                                                 <row>\r
209                                                         <entry condition="pot">/reversedpatch</entry>\r
210                                                         <entry>\r
211                                                                 Switches the left and right view of the specified\r
212                                                                 two files to diff.\r
213                                                         </entry>\r
214                                                 </row>\r
215                                                 <row>\r
216                                                         <entry condition="pot">/createunifieddiff</entry>\r
217                                                         <entry>\r
218                                                                 Creates a unified diff file (patch file) of two files\r
219                                                                 specified with\r
220                                                                 <literal>/origfile:"path_to_original_file"</literal> and\r
221                                                                 <literal>/modifiedfile:"path_to_modified_file"</literal>.\r
222                                                                 The target path is set with\r
223                                                                 <literal>/outfile:"path_to_resulting_patchfile"</literal>.\r
224                                                                 If <literal>/outfile</literal> is not set, a file save dialog\r
225                                                                 is shown so the user can choose the location to save the\r
226                                                                 patch file.\r
227                                                                 Note: If <literal>/createunifieddiff</literal> is set,\r
228                                                                 all other parameters are ignored.\r
229                                                         </entry>\r
230                                                 </row>\r
231                                                 <row>\r
232                                                         <entry condition="pot">/line</entry>\r
233                                                         <entry>\r
234                                                                 Specifies a line number to jump to after loading\r
235                                                                 the files.\r
236                                                         </entry>\r
237                                                 </row>\r
238                                                 <row>\r
239                                                         <entry condition="pot">/readonly</entry>\r
240                                                         <entry>\r
241                                                                 Prevents the file from being edited. That means\r
242                                                                 the editing capabilities of TortoiseGitMerge are\r
243                                                                 disabled.\r
244                                                         </entry>\r
245                                                 </row>\r
246                                         </tbody>\r
247                                 </tgroup>\r
248                         </table>\r
249                 </para>\r
250                 <para>\r
251                         You can also supply simple filenames on the command line for compatibility\r
252                         with other diff programs. In this simplified form the command line is\r
253 <screen>\r
254 TortoiseGitMerge BaseFilePath MyFilePath [ TheirFilePath ]\r
255 </screen>\r
256                         If two files are given they will be compared with each other.\r
257                         If three files are given, the first is taken as the BASE file,\r
258                         and the other two are compared with it in a three-way diff.\r
259                 </para>\r
260         </sect1>\r
261 </appendix>\r