- 17 5月, 2012 1 次提交
-
-
由 Bobby Powers 提交于
Commit 875b91b3 (diff --no-index: use strbuf for temporary pathnames, 2012-04-25) introduced a regression when using diff --no-index with directories. When iterating through a directory, the switch to strbuf from heap-allocated char arrays caused paths to form like 'dir/file1', 'dir/file1file2', rather than 'dir/file1', 'dir/file2' as expected. Avoid this by resetting the paths variables to their original length before each iteration. Signed-off-by: NBobby Powers <bobbypowers@gmail.com> Reviewed-by: NRené Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 4月, 2012 1 次提交
-
-
由 Junio C Hamano 提交于
Instead of using limited-length buffers and risking of pathname truncation, we should be taking advantage of strbuf API nowadays. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 17 4月, 2012 1 次提交
-
-
由 Jim Meyering 提交于
Due to the use of strncpy without explicit NUL termination, we could end up passing names n1 or n2 that are not NUL-terminated to queue_diff, which requires NUL-terminated strings. Ensure that each is NUL terminated. Signed-off-by: NJim Meyering <meyering@redhat.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 04 2月, 2011 2 次提交
-
-
由 Nguyễn Thái Ngọc Duy 提交于
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
diff_options.{paths,nr_paths} will be removed later. Do not modify them directly. Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 7月, 2010 1 次提交
-
-
由 Thiago Farina 提交于
Acked-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NThiago Farina <tfransosi@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 28 6月, 2010 1 次提交
-
-
由 Julian Phillips 提交于
Update the definition and callers of string_list_insert to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: NJulian Phillips <julian@quantumfyre.co.uk> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 26 5月, 2010 1 次提交
-
-
由 Clemens Buchacher 提交于
If we are in a git directory, get_git_work_tree() can return NULL. While trying to determine whether or not the given paths are outside the work tree, the following command would read from it anyways and trigger a segmentation fault. git diff / / Signed-off-by: NClemens Buchacher <drizzd@aon.at> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 11 11月, 2009 1 次提交
-
-
由 Jonathan Nieder 提交于
Start the diff --no-index usage string with "usage:" instead of "fatal:". Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 02 5月, 2009 1 次提交
-
-
由 Felipe Contreras 提交于
Essentially; s/type* /type */ as per the coding guidelines. Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 26 3月, 2009 1 次提交
-
-
由 Johannes Sixt 提交于
Previously, 'git diff --no-index --stat a b' generated patch output in addition to the --stat output (or whatever other output format was requested). Now only the requested output is generated, and patch output remains the default. Signed-off-by: NJohannes Sixt <j6t@kdbg.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 08 3月, 2009 1 次提交
-
-
由 Johannes Schindelin 提交于
When launching "diff --no-index" with a parameter "/dev/null", the MSys bash converts the "/dev/null" to a "nul", which usually makes sense. But Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 19 2月, 2009 1 次提交
-
-
由 Michael Spang 提交于
We display empty diffs for files whose timestamps have changed. Usually, refreshing the index makes those empty diffs go away. However, when not using the index they are not very useful and there is no option to suppress them. This forces on the skip_stat_unmatch option for diff --no-index, suppressing any empty diffs. This option is also used for diffs against the index when "diff.autorefreshindex" is set, but that option does not apply to diff --no-index. Signed-off-by: NMichael Spang <mspang@uwaterloo.ca> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 31 1月, 2009 1 次提交
-
-
由 Johannes Schindelin 提交于
When trying to find out mode changes, we should not access the symlink targets using stat(); instead we use lstat() so that the diff does not fail trying to find a non-existing symlink target. Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 08 1月, 2009 1 次提交
-
-
由 Thomas Rast 提交于
We forgot to move to the next argument when parsing -q, getting stuck in an endless loop. Signed-off-by: NThomas Rast <trast@student.ethz.ch> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 07 1月, 2009 2 次提交
-
-
由 Thomas Rast 提交于
We need to parse options before we can see if --exit-code was provided. Signed-off-by: NThomas Rast <trast@student.ethz.ch> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Thomas Rast 提交于
Accept -- as an "end of options" marker even when using --no-index. Previously, the -- triggered a "normal" index/tree diff and subsequently failed because of the unrecognized (in that mode) --no-index. Note that the second loop can treat '--' as a normal option, because the preceding checks ensure it is the third-to-last argument. While at it, fix the parsing of "-q" option in --no-index mode as well. Signed-off-by: NThomas Rast <trast@student.ethz.ch> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 31 8月, 2008 1 次提交
-
-
由 Junio C Hamano 提交于
With a new configuration "diff.mnemonicprefix", "git diff" shows the differences between various combinations of preimage and postimage trees with prefixes different from the standard "a/" and "b/". Hopefully this will make the distinction stand out for some people. "git diff" compares the (i)ndex and the (w)ork tree; "git diff HEAD" compares a (c)ommit and the (w)ork tree; "git diff --cached" compares a (c)ommit and the (i)ndex; "git-diff HEAD:file1 file2" compares an (o)bject and a (w)ork tree entity; "git diff --no-index a b" compares two non-git things (1) and (2). Because these mnemonics now have meanings, they are swapped when reverse diff is in effect and this feature is enabled. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 22 7月, 2008 1 次提交
-
-
由 Johannes Schindelin 提交于
The name path_list was correct for the first usage of that data structure, but it really is a general-purpose string list. $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list) $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list) $ git mv path-list.h string-list.h $ git mv path-list.c string-list.c $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path) $ perl -i -pe 's/path/string/g' string-list.[ch] $ git mv Documentation/technical/api-path-list.txt \ Documentation/technical/api-string-list.txt $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths) ... and then fix all users of string-list to access the member "string" instead of "path". Documentation/technical/api-string-list.txt needed some rewrapping, too. Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 5月, 2008 2 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
Even when inside a git work tree, if two paths are given and at least one is clearly outside the work tree, it cannot be a request to diff a tracked path anyway; allow such an invocation to use --no-index semantics. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 24 5月, 2008 1 次提交
-
-
由 Junio C Hamano 提交于
Even if "foo" and/or "bar" does not exist in index, "git diff foo bar" should not change behaviour drastically from "git diff foo bar baz" or "git diff foo". A feature that "sometimes works and is handy" is an unreliable cute hack. "git diff foo bar" outside a git repository continues to work as a more colourful alternative to "diff -u" as before. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-