- 02 9月, 2006 1 次提交
-
-
由 Shawn Pearce 提交于
Like xmalloc and xrealloc xstrdup dies with a useful message if the native strdup() implementation returns NULL rather than a valid pointer. I just tried to use xstrdup in new code and found it to be missing. However I expected it to be present as xmalloc and xrealloc are already commonly used throughout the code. [jc: removed the part that deals with last_XXX, which I am finding more and more dubious these days.] Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 24 8月, 2006 1 次提交
-
-
由 Shawn Pearce 提交于
This abstracts away the size of the hash values when copying them from memory location to memory location, much as the introduction of hashcmp abstracted away hash value comparsion. A few call sites were using char* rather than unsigned char* so I added the cast rather than open hashcpy to be void*. This is a reasonable tradeoff as most call sites already use unsigned char* and the existing hashcmp is also declared to be unsigned char*. [jc: Splitted the patch to "master" part, to be followed by a patch for merge-recursive.c which is not in "master" yet. Fixed the cast in the latter hunk to combine-diff.c which was wrong in the original. Also converted ones left-over in combine-diff.c, diff-lib.c and upload-pack.c ] Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 18 8月, 2006 1 次提交
-
-
由 David Rientjes 提交于
Introduces global inline: hashcmp(const unsigned char *sha1, const unsigned char *sha2) Uses memcmp for comparison and returns the result based on the length of the hash name (a future runtime decision). Acked-by: NAlex Riesen <raa.lkml@gmail.com> Signed-off-by: NDavid Rientjes <rientjes@google.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 17 8月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
This matches the format previous "git-apply --reverse" update expects. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 16 8月, 2006 2 次提交
-
-
由 David Rientjes 提交于
[jc: I needed to hand merge the changes to the updated codebase, so the result needs to be checked.] Signed-off-by: NDavid Rientjes <rientjes@google.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 David Rientjes 提交于
Replace sha1 comparisons to null_sha1 with a global inline (which previously an unused static inline in builtin-apply.c) [jc: with a fix from Jonas Fonseca.] Signed-off-by: NDavid Rientjes <rientjes@google.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 15 8月, 2006 1 次提交
-
-
由 David Rientjes 提交于
Removes conditional return. Signed-off-by: NDavid Rientjes <rientjes@google.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 11 8月, 2006 1 次提交
-
-
由 Johannes Schindelin 提交于
With this option, the changed words are shown inline. For example, if a file containing "This is foo" is changed to "This is bar", the diff will now show "This is " in plain text, "foo" in red, and "bar" in green. Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 10 8月, 2006 2 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 04 8月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
The final output from diff used to compare pathnames between preimage and postimage to tell if the filepair is a rename/copy. By explicitly marking the filepair created by diffcore_rename(), the output routine, resolve_rename_copy(), does not have to do so anymore. This helps feeding a filepair that has different pathnames in one and two elements to the diff machinery (most notably, comparing two blobs). Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 01 8月, 2006 1 次提交
-
-
由 Matthias Lederhofer 提交于
enable/disable colored output when the pager is in use Signed-off-by: NMatthias Lederhofer <matled@gmx.net> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 24 7月, 2006 1 次提交
-
-
由 Jeff King 提交于
When paging through the output of git-whatchanged, the color cues help to visually navigate within a diff. However, it is difficult to notice when a new commit starts, because the commit and log are shown in the "normal" color. This patch colorizes the 'commit' line, customizable through diff.colors.commit and defaulting to yellow. As a side effect, some of the diff color engine (slot enum, get_color) has become accessible outside of diff.c. Signed-off-by: NJeff King <peff@peff.net> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 14 7月, 2006 2 次提交
-
-
由 Timo Hirvonen 提交于
Add support for more than 8 colors. Colors can be specified as numbers -1..255. -1 is same as "normal". Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
Make it possible to set both colors and a attribute for diff colors. Background colors are supported too. Syntax is now: [attr] [fg [bg]] [fg [bg]] [attr] Empty value is same as "normal normal", ie use default colors. The new syntax is backwards compatible. Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 10 7月, 2006 1 次提交
-
-
由 Shawn Pearce 提交于
In a handful places, we use C99 structure and array initializers, which some compilers do not support. This can be handy when you are trying to compile GIT on a Solaris system that has an older C compiler, for example. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 09 7月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
This allows you to say: git -p diff v2.6.16-rc5.. and the command pipes the output of any git command to your pager. [jc: this resurrects a month old RFC patch with improvement suggested by Linus to call it --paginate instead of --less.] Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 08 7月, 2006 6 次提交
-
-
由 Junio C Hamano 提交于
The Porcelainish has become so much usable as the UI that there is not much reason people should be using the core programs by hand anymore. At this point we are better off making the behaviour of the core programs predictable by keeping them unaffected by the configuration variables. Otherwise they will become very hard to use as reliable building blocks. For example, "git-commit -a" internally uses git-diff-files to figure out the set of paths that need to be updated in the index, and we should never allow diff.renames that happens to be in the configuration to interfere (or slow down the process). The UI level configuration such as showing renamed diff and coloring are still honored by the Porcelainish ("git log" family and "git diff"), but not by the core anymore. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Even if the standard output is connected to a tty, do not colorize the diff if we are talking to a dumb terminal when diff.color configuration variable is set to "auto". Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Eric Wong 提交于
diff.renames is mentioned several times in the documentation, but to my surprise it didn't do anything before this patch. Also add the --no-renames option to override this from the command-line. Signed-off-by: NEric Wong <normalperson@yhbt.net> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Stephan Feder 提交于
Signed-off-by: NStephan Feder <sf@b-i-t.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Stephan Feder 提交于
Add new item text to struct diff_options. If set then do not try to detect binary files. Signed-off-by: NStephan Feder <sf@b-i-t.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 07 7月, 2006 1 次提交
-
-
由 Stephan Feder 提交于
The binary file detection is just a heuristic which can well fail. Do not produce garbage patches in these cases. Signed-off-by: NStephan Feder <sf@b-i-t.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 04 7月, 2006 1 次提交
-
-
由 Joachim B Haga 提交于
With the change in default, "git add ." on kernel dir is about twice as fast as before, with only minimal (0.5%) change in object size. The speed difference is even more noticeable when committing large files, which is now up to 8 times faster. The configurability is through setting core.compression = [-1..9] which maps to the zlib constants; -1 is the default, 0 is no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest. Signed-off-by: Joachim B Haga (cjhaga@fys.uio.no) Acked-by: NLinus Torvalds <torvalds@osdl.org> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 02 7月, 2006 1 次提交
-
-
由 Timo Hirvonen 提交于
Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 29 6月, 2006 1 次提交
-
-
由 Junio C Hamano 提交于
The function internally generated diff to get the patch id but passed a wrong emit flags to the xdiff layer when it did so. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 28 6月, 2006 3 次提交
-
-
由 Junio C Hamano 提交于
This fixes various problems in the new diff options code. - Fix --cc/-c --patch; it showed two-tree diff used internally. - Use "---\n" only where it matters -- that is, use it immediately after the commit log text when we show a commit log and something else before the patch text. - Do not output spurious extra "\n"; have an extra newline after the commit log text always when we have diff output and we are not doing oneline. - When running a pickaxe you need to go recursive. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
setup_revisions() calls diff_setup_done() before we can set default value for output_format. Don't convert DIFF_FORMAT_NO_OUTPUT to 0 in diff_setup_done(), it is useless and makes diff-tree believe no diff format parameters were given and thus lets it reset output_format to DIFF_FORMAT_RAW. Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 27 6月, 2006 6 次提交
-
-
由 Timo Hirvonen 提交于
Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
Add msg_sep variable to struct diff_options. msg_sep is printed after commit message. Default is "\n", format-patch sets it to "---\n". This also removes the second argument from show_log() because all callers derived it from the first argument: show_log(rev, rev->loginfo, ... Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
Initialize output_format to 0 instead of DIFF_FORMAT_RAW so that we can see later if any command line options changed it. Default value is set only if output format was not specified. Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
DIFF_FORMAT_* are now bit-flags instead of enumerated values. Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Johannes Schindelin 提交于
Call it like this: unsigned char id[20]; if (diff_flush_patch_id(diff_options, id)) printf("And the patch id is: %s\n", sha1_to_hex(id)); Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 25 6月, 2006 2 次提交
-
-
由 Junio C Hamano 提交于
This lets you use something like this in your $GIT_DIR/config file. [diff] color = auto [diff.color] new = blue old = yellow frag = reverse When diff.color is set to "auto", colored diff is enabled when the standard output is the terminal. Other choices are "always", and "never". Usual boolean true/false can also be used. The colormap entries can specify colors for the following slots: plain - lines that appear in both old and new file (context) meta - diff --git header and extended git diff headers frag - @@ -n,m +l,k @@ lines (hunk header) old - lines deleted from old file new - lines added to new file The following color names can be used: normal, bold, dim, l, blink, reverse, reset, black, red, green, yellow, blue, magenta, cyan, white Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Timo Hirvonen 提交于
Signed-off-by: NTimo Hirvonen <tihirvon@gmail.com> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 24 6月, 2006 2 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Johannes Schindelin 提交于
This adds -b (--ignore-space-change) and -w (--ignore-all-space) flags to diff. The main part of the patch is teaching libxdiff about it. [jc: renamed xdl_line_match() to xdl_recmatch() since the former is used for different purposes in xpatchi.c which is in the parts of the upstream source we do not use.] Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: NJunio C Hamano <junkio@cox.net>
-