aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* get_ref_dir(): rename "base" parameter to "dirname"Michael Haggerty2012-05-03
| | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* get_ref_dir(): use a strbuf to hold refnameMichael Haggerty2012-05-03
| | | | | | | | This simplifies the bookkeeping and allows an (artificial) restriction on refname component length to be removed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* get_ref_dir(): return early if directory cannot be readMichael Haggerty2012-04-25
| | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'mh/ref-api'Junio C Hamano2012-04-24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows walking only a sub-hierarchy in refs/*. By Michael Haggerty * mh/ref-api: do_for_each_ref(): only iterate over the subtree that was requested refs: store references hierarchically sort_ref_dir(): simplify logic refs.c: rename ref_array -> ref_dir struct ref_entry: nest the value part in a union check_refname_component(): return 0 for zero-length components free_ref_entry(): new function names_conflict(): simplify implementation repack_without_ref(): reimplement using do_for_each_ref_in_array() do_for_each_ref_in_arrays(): new function do_for_each_ref_in_array(): new function refs: manage current_ref within do_one_ref() refs.c: reorder definitions more logically
| * do_for_each_ref(): only iterate over the subtree that was requestedMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | If the base argument has a "/" chararacter, then only iterate over the reference subdir whose name is the part up to the last "/". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * refs: store references hierarchicallyMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store references hierarchically in a tree that matches the pseudo-directory structure of the reference names. Add a new kind of ref_entry (with flag REF_DIR) to represent a whole subdirectory of references. Sort ref_dirs one subdirectory at a time. NOTE: the dirs can now be sorted as a side-effect of other function calls. Therefore, it would be problematic to do something from a each_ref_fn callback that could provoke the sorting of a directory that is currently being iterated over (i.e., the directory containing the entry that is being processed or any of its parents). This is a bit far-fetched, because a directory is always sorted just before being iterated over. Therefore, read-only accesses cannot trigger the sorting of a directory whose iteration has already started. But if a callback function would add a reference to a parent directory of the reference in the iteration, then try to resolve a reference under that directory, a re-sort could be triggered and cause the iteration to work incorrectly. Nevertheless...add a comment in refs.h warning against modifications during iteration. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sort_ref_dir(): simplify logicMichael Haggerty2012-04-10
| | | | | | | | | | | | | | Use the more usual indexing idiom for clarity. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * refs.c: rename ref_array -> ref_dirMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | | | | | This purely textual change is in preparation for storing references hierarchically, when the old ref_array structure will represent one "directory" of references. Rename functions that deal with this structure analogously, and also rename the structure's "refs" member to "entries". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * struct ref_entry: nest the value part in a unionMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | This change is obviously silly by itself, but it is a step towards adding a second member to the union. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * check_refname_component(): return 0 for zero-length componentsMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | | | | | | | Return 0 (instead of -1) for zero-length components. Move the interpretation of zero-length components as illegal to check_refname_format(). This will make it easier to extend check_refname_format() to also check whether directory names are valid. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * free_ref_entry(): new functionMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | Add a function free_ref_entry(). This function will become nontrivial when ref_entry (soon) becomes polymorphic. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * names_conflict(): simplify implementationMichael Haggerty2012-04-10
| | | | | | | | | | | | | | Save a bunch of lines of code and a couple of strlen() calls. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * repack_without_ref(): reimplement using do_for_each_ref_in_array()Michael Haggerty2012-04-10
| | | | | | | | | | | | | | | | It costs a bit of boilerplate, but it means that the function can be ignorant of how cached refs are stored. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * do_for_each_ref_in_arrays(): new functionMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | Extract function do_for_each_ref_in_arrays() from do_for_each_ref(). The new function will be a useful building block for storing refs hierarchically. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * do_for_each_ref_in_array(): new functionMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | Extract function do_for_each_ref_in_array() from do_for_each_ref(). The new function will be a useful building block for storing refs hierarchically. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * refs: manage current_ref within do_one_ref()Michael Haggerty2012-04-10
| | | | | | | | | | | | | | | | Set and clear current_ref within do_one_ref() instead of setting it here and leaving it to somebody else to clear it. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * refs.c: reorder definitions more logicallyMichael Haggerty2012-04-10
| | | | | | | | | | | | | | | | | | | | Reorder definitions in file: first check_refname_format() and helper functions, then the functions for managing the ref_entry and ref_array data structures, then ref_cache, then the more "business-logicky" stuff. No code is changed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'hv/submodule-recurse-push'Junio C Hamano2012-04-24
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git push --recurse-submodules" learns to optionally look into the histories of submodules bound to the superproject and push them out. By Heiko Voigt * hv/submodule-recurse-push: push: teach --recurse-submodules the on-demand option Refactor submodule push check to use string list instead of integer Teach revision walking machinery to walk multiple times sequencially
| * | push: teach --recurse-submodules the on-demand optionHeiko Voigt2012-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using this option git will search for all submodules that have changed in the revisions to be send. It will then try to push the currently checked out branch of each submodule. This helps when a user has finished working on a change which involves submodules and just wants to push everything in one go. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Refactor submodule push check to use string list instead of integerHeiko Voigt2012-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to tell the user which submodules have not been pushed. Additionally this is helpful when we want to automatically try to push submodules that have not been pushed. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Teach revision walking machinery to walk multiple times sequenciallyHeiko Voigt2012-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was not possible to iterate revisions twice using the revision walking api. We add a reset_revision_walk() which clears the used flags. This allows us to do multiple sequencial revision walks. We add the appropriate calls to the existing submodule machinery doing revision walks. This is done to avoid surprises if future code wants to call these functions more than once during the processes lifetime. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-svn: drop redundant blocking of SIGPIPERoman Kagan2012-04-24
| | | | | | | | | | | | | | | | | | | | | Now that SIGPIPE is ignored there's no point blocking it. Signed-off-by: Roman Kagan <rkagan@mail.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
* | | git-svn: ignore SIGPIPERoman Kagan2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In HTTP with keep-alive it's not uncommon for the client to notice that the server decided to stop maintaining the current connection only when sending a new request. This naturally results in -EPIPE and possibly SIGPIPE. The subversion library itself makes no provision for SIGPIPE. Some combinations of the underlying libraries do (typically SIG_IGN-ing it), some don't. Presumably for that reason all subversion commands set SIGPIPE to SIG_IGN early in their main()-s. So should we. This, together with the previous patch, fixes the notorious "git-svn died of signal 13" problem (see e.g. http://thread.gmane.org/gmane.comp.version-control.git/134936). Signed-off-by: Roman Kagan <rkagan@mail.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
* | | git-svn: use POSIX::sigprocmask to block signalsRoman Kagan2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to maintain consistency of the database mapping svn revision numbers to git commit ids, rev_map_set() defers signal processing until it's finished with an append transaction.[*] The conventional way to achieve this is through sigprocmask(), which is available in perl in the standard POSIX module. This is implemented by this patch. One important consequence of it is that the signal handlers won't be unconditionally set to SIG_DFL anymore upon the first invocation of rev_map_set() as they used to. As a result, the signals ignored by git-svn parent will remain ignored; otherwise the behavior remains the same. This patch paves the way to ignoring SIGPIPE throughout git-svn which will be done in the followup patch. [*] Deferring signals is not enough to ensure the database consistency: the program may die on SIGKILL or power loss, run out of disk space, etc. However that's a separate issue that this patch doesn't address. Signed-off-by: Roman Kagan <rkagan@mail.ru> Acked-by: Eric Wong <normalperson@yhbt.net>
* | | RelNotes: the fourth batch of topics graduated to 'master'Junio C Hamano2012-04-23
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'bw/test-fix-grep-gnuism'Junio C Hamano2012-04-23
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two places that were the only place in the test suite that gave "a\+" to platform grep and expected it to mean one or more "a", which is a blatant GNUism. * bw/test-fix-grep-gnuism: t9400: fix gnuism in grep
| * | | t9400: fix gnuism in grepJunio C Hamano2012-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using "\+" in "grep" and expecting that it means one or more is a GNUism. Spell it in a dumb and portable way. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'rj/submodule-mswin-path'Junio C Hamano2012-04-23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | By Ramsay Jones * rj/submodule-mswin-path: git-submodule.sh: Don't use $path variable in eval_gettext string
| * | | | git-submodule.sh: Don't use $path variable in eval_gettext stringRamsay Jones2012-04-18
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eval_gettext (and eval_gettextln) i18n shell functions call git-sh-i18n--envsubst to process the variable references in the string parameter. Unfortunately, environment variables are case insensitive on windows, which leads to failure on cygwin when eval_gettext exports $path. Commit df599e9 (Windows: teach getenv to do a case-sensitive search, 06-06-2011) attempts to solve this problem on MinGW by overriding the system getenv() function to allow git-sh-i18n--envsubst to read $path rather than $PATH from the environment. However, this commit does not address cygwin at all and, furthermore, does not fix all problems on MinGW. In particular, when executing test #38 in t7400-submodule-basic.sh, an 'git-sh-i18n-envsubst.exe - Unable To Locate Component' dialog pops up saying that the application "failed to start because libiconv2.dll was not found." After studying the voluminous trace output from the process monitor, it is clear that the system is attempting to use $path, rather than $PATH, to search for the DLL file. (Note that, after dismissing the dialog, the test passes anyway!) As an alternative, we finesse the problem by renaming the $path variable to $sm_path (submodule path). This fixes the problem on MinGW along with all test failures on cygwin (t7400.{7,32,34}, t7406.3 and t7407.{2,6}). We note that the foreach subcommand provides $path to user scripts (ie it is part of the API), so we can't simply rename it to $sm_path. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Tested-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'rj/sh-setup-mswin-pwd'Junio C Hamano2012-04-23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | By Ramsay Jones * rj/sh-setup-mswin-pwd: git-sh-setup.sh: Add an pwd() function for MinGW
| * | | | git-sh-setup.sh: Add an pwd() function for MinGWRamsay Jones2012-04-18
| |/ / / | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'rj/mingw-isguid'Junio C Hamano2012-04-23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | By Ramsay Jones * rj/mingw-isguid: compat/mingw.h: Set S_ISUID to prevent a fast-import test failure
| * | | | compat/mingw.h: Set S_ISUID to prevent a fast-import test failureRamsay Jones2012-04-18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current t9300-fast-import.sh test number 62 ("L: nested tree copy does not corrupt deltas") was introduced in commit 9a0edb79 ("fast-import: add a test for tree delta base corruption", 15-08-2011). A fix for the demonstrated problem was introduced by commit 8fb3ad76 ("fast-import: prevent producing bad delta", 15-08-2011). However, this fix didn't work on MinGW and so this test has always failed on MinGW. Part of the solution in commit 8fb3ad76 was to add an NO_DELTA preprocessor constant which was defined as follows: +/* + * We abuse the setuid bit on directories to mean "do not delta". + */ +#define NO_DELTA S_ISUID + Unfortunately, the S_ISUID constant on MinGW is defined as zero. In order to fix the problem, we simply alter the definition of S_ISUID in the mingw header file to a more appropriate value. Also, we take the opportunity to similarly define S_ISGID and S_ISVTX. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jn/fast-import-doc'Junio C Hamano2012-04-23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | By Jonathan Nieder * jn/fast-import-doc: fast-import doc: cat-blob and ls responses need to be consumed quickly
| * | | | fast-import doc: cat-blob and ls responses need to be consumed quicklyJonathan Nieder2012-04-15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If fast-import's command pipe and the frontend's cat-blob/ls response pipe are both filled, there can be a deadlock. Luckily all existing frontends consume any pending cat-blob/ls responses completely before writing the next command. Document the requirements so future frontend authors and users can be spared from the problem, too. It is not always easy to catch that kind of bug by testing. To set the scene, add some words of explanation to help the novice understand that "cat-blob" and "ls" output are meant for consumption by the frontend. Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jn/more-i18ncmp'Junio C Hamano2012-04-23
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Jonathan Nieder * jn/more-i18ncmp: test: am of empty patch should not succeed test: use test_i18ncmp for "Patch format detection failed" message test: do not rely on US English tracking-info messages
| * | | | test: am of empty patch should not succeedJonathan Nieder2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "git am empty" test uses the construct git am empty-file && false || : which unconditionally returns true. Use test_must_fail instead, which also has the benefit of noticing if "git am" has segfaulted. While at it, tighten the test to check that the diagnostic appears on stderr and not stdout. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | test: use test_i18ncmp for "Patch format detection failed" messageJonathan Nieder2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v1.7.8.5~2 (am: don't infloop for an empty input file, 2012-02-25) added a check for the human-readable message "Patch format detection failed." but we forgot to suppress that check when running tests with git configured to write output in another language. Noticed by running tests with GETTEXT_POISON=YesPlease. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | test: do not rely on US English tracking-info messagesJonathan Nieder2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When v1.7.9.2~28^2 (2012-02-02) marked "Your branch is behind" and friends for translation, it forgot to adjust tests not to check those messages when tests are being run with git configured to write its output in another language. With this patch applied, t2020 and t6040 pass again with GETTEXT_POISON=YesPlease. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Explained-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jl/maint-submodule-recurse-fetch'Junio C Hamano2012-04-23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git fetch" that recurses into submodules on demand did not check if it needs to go into submodules when non branches (most notably, tags) are fetched. By Jens Lehmann * jl/maint-submodule-recurse-fetch: submodules: recursive fetch also checks new tags for submodule commits
| * | | | | submodules: recursive fetch also checks new tags for submodule commitsJens Lehmann2012-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 88a21979c (fetch/pull: recurse into submodules when necessary) all fetched commits are examined if they contain submodule changes (unless configuration or command line options inhibit that). If a newly recorded submodule commit is not present in the submodule, a fetch is run inside it to download that commit. Checking new refs was done in an else branch where it wasn't executed for tags. This normally isn't a problem because tags are only fetched with the branches they live on, then checking the new commits in the fetched branches for submodule commits will also process all tags. But when a specific tag is fetched (or the refspec contains refs/tags/) commits only reachable by tags won't be searched for submodule commits, which is a bug. Fix that by moving the code outside the if/else construct to handle new tags just like any other ref. The performance impact of adding tags that most of the time lie on a branch which is checked anyway for new submodule commit should be minimal, as since 6859de4 (fetch: avoid quadratic loop checking for updated submodules) all ref-tips are collected first and then fed to a single rev-list. Spotted-by: Jeff King <peff@peff.net> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jc/maint-blame-minimal'Junio C Hamano2012-04-23
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git blame" started missing quite a few changes from the origin since we stopped using the diff minimalization by default in v1.7.2 era. * jc/maint-blame-minimal: blame: accept --need-minimal
| * | | | | | blame: accept --need-minimalJunio C Hamano2012-04-11
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Between v1.7.1 and v1.7.2, 582aa00bdffb switched the default "diff" invocation not to use XDF_NEED_MINIMAL, but this breaks "git blame" rather badly. Allow the command line option to ask for an extra careful matching. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'lp/maint-diff-three-dash-with-graph'Junio C Hamano2012-04-23
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "log -p --graph" used with "--stat" had a few formatting error. By Lucian Poston * lp/maint-diff-three-dash-with-graph: t4202: add test for "log --graph --stat -p" separator lines log --graph: fix break in graph lines log --graph --stat: three-dash separator should come after graph lines
| * | | | | | t4202: add test for "log --graph --stat -p" separator linesLucian Poston2012-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests to make sure that the three-dash separator lines appear after the graph ancestry lines, and also the graph ancestry lines are not broken between the diffstat and the patch. Signed-off-by: Lucian Poston <lucian.poston@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | log --graph: fix break in graph linesLucian Poston2012-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output from "git log --graph --stat -p" broke the ancestry graph lines with a single empty line between the diffstat and the patch. Signed-off-by: Lucian Poston <lucian.poston@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | log --graph --stat: three-dash separator should come after graph linesLucian Poston2012-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output from "git log --graph --stat -p" emits the three-dash separator line before the graph that shows ancestry lines. The separator should come after the ancestry lines just like all the other output. Signed-off-by: Lucian Poston <lucian.poston@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'rs/commit-list-sort-in-batch'Junio C Hamano2012-04-23
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting up a revision traversal with many starting points was inefficient as these were placed in a date-order priority queue one-by-one. By René Scharfe (3) and Junio C Hamano (1) * rs/commit-list-sort-in-batch: mergesort: rename it to llist_mergesort() revision: insert unsorted, then sort in prepare_revision_walk() commit: use mergesort() in commit_list_sort_by_date() add mergesort() for linked lists
| * | | | | | | mergesort: rename it to llist_mergesort()Junio C Hamano2012-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though the function is generic enough, <anything>sort() inherits connotations from the standard function qsort() that sorts an array. Rename it to llist_mergesort() and describe the external interface in its header file. This incidentally avoids name clashes with mergesort() some platforms declare in, and contaminate user namespace with, their <stdlib.h>. Reported-by: Brian Gernhardt Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | revision: insert unsorted, then sort in prepare_revision_walk()René Scharfe2012-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up prepare_revision_walk() by adding commits without sorting to the commit_list and at the end sort the list in one go. Thanks to mergesort() working behind the scenes, this is a lot faster for large numbers of commits than the current insert sort. Also introduce and use commit_list_reverse(), to keep the ordering of commits sharing the same commit date unchanged. That's because commit_list_insert_by_date() sorts commits with descending date, but adds later entries with the same date entries last, while commit_list_insert() always inserts entries at the top. The following commit_list_sort_by_date() keeps the order of entries sharing the same date. Jeff's test case, in a repo with lots of refs, was to run: # make a new commit on top of HEAD, but not yet referenced sha1=`git commit-tree HEAD^{tree} -p HEAD </dev/null` # now do the same "connected" test that receive-pack would do git rev-list --objects $sha1 --not --all With a git.git with a ref for each revision, master needs (best of five): real 0m2.210s user 0m2.188s sys 0m0.016s And with this patch: real 0m0.480s user 0m0.456s sys 0m0.020s Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>