- 04 12月, 2007 1 次提交
-
-
由 Christian Couder 提交于
Now that str_buf takes care of all the allocations, there is no more gain to pass an argument count. So this patch removes the "count" argument from: - "sq_quote_argv" - "trace_argv_printf" and all the callers. Signed-off-by: NChristian Couder <chriscool@tuxfamily.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 9月, 2007 3 次提交
-
-
由 Pierre Habouzit 提交于
* sq_quote_buf is made public, and works on a strbuf. * sq_quote_argv also works on a strbuf. * make sq_quote_argv take a "maxlen" argument to check the buffer won't grow too big. Signed-off-by: NPierre Habouzit <madcoder@debian.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Pierre Habouzit 提交于
* quote_c_style works on a strbuf instead of a wild buffer. * quote_c_style is now clever enough to not add double quotes if not needed. * write_name_quoted inherits those advantages, but also take a different set of arguments. Now instead of asking for quotes or not, you pass a "terminator". If it's \0 then we assume you don't want to escape, else C escaping is performed. In any case, the terminator is also appended to the stream. It also no longer takes the prefix/prefix_len arguments, as it's seldomly used, and makes some optimizations harder. * write_name_quotedpfx is created to work like write_name_quoted and take the prefix/prefix_len arguments. Thanks to those API changes, diff.c has somehow lost weight, thanks to the removal of functions that were wrappers around the old write_name_quoted trying to give it a semantics like the new one, but performing a lot of allocations for this goal. Now we always write directly to the stream, no intermediate allocation is performed. As a side effect of the refactor in builtin-apply.c, the length of the bar graphs in diffstats are not affected anymore by the fact that the path was clipped. Signed-off-by: NPierre Habouzit <madcoder@debian.org>
-
由 Pierre Habouzit 提交于
If the gain is not obvious in the diffstat, the resulting code is more readable, _and_ in checkout-index/update-index we now reuse the same buffer to unquote strings instead of always freeing/mallocing. This also is more coherent with the next patch that reworks quoting functions. The quoting function is also made more efficient scanning for backslashes and treating portions of strings without a backslash at once. Signed-off-by: NPierre Habouzit <madcoder@debian.org>
-
- 08 6月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 29 1月, 2007 1 次提交
-
-
由 Shawn O. Pearce 提交于
Love it or hate it, some people actually still program in Tcl. Some of those programs are meant for interfacing with Git. Programs such as gitk and git-gui. It may be useful to have Tcl-safe output available from for-each-ref, just like shell, Perl and Python already enjoy. Thanks to Sergey Vlasov for pointing out the horrible flaws in the first and second version of this patch, and steering me in the right direction for Tcl value quoting. Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 17 9月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
This adds a new command, git-for-each-ref. You can have it iterate over refs and have it output various aspects of the objects they refer to. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 11 9月, 2006 1 次提交
-
-
由 Christian Couder 提交于
So that this function may be used in places other than "rsh.c". Signed-off-by: NChristian Couder <chriscool@tuxfamily.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 03 9月, 2006 1 次提交
-
-
由 Christian Couder 提交于
If GIT_TRACE is set to an absolute path (starting with a '/' character), we interpret this as a file path and we trace into it. Also if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. This patch makes it possible to get trace information when running "make test". Signed-off-by: NChristian Couder <chriscool@tuxfamily.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 01 9月, 2006 1 次提交
-
-
由 Christian Couder 提交于
Now if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. It's now possible to run the tests like this: GIT_TRACE=9 make test 9>/var/tmp/trace.log Signed-off-by: NChristian Couder <chriscool@tuxfamily.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 09 7月, 2006 1 次提交
-
-
由 Matthias Lederhofer 提交于
With the environment variable GIT_TRACE set git will show - alias expansion - built-in command execution - external command execution on stderr. Signed-off-by: NMatthias Lederhofer <matled@gmx.net> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 29 11月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
This is to prepare for ls-tree updates. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 25 10月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
This adds a very git specific restricted shell, that can be added to /etc/shells and set to the pw_shell in the /etc/passwd file, to give users ability to push into repositories over ssh without giving them full interactive shell acount. [jc: I updated Linus' patch to match what the current sq_quote() does.] Signed-off-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 18 10月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
Following the list discussion, define two functions, quote_c_style and unquote_c_style, to help adopting the proposed way for quoting funny pathname letters for GNU patch. The rule is described in: http://marc.theaimsgroup.com/?l=git&m=112927316408690&w=2 Currently we do not support the leading '!', but we probably should barf upon seeing it. Rule B4. is interpreted to require always 3 octal digits in \XYZ notation. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 17 10月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
Following the list discussion, define two functions, quote_c_style and unquote_c_style, to help adopting the proposed way for quoting funny pathname letters for GNU patch. The rule is described in: http://marc.theaimsgroup.com/?l=git&m=112927316408690&w=2 Currently we do not support the leading '!', but we probably should barf upon seeing it. Rule B4. is interpreted to require always 3 octal digits in \XYZ notation. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 11 10月, 2005 1 次提交
-
-
由 H. Peter Anvin 提交于
Create function to sq_quote into a buffer Handle !'s for csh-based shells Signed-off-by: NH. Peter Anvin <hpa@zytor.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 09 7月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
A useful shell safety helper sq_expand() was hidden as a static function in diff.c. Extract it out and make it available as sq_quote(). Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-