- 07 8月, 2010 1 次提交
-
-
由 Jonathan Nieder 提交于
Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 7月, 2010 2 次提交
-
-
由 Jay Soffian 提交于
0af0ac7e (Move MERGE_RR from .git/rr-cache/ into .git/) moved the location of MERGE_RR but I found a few references to the old location. Signed-off-by: NJay Soffian <jaysoffian@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 SZEDER Gábor 提交于
'rerere gc' prunes resolutions of conflicted merges that occurred long time ago, and when doing so it takes the creation time of the conflicted automerge results into account. This can cause the loss of frequently used conflict resolutions (e.g. long-living topic branches are merged into a regularly rebuilt integration branch (think of git's pu)) when they become old enough to exceed 'rerere gc's threshold. To prevent the loss of valuable merge resolutions 'rerere' will (1) update the timestamp of the recorded conflict resolution (i.e. 'postimage') each time when encountering and resolving the same merge conflict, and (2) take this timestamp, i.e. the time of the last usage into account when gc'ing. Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de> 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_append 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>
-
- 23 2月, 2010 1 次提交
-
-
由 Linus Torvalds 提交于
This shrinks the top-level directory a bit, and makes it much more pleasant to use auto-completion on the thing. Instead of [torvalds@nehalem git]$ em buil<tab> Display all 180 possibilities? (y or n) [torvalds@nehalem git]$ em builtin-sh builtin-shortlog.c builtin-show-branch.c builtin-show-ref.c builtin-shortlog.o builtin-show-branch.o builtin-show-ref.o [torvalds@nehalem git]$ em builtin-shor<tab> builtin-shortlog.c builtin-shortlog.o [torvalds@nehalem git]$ em builtin-shortlog.c you get [torvalds@nehalem git]$ em buil<tab> [type] builtin/ builtin.h [torvalds@nehalem git]$ em builtin [auto-completes to] [torvalds@nehalem git]$ em builtin/sh<tab> [type] shortlog.c shortlog.o show-branch.c show-branch.o show-ref.c show-ref.o [torvalds@nehalem git]$ em builtin/sho [auto-completes to] [torvalds@nehalem git]$ em builtin/shor<tab> [type] shortlog.c shortlog.o [torvalds@nehalem git]$ em builtin/shortlog.c which doesn't seem all that different, but not having that annoying break in "Display all 180 possibilities?" is quite a relief. NOTE! If you do this in a clean tree (no object files etc), or using an editor that has auto-completion rules that ignores '*.o' files, you won't see that annoying 'Display all 180 possibilities?' message - it will just show the choices instead. I think bash has some cut-off around 100 choices or something. So the reason I see this is that I'm using an odd editory, and thus don't have the rules to cut down on auto-completion. But you can simulate that by using 'ls' instead, or something similar. Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 1月, 2010 1 次提交
-
-
由 Johannes Sixt 提交于
It forgot to apply the prefix to the paths given on the command line. [jc: added test] Signed-off-by: NJohannes Sixt <j6t@kdbg.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 11 1月, 2010 1 次提交
-
-
由 Junio C Hamano 提交于
After you find out an earlier resolution you told rerere to use was a mismerge, there is no easy way to clear it. A new subcommand "forget" can be used to tell git to forget a recorded resolution, so that you can redo the merge from scratch. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 05 12月, 2009 1 次提交
-
-
由 Jeff King 提交于
The rr-cache directory should always exist if we are doing garbage collection (earlier code paths check this explicitly), but we may not necessarily succeed in opening it (for example, due to permissions problems). In that case, we should print an error message rather than simply segfaulting. Signed-off-by: NJeff King <peff@peff.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 04 12月, 2009 1 次提交
-
-
由 Junio C Hamano 提交于
Introduce a command line option to override rerere.autoupdate configuration variable to make it more useful. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 11 11月, 2009 1 次提交
-
-
由 Jonathan Nieder 提交于
There is no need for "git <command> -h" to depend on being inside a repository. Reported by Gerfried Fuchs through http://bugs.debian.org/462557Signed-off-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 30 4月, 2009 1 次提交
-
-
由 Alex Riesen 提交于
This helps to notice when something's going wrong, especially on systems which lock open files. I used the following criteria when selecting the code for replacement: - it was already printing a warning for the unlink failures - it is in a function which already printing something or is called from such a function - it is in a static function, returning void and the function is only called from a builtin main function (cmd_) - it is in a function which handles emergency exit (signal handlers) - it is in a function which is obvously cleaning up the lockfiles Signed-off-by: NAlex Riesen <raa.lkml@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 2月, 2009 1 次提交
-
-
由 SZEDER Gábor 提交于
Both rerere.c and builtin-rerere.c define the static functions rr_path() and has_resolution() the exact same way. To eliminate this code duplication this patch turns the functions in rerere.c non-static, and makes builtin-rerere.c use them. Also, since this puts these two functions into the global namespace, rename them to rerere_path() and has_rerere_resolution(), respectively, and rename their "name" parameter to "hex", because it better reflects what that parameter actually is. Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 1月, 2009 1 次提交
-
-
由 Alexander Potashev 提交于
A new inline function is_dot_or_dotdot is used to check if the directory name is either "." or "..". It returns a non-zero value if the given string is "." or "..". It's applicable to a lot of Git source code. Signed-off-by: NAlexander Potashev <aspotashev@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 26 10月, 2008 1 次提交
-
-
由 Brian Downing 提交于
We're going to be adding some parameters to this, so we can't have any uninitialized data in it. Signed-off-by: NBrian Downing <bdowning@lavos.net> 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>
-
- 14 7月, 2008 1 次提交
-
-
由 Stephan Beyer 提交于
When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: NStephan Beyer <s-beyer@gmx.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 13 7月, 2008 1 次提交
-
-
由 Johannes Schindelin 提交于
If you want to reuse the rerere cache in another repository, and set a symbolic link to it, you do not want to have the two repositories interfer with each other by accessing the _same_ MERGE_RR. For example, if you use contrib/git-new-workdir to set up a second working directory, and you have a conflict in one working directory, but commit in the other working directory first, the wrong "resolution" will be recorded. The easy solution is to move MERGE_RR out of the rr-cache/ directory, which also corresponds with the notion that rr-cache/ contains cached resolutions, not some intermediate temporary states. Noticed by Kalle Olavi Niemitalo. Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 7月, 2008 2 次提交
-
-
由 Stephan Beyer 提交于
This patch moves rerere()-related functions into a newly created rerere.c file. The setup_rerere() function is needed by both rerere() and cmd_rerere(), so this function is moved to rerere.c and declared non-static (and "extern") in newly created rerere.h file. Signed-off-by: NStephan Beyer <s-beyer@gmx.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Olivier Marin 提交于
When a conflicting file contains a line that begin with "=======", rerere failed to parse conflict markers. This result to a wrong preimage file and an unexpected error for the user. The boundary between ours and theirs not just begin with 7 equals, but is followed by either a SP or a LF. This patch enforces parsing rules so that markers match in the right order, and when ambiguous, the command does not autoresolve the conflicted file. Especially because we are introducing rerere.autoupdate configuration (which is off by default for safety) that automatically stages the resolution made by rerere, it is necessary to make sure that we do not autoresolve when there is any ambiguity. Signed-off-by: NOlivier Marin <dkr@freesurf.fr> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 22 6月, 2008 4 次提交
-
-
由 Junio C Hamano 提交于
When this configuration is set, paths that are autoresolved by git-rerere are updated in the index as well.
-
由 Junio C Hamano 提交于
It is dubious if it is cheaper to shift entries repeatedly using memmove() to collect entries that needs to be written out in front of an array than simply marking the entries to be skipped. In addition, the label called this "tail optimization", but this obviously is not what people usually call with that name. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
rerere did not detect the case where <<< === >>> markers did not match. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
There were too many places in the code how an entry in the rerere database looks like, and the garbage_collect() function that iterates over subdirectories of the rr-cache directory was the worse offender. Introduce two helper functions, rerere_created_at() and has_resolution(), to abstract out the logic a bit better. Incidentally this fixes a small memory leak in garbage_collect() function. The path list to collect the entries to be pruned were defined to strdup the paths but the caller was feeding a path after doing an extra copy. Because the list does not have to be sorted by conflict signature hash, we use path_list_append() instead of path_list_insert(). While we are at it, make a conflicted hunk comparision in handle_file() a bit easier to read. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 18 6月, 2008 1 次提交
-
-
由 Junio C Hamano 提交于
The data read from MERGE_RR file is kept in path-list by hanging textual 40-byte conflict signature to path of the blob that contains the conflict. The signature is strdup'ed twice, and the second copy is given to the path-list, leaking the first copy. Signed-off-by: NJunio C Hamano <junio@pobox.com> Acked-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
-
- 15 5月, 2008 1 次提交
-
-
由 Johannes Schindelin 提交于
git_config() only had a function parameter, but no callback data parameter. This assumes that all callback functions only modify global variables. With this patch, every callback gets a void * parameter, and it is hoped that this will help the libification effort. Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 26 2月, 2008 1 次提交
-
-
由 Daniel Barkalow 提交于
Originally by Kristian Hï¿œgsberg; I fixed the conversion of rerere, which had a different API. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 22 1月, 2008 1 次提交
-
-
由 Linus Torvalds 提交于
This converts the index explicitly on read and write to its on-disk format, allowing the in-core format to contain more flags, and be simpler. In particular, the in-core format is now host-endian (as opposed to the on-disk one that is network endian in order to be able to be shared across machines) and as a result we can dispense with all the htonl/ntohl on accesses to the cache_entry fields. This will make it easier to make use of various temporary flags that do not exist in the on-disk format. Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 17 1月, 2008 1 次提交
-
-
由 Brandon Casey 提交于
Remove remaining double close(2)'s. i.e. close() before commit_locked_index() or commit_lock_file(). Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 14 12月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
This inserts a new function xdi_diff() that currently does not do anything other than calling the underlying xdl_diff() to the callchain of current callers of xdl_diff() function. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 9月, 2007 2 次提交
-
-
由 Kristian Høgsberg 提交于
Signed-off-by: NKristian Høgsberg <krh@redhat.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
The code incorrectly assumed that strbuf.buf is always an allocated piece of memory that has NUL at offset strbuf.len. That assumption does not hold for a freshly initialized empty strbuf. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 26 9月, 2007 1 次提交
-
-
由 Pierre Habouzit 提交于
memory is now reused across hunks. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 17 9月, 2007 1 次提交
-
-
由 Pierre Habouzit 提交于
Signed-off-by: NPierre Habouzit <madcoder@debian.org> Acked-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 11 9月, 2007 1 次提交
-
-
由 Pierre Habouzit 提交于
* Add strbuf_rtrim to remove trailing spaces. * Add strbuf_insert to insert data at a given position. * Off-by one fix in strbuf_addf: strbuf_avail() does not counts the final \0 so the overflow test for snprintf is the strict comparison. This is not critical as the growth mechanism chosen will always allocate _more_ memory than asked, so the second test will not fail. It's some kind of miracle though. * Add size extension hints for strbuf_init and strbuf_read. If 0, default applies, else: + initial buffer has the given size for strbuf_init. + first growth checks it has at least this size rather than the default 8192. Signed-off-by: NPierre Habouzit <madcoder@debian.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 07 9月, 2007 1 次提交
-
-
由 Pierre Habouzit 提交于
Signed-off-by: NPierre Habouzit <madcoder@debian.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 7月, 2007 1 次提交
-
-
由 Peter Hagervall 提交于
Make every builtin-*.c file #include "builtin.h". Also takes care of some declaration/definition mismatches. Signed-off-by: NPeter Hagervall <hager@cs.umu.se> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 7月, 2007 1 次提交
-
-
由 Johannes Schindelin 提交于
Two-file merges were rare enough that they were dropped outside of the radar. This fix is a trivial change to builtin-rerere.c::find_conflict(). It is still sane to insist that we do not do rerere for symlinks, and require to have stages #2 and #3, but we can drop the requirement to have stage #1. rerere does not use information from there anyway. This fix is from Junio, together with two tests to verify that it works as expected. Acked-by: NUwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 07 7月, 2007 1 次提交
-
-
由 Johannes Schindelin 提交于
Earlier, "git rerere" was enabled by creating the directory .git/rr-cache. That is definitely not in line with most other features, which are enabled by a config variable. So, check the config variable "rerere.enabled". If it is set to "false" explicitely, do not activate rerere, even if .git/rr-cache exists. This should help when you want to disable rerere temporarily. If "rerere.enabled" is not set at all, fall back to detection of the directory .git/rr-cache. [jc: with minimum tweaks] Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 7月, 2007 1 次提交
-
-
由 Johannes Schindelin 提交于
The instances of xdemitconf_t were initialized member by member. Instead, initialize them to all zero, so we do not have to update those places each time we introduce a new member. [jc: minimally fixed by getting rid of a new global] Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-