summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30git skew: a tool to find how big a clock skew exists in the historyLibravatar Jeff King5-0/+54
> As you probably guessed from the specificity of the number, I wrote a > short program to actually traverse and find the worst skew. It takes > about 5 seconds to run (unsurprisingly, since it is doing the same full > traversal that we end up doing in the above numbers). So we could > "autoskew" by setting up the configuration on clone, and then > periodically updating it as part of "git gc". This patch doesn't implement auto-detection of skew, but is the program I used to calculate, and would provide the basis for such auto-detection. It would be interesting to see average skew numbers for popular repositories. You can run it as "git skew --all". Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-11default core.clockskew variable to one dayLibravatar Jeff King1-1/+1
This is the slop value used by name-rev, so presumably is a reasonable default. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-11limit "contains" traversals based on commit timestampLibravatar Jeff King1-3/+33
When looking for commits that contain other commits (e.g., via "git tag --contains"), we can end up traversing useless portions of the graph. For example, if I am looking for a tag that contains a commit made last week, there is not much point in traversing portions of the history graph made five years ago. This optimization can provide massive speedups. For example, doing "git tag --contains HEAD~200" in the linux-2.6 repository goes from: real 0m5.302s user 0m5.116s sys 0m0.184s to: real 0m0.030s user 0m0.020s sys 0m0.008s The downside is that we will no longer find some answers in the face of extreme clock skew, as we will stop the traversal early when seeing commits skewed too far into the past. Name-rev already implements a similar optimization, using a "slop" of one day to allow for a certain amount of clock skew in commit timestamps. This patch introduces a "core.clockskew" variable, which allows specifying the allowable amount of clock skew in seconds. For safety, it defaults to "none", causing a full traversal (i.e., no change in behavior from previous versions). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-11tag: speed up --contains calculationLibravatar Jeff King1-1/+45
When we want to know if commit A contains commit B (or any one of a set of commits, B through Z), we generally calculate the merge bases and see if B is a merge base of A (or for a set, if any of the commits B through Z have that property). When we are going to check a series of commits A1 through An to see whether each contains B (e.g., because we are deciding which tags to show with "git tag --contains"), we do a series of merge base calculations. This can be very expensive, as we repeat a lot of traversal work. Instead, let's leverage the fact that we are going to use the same --contains list for each tag, and mark areas of the commit graph is definitely containing those commits, or definitely not containing those commits. Later tags can then stop traversing as soon as they see a previously calculated answer. This sped up "git tag --contains HEAD~200" in the linux-2.6 repository from: real 0m15.417s user 0m15.197s sys 0m0.220s to: real 0m5.329s user 0m5.144s sys 0m0.184s Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-30Git 1.7.2-rc1Libravatar Junio C Hamano2-5/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-30git.spec.in: Add gitweb subpackageLibravatar Junio C Hamano1-0/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-30Merge branch 'ar/decorate-color'Libravatar Junio C Hamano6-8/+176
* ar/decorate-color: Add test for correct coloring of git log --decoration Allow customizable commit decorations colors log --decorate: Colorize commit decorations log-tree.c: Use struct name_decoration's type for classifying decoration commit.h: add 'type' to struct name_decoration
2010-06-30Merge branch 'mg/doc-rev-parse-treepath-syntax'Libravatar Junio C Hamano1-6/+9
* mg/doc-rev-parse-treepath-syntax: git-rev-parse.txt: Add more examples for caret and colon git-rev-parse.txt: Document ":path" specifier
2010-06-30Merge branch 'cc/cherry-pick-stdin'Libravatar Junio C Hamano4-25/+61
* cc/cherry-pick-stdin: revert: do not rebuild argv on heap revert: accept arbitrary rev-list options t3508 (cherry-pick): futureproof against unmerged files
2010-06-30Merge branch 'jl/status-ignore-submodules'Libravatar Junio C Hamano9-16/+177
* jl/status-ignore-submodules: Add the option "--ignore-submodules" to "git status" git submodule: ignore dirty submodules for summary and status Conflicts: builtin/commit.c t/t7508-status.sh wt-status.c wt-status.h
2010-06-30Merge branch 'jk/url-decode'Libravatar Junio C Hamano1-4/+4
* jk/url-decode: url_decode: URL scheme ends with a colon and does not require a slash
2010-06-30Merge branch 'jn/grep-open'Libravatar Junio C Hamano7-39/+276
* jn/grep-open: t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script t/t7811-grep-open.sh: ensure fake "less" is made executable t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression grep -O: allow optional argument specifying the pager (or editor) grep: Add the option '--open-files-in-pager' Unify code paths of threaded greps grep: refactor grep_objects loop into its own function Conflicts: t/t7006-pager.sh
2010-06-30Merge branch 'jp/string-list-api-cleanup'Libravatar Junio C Hamano29-147/+147
* jp/string-list-api-cleanup: string_list: Fix argument order for string_list_append string_list: Fix argument order for string_list_lookup string_list: Fix argument order for string_list_insert_at_index string_list: Fix argument order for string_list_insert string_list: Fix argument order for for_each_string_list string_list: Fix argument order for print_string_list
2010-06-30Merge branch 'tr/rev-list-count'Libravatar Junio C Hamano6-1/+204
* tr/rev-list-count: bash completion: Support "divergence from upstream" messages in __git_ps1 rev-list: introduce --count option Conflicts: contrib/completion/git-completion.bash
2010-06-30Merge branch 'as/maint-completion-set-u-fix'Libravatar Junio C Hamano1-7/+7
* as/maint-completion-set-u-fix: bash-completion: Fix __git_ps1 to work with "set -u"
2010-06-30Merge branch 'mg/rev-parse-tests'Libravatar Junio C Hamano1-1/+16
* mg/rev-parse-tests: t6018: make sure all tested symbolic names are different revs t6018: add tests for rev-list's --branches and --tags
2010-06-30Merge branch 'jl/maint-diff-ignore-submodules'Libravatar Junio C Hamano5-5/+116
* jl/maint-diff-ignore-submodules: t4027,4041: Use test -s to test for an empty file Add optional parameters to the diff option "--ignore-submodules" git diff: rename test that had a conflicting name
2010-06-30Add test for correct coloring of git log --decorationLibravatar Nazri Ramliy1-0/+66
Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-29Sync with 1.7.1.1Libravatar Junio C Hamano2-13/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-29revert: do not rebuild argv on heapLibravatar Jonathan Nieder2-16/+34
Set options in struct rev_info directly so we can reuse the arguments collected from parse_options without modification. This is just a cleanup; no noticeable change is intended. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-29Merge commit 'v1.7.2-rc0~6^2' into cc/cherry-pick-stdinLibravatar Junio C Hamano4-2/+13
* commit 'v1.7.2-rc0~6^2': DWIM 'git show -5' to 'git show --do-walk -5' Documentation/SubmittingPatches: Fix typo in GMail section Documentation/config: describe status.submodulesummary This commit fixes one test in t3508 by making "cherry-pick -<num>" walk the history. A test update from Elijah Newren is squashed as an evil merge.
2010-06-29Git 1.7.1.1Libravatar Junio C Hamano2-11/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-29t/t9001: use egrep when regular expressions are involvedLibravatar Brandon Casey1-3/+3
Supplying backslashed, extended regular expressions to grep is not portable. Use egrep instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-29git-rev-parse.txt: Add more examples for caret and colonLibravatar Michael J Gruber1-7/+8
Several items in the caret, colon and friends section contain examples already. Make sure they all come with examples, and that examples come early so that they serve as a visual guide, as well. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28Merge branch 'maint'Libravatar Junio C Hamano4-2/+27
* maint: Update draft release notes to 1.7.1.1 notes: Initialise variable to appease gcc notes: check number of parameters to "git notes copy"
2010-06-28Update draft release notes to 1.7.1.1Libravatar Junio C Hamano1-1/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28Merge branch 'tr/send-email-8bit' into maintLibravatar Junio C Hamano3-0/+146
* tr/send-email-8bit: send-email: ask about and declare 8bit mails
2010-06-28Merge branch 'pb/maint-perl-errmsg-no-dir' into maintLibravatar Junio C Hamano1-2/+2
* pb/maint-perl-errmsg-no-dir: Git.pm: better error message
2010-06-28Merge branch 'js/maint-am-rebase-invalid-author' into maintLibravatar Junio C Hamano2-6/+17
* js/maint-am-rebase-invalid-author: am: use get_author_ident_from_commit instead of mailinfo when rebasing
2010-06-28Merge branch 'jc/maint-simpler-common-prefix' into maintLibravatar Junio C Hamano1-13/+13
* jc/maint-simpler-common-prefix: common_prefix: simplify and fix scanning for prefixes
2010-06-28Merge branch 'bd/maint-unpack-trees-parawalk-fix' into maintLibravatar Junio C Hamano1-2/+10
* bd/maint-unpack-trees-parawalk-fix: unpack-trees: Make index lookahead less pessimal
2010-06-28notes: Initialise variable to appease gccLibravatar Ramsay Jones1-1/+1
gcc version 3.4.4 thinks that the 'cmp' variable could be used while uninitialised and complains thus: notes.c: In function `write_each_non_note_until': notes.c:719: warning: 'cmp' might be used uninitialized in \ this function Note that gcc versions 4.1.2 and 4.4.0 do not issue this warning. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28notes: check number of parameters to "git notes copy"Libravatar Jeff King2-0/+10
Otherwise we may segfault with too few parameters. Signed-off-by: Jeff King <peff@peff.net> Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27msvc: Select the "fast" definition of the {get,put}_be32() macrosLibravatar Ramsay Jones1-0/+1
On Intel machines, the msvc compiler defines the CPU architecture macros _M_IX86 and _M_X64 (equivalent to __i386__ and __x86_64__ respectively). Use these macros in the pre-processor expression to select the "fast" definition of the {get,put}_be32() macros. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27git-rev-parse.txt: Document ":path" specifierLibravatar Michael J Gruber1-1/+3
The empty treeish in ":path" means "index". This is actually a special case of the ":stage:path" syntax where it is documented, but mentioning it also together with "treeish:path" is helpful, so do it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27Git 1.7.2-rc0Libravatar Junio C Hamano1-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27Merge branch 'cp/textconv-cat-file'Libravatar Junio C Hamano7-15/+155
* cp/textconv-cat-file: git-cat-file.txt: Document --textconv t/t8007: test textconv support for cat-file textconv: support for cat_file sha1_name: add get_sha1_with_context()
2010-06-27Merge branch 'pb/maint-perl-errmsg-no-dir'Libravatar Junio C Hamano1-2/+2
* pb/maint-perl-errmsg-no-dir: Git.pm: better error message
2010-06-27Merge branch 'tr/send-email-8bit'Libravatar Junio C Hamano3-0/+146
* tr/send-email-8bit: send-email: ask about and declare 8bit mails
2010-06-27Merge branch 'js/maint-am-rebase-invalid-author'Libravatar Junio C Hamano2-6/+17
* js/maint-am-rebase-invalid-author: am: use get_author_ident_from_commit instead of mailinfo when rebasing
2010-06-27Merge branch 'ab/blame-textconv'Libravatar Junio C Hamano4-21/+165
* ab/blame-textconv: t/t8006: test textconv support for blame textconv: support for blame textconv: make the API public Conflicts: diff.h
2010-06-27Merge branch 'jn/show-num-walks'Libravatar Junio C Hamano1-0/+4
* jn/show-num-walks: DWIM 'git show -5' to 'git show --do-walk -5'
2010-06-27t6018: make sure all tested symbolic names are different revsLibravatar Michael J Gruber1-1/+3
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27t6018: add tests for rev-list's --branches and --tagsLibravatar Michael J Gruber1-0/+13
so that we know when they break. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27Merge branch 'jp/string-list-api-cleanup' into jn/grep-openLibravatar Julian Phillips30-150/+150
An evil merge to adjust the series to cleaned-up API. From: Julian Phillips <julian@quantumfyre.co.uk> Subject: [PATCH v2 7/7] grep: fix string_list_append calls Date: Sat, 26 Jun 2010 00:41:39 +0100 Message-ID: <20100625234140.18927.35025.julian@quantumfyre.co.uk> * jp/string-list-api-cleanup: string_list: Fix argument order for string_list_append string_list: Fix argument order for string_list_lookup string_list: Fix argument order for string_list_insert_at_index string_list: Fix argument order for string_list_insert string_list: Fix argument order for for_each_string_list string_list: Fix argument order for print_string_list Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_appendLibravatar Julian Phillips16-64/+64
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: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_lookupLibravatar Julian Phillips11-17/+17
Update the definition and callers of string_list_lookup 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: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_insert_at_indexLibravatar Julian Phillips3-6/+6
Update the definition and callers of string_list_insert_at_index 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: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for string_list_insertLibravatar Julian Phillips19-40/+40
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: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27string_list: Fix argument order for for_each_string_listLibravatar Julian Phillips7-18/+18
Update the definition and callers of for_each_string_list 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: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>