Update README.txt
[GitSharp.git] / GitSharp / Stubs / GrepCommand.cs
blobe12a803dcabd073d5b3a6031805defbee1acf2b2
1 /*
2 * Copyright (C) 2010, Dominique van de Vorle <dvdvorle@gmail.com>
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or
7 * without modification, are permitted provided that the following
8 * conditions are met:
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * - Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
18 * - Neither the name of the Git Development Community nor the
19 * names of its contributors may be used to endorse or promote
20 * products derived from this software without specific prior
21 * written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
24 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
25 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 using System;
39 using System.Collections.Generic;
40 using System.IO;
41 using System.Linq;
42 using System.Text;
44 namespace GitSharp.Commands
46 public class GrepCommand
47 : AbstractCommand
50 public GrepCommand() {
53 // note: the naming of command parameters is not following .NET conventions in favour of git command line parameter naming conventions.
55 #region Properties / Options
56 public List<string> Arguments { get; set; }
57 /// <summary>
58 /// Not implemented
59 ///
60 /// Instead of searching in the working tree files, check
61 /// the blobs registered in the index file.
62 ///
63 /// </summary>
64 public bool Cached { get; set; }
66 /// <summary>
67 /// Not implemented
68 ///
69 /// Process binary files as if they were text.
70 ///
71 /// </summary>
72 public bool Text { get; set; }
74 /// <summary>
75 /// Not implemented
76 ///
77 /// Ignore case differences between the patterns and the
78 /// files.
79 ///
80 /// </summary>
81 public bool IgnoreCase { get; set; }
83 /// <summary>
84 /// Not implemented
85 ///
86 /// Don't match the pattern in binary files.
87 ///
88 /// </summary>
89 public bool I { get; set; }
91 /// <summary>
92 /// Not implemented
93 ///
94 /// For each pathspec given on command line, descend at most &lt;depth&gt;
95 /// levels of directories. A negative value means no limit.
96 ///
97 /// </summary>
98 public string MaxDepth { get; set; }
100 /// <summary>
101 /// Not implemented
102 ///
103 /// Match the pattern only at word boundary (either begin at the
104 /// beginning of a line, or preceded by a non-word character; end at
105 /// the end of a line or followed by a non-word character).
106 ///
107 /// </summary>
108 public bool WordRegexp { get; set; }
110 /// <summary>
111 /// Not implemented
112 ///
113 /// Select non-matching lines.
114 ///
115 /// </summary>
116 public bool InvertMatch { get; set; }
118 /// <summary>
119 /// Not implemented
120 ///
121 /// By default, the command shows the filename for each
122 /// match. `-h` option is used to suppress this output.
123 /// `-H` is there for completeness and does not do anything
124 /// except it overrides `-h` given earlier on the command
125 /// line.
126 ///
127 /// </summary>
128 public bool H { get; set; }
130 /// <summary>
131 /// Not implemented
132 ///
133 /// When run from a subdirectory, the command usually
134 /// outputs paths relative to the current directory. This
135 /// option forces paths to be output relative to the project
136 /// top directory.
137 ///
138 /// </summary>
139 public bool FullName { get; set; }
141 /// <summary>
142 /// Not implemented
143 ///
144 /// Use POSIX extended/basic regexp for patterns. Default
145 /// is to use basic regexp.
146 ///
147 /// </summary>
148 public bool ExtendedRegexp { get; set; }
150 /// <summary>
151 /// Not implemented
152 ///
153 /// Use POSIX extended/basic regexp for patterns. Default
154 /// is to use basic regexp.
155 ///
156 /// </summary>
157 public bool BasicRegexp { get; set; }
159 /// <summary>
160 /// Not implemented
161 ///
162 /// Use fixed strings for patterns (don't interpret pattern
163 /// as a regex).
164 ///
165 /// </summary>
166 public bool FixedStrings { get; set; }
168 /// <summary>
169 /// Not implemented
170 ///
171 /// Prefix the line number to matching lines.
172 ///
173 /// </summary>
174 public bool N { get; set; }
176 /// <summary>
177 /// Not implemented
178 ///
179 /// Instead of showing every matched line, show only the
180 /// names of files that contain (or do not contain) matches.
181 /// For better compatibility with 'git-diff', --name-only is a
182 /// synonym for --files-with-matches.
183 ///
184 /// </summary>
185 public bool FilesWithMatches { get; set; }
187 /// <summary>
188 /// Not implemented
189 ///
190 /// Instead of showing every matched line, show only the
191 /// names of files that contain (or do not contain) matches.
192 /// For better compatibility with 'git-diff', --name-only is a
193 /// synonym for --files-with-matches.
194 ///
195 /// </summary>
196 public bool NameOnly { get; set; }
198 /// <summary>
199 /// Not implemented
200 ///
201 /// Instead of showing every matched line, show only the
202 /// names of files that contain (or do not contain) matches.
203 /// For better compatibility with 'git-diff', --name-only is a
204 /// synonym for --files-with-matches.
205 ///
206 /// </summary>
207 public bool FilesWithoutMatch { get; set; }
209 /// <summary>
210 /// Not implemented
211 ///
212 /// Output \0 instead of the character that normally follows a
213 /// file name.
214 ///
215 /// </summary>
216 public bool Null { get; set; }
218 /// <summary>
219 /// Not implemented
220 ///
221 /// Instead of showing every matched line, show the number of
222 /// lines that match.
223 ///
224 /// </summary>
225 public bool Count { get; set; }
227 /// <summary>
228 /// Not implemented
229 ///
230 /// Show colored matches.
231 ///
232 /// </summary>
233 public bool Color { get; set; }
235 /// <summary>
236 /// Not implemented
237 ///
238 /// Turn off match highlighting, even when the configuration file
239 /// gives the default to color output.
240 ///
241 /// </summary>
242 public bool NoColor { get; set; }
244 /// <summary>
245 /// Not implemented
246 ///
247 /// Show `context` trailing (`A` -- after), or leading (`B`
248 /// -- before), or both (`C` -- context) lines, and place a
249 /// line containing `--` between contiguous groups of
250 /// matches.
251 ///
252 /// </summary>
253 public string A { get; set; }
255 /// <summary>
256 /// Not implemented
257 ///
258 /// Show `context` trailing (`A` -- after), or leading (`B`
259 /// -- before), or both (`C` -- context) lines, and place a
260 /// line containing `--` between contiguous groups of
261 /// matches.
262 ///
263 /// </summary>
264 public string B { get; set; }
266 /// <summary>
267 /// Not implemented
268 ///
269 /// Show `context` trailing (`A` -- after), or leading (`B`
270 /// -- before), or both (`C` -- context) lines, and place a
271 /// line containing `--` between contiguous groups of
272 /// matches.
273 ///
274 /// </summary>
275 public string C { get; set; }
277 /// <summary>
278 /// Not implemented
279 ///
280 /// Show the preceding line that contains the function name of
281 /// the match, unless the matching line is a function name itself.
282 /// The name is determined in the same way as 'git diff' works out
283 /// patch hunk headers (see 'Defining a custom hunk-header' in
284 /// linkgit:gitattributes[5]).
285 ///
286 /// </summary>
287 public bool ShowFunction { get; set; }
289 /// <summary>
290 /// Not implemented
291 ///
292 /// Read patterns from &lt;file&gt;, one per line.
293 ///
294 /// </summary>
295 public string F { get; set; }
297 /// <summary>
298 /// Not implemented
299 ///
300 /// The next parameter is the pattern. This option has to be
301 /// used for patterns starting with - and should be used in
302 /// scripts passing user input to grep. Multiple patterns are
303 /// combined by 'or'.
304 ///
305 /// </summary>
306 public bool E { get; set; }
308 /// <summary>
309 /// Not implemented
310 ///
311 /// ( ... )::
312 /// Specify how multiple patterns are combined using Boolean
313 /// expressions. `--or` is the default operator. `--and` has
314 /// higher precedence than `--or`. `-e` has to be used for all
315 /// patterns.
316 ///
317 /// </summary>
318 public bool And { get; set; }
320 /// <summary>
321 /// Not implemented
322 ///
323 /// ( ... )::
324 /// Specify how multiple patterns are combined using Boolean
325 /// expressions. `--or` is the default operator. `--and` has
326 /// higher precedence than `--or`. `-e` has to be used for all
327 /// patterns.
328 ///
329 /// </summary>
330 public bool Or { get; set; }
332 /// <summary>
333 /// Not implemented
334 ///
335 /// ( ... )::
336 /// Specify how multiple patterns are combined using Boolean
337 /// expressions. `--or` is the default operator. `--and` has
338 /// higher precedence than `--or`. `-e` has to be used for all
339 /// patterns.
340 ///
341 /// </summary>
342 public bool Not { get; set; }
344 /// <summary>
345 /// Not implemented
346 ///
347 /// When giving multiple pattern expressions combined with `--or`,
348 /// this flag is specified to limit the match to files that
349 /// have lines to match all of them.
350 ///
351 /// </summary>
352 public bool AllMatch { get; set; }
354 #endregion
356 public override void Execute()
358 throw new NotImplementedException();