* [PATCH/RFCv2 0/2] format-patch: produce non colorized patches when color.ui=always
From: Pang Yan Han @ 2011-09-12 17:46 UTC (permalink / raw)
To: git; +Cc: gitster, peff, martin.von.zweigbergk, sdaoden, ib, Pang Yan Han
Hi list,
This 2-patch series has been rerolled with Jeff's suggestions.
For patch 1/2, I've renamed the new test file to t4051-format-patch-config.sh
and changed the description to "check that format-patch does not respect
porcelain config". In addition, I've slightly reworded the commit message to
include the date of the commit (c9bfb953) which introduces the regression.
For patch 2/2, as per Jeff's recommendation, teach git_format_config to
intercept color.ui in the same way as commit f3aafa4 (Disable color detection
during format-patch, 2006-07-09). This is inline with the way we avoid passing
down diff.color and color.diff to git_log_config and config functions further
down the callchain.
Pang Yan Han (2):
format-patch: demonstrate that color.ui=always produces colorized
patches
format-patch: produce non colorized patches when ui.color=always
builtin/log.c | 3 ++-
t/t4051-format-patch-config.sh | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletions(-)
create mode 100755 t/t4051-format-patch-config.sh
--
1.7.7.rc0.190.gb47b6
^ permalink raw reply
* [PATCH/RFCv2 1/2] format-patch: demonstrate that color.ui=always produces colorized patches
From: Pang Yan Han @ 2011-09-12 17:46 UTC (permalink / raw)
To: git; +Cc: gitster, peff, martin.von.zweigbergk, sdaoden, ib, Pang Yan Han
In-Reply-To: <1315849601-26497-1-git-send-email-pangyanhan@gmail.com>
commit c9bfb953 (want_color: automatically fallback to color.ui,
2011-08-17) introduced a regression where format-patch produces colorized
patches when color.ui is set to "always".
Demonstrate this through a new test.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
---
t/t4051-format-patch-config.sh | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
create mode 100755 t/t4051-format-patch-config.sh
diff --git a/t/t4051-format-patch-config.sh b/t/t4051-format-patch-config.sh
new file mode 100755
index 0000000..cea9c7d
--- /dev/null
+++ b/t/t4051-format-patch-config.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+test_description='check that format-patch does not respect porcelain config'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ echo foo >foo &&
+ git add foo &&
+ git commit -m "commit1" &&
+ echo bar >foo &&
+ git add foo &&
+ git commit -m "commit2"
+'
+
+test_expect_failure 'format patch with ui.color=always generates non colorized patch' '
+ git config color.ui always &&
+ git format-patch -1 &&
+ mv 0001-commit2.patch actual &&
+ test_must_fail grep "\[31m-" actual
+'
+
+test_done
--
1.7.7.rc0.190.gb47b6
^ permalink raw reply related
* [PATCH/RFCv2 2/2] format-patch: produce non colorized patches when ui.color=always
From: Pang Yan Han @ 2011-09-12 17:46 UTC (permalink / raw)
To: git; +Cc: gitster, peff, martin.von.zweigbergk, sdaoden, ib, Pang Yan Han
In-Reply-To: <1315849601-26497-1-git-send-email-pangyanhan@gmail.com>
commit c9bfb953 (want_color: automatically fallback to color.ui,
2011-08-17) introduced a regression where format-patch produces colorized
patches when color.ui is set to "always".
In f3aafa4 (Disable color detection during format-patch, 2006-07-09),
git_format_config was taught to intercept diff.color to avoid passing it
down to git_log_config and later, git_diff_ui_config.
Teach git_format_config to intercept color.ui in the same way.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
---
builtin/log.c | 3 ++-
t/t4051-format-patch-config.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index d760ee0..99f8c4c 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -608,7 +608,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
string_list_append(&extra_cc, value);
return 0;
}
- if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
+ if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff") ||
+ !strcmp(var, "color.ui")) {
return 0;
}
if (!strcmp(var, "format.numbered")) {
diff --git a/t/t4051-format-patch-config.sh b/t/t4051-format-patch-config.sh
index cea9c7d..35b349e 100755
--- a/t/t4051-format-patch-config.sh
+++ b/t/t4051-format-patch-config.sh
@@ -13,7 +13,7 @@ test_expect_success setup '
git commit -m "commit2"
'
-test_expect_failure 'format patch with ui.color=always generates non colorized patch' '
+test_expect_success 'format patch with ui.color=always generates non colorized patch' '
git config color.ui always &&
git format-patch -1 &&
mv 0001-commit2.patch actual &&
--
1.7.7.rc0.190.gb47b6
^ permalink raw reply related
* windows git problem
From: luis @ 2011-09-12 17:35 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 804 bytes --]
Hi Guys,
I recently run into a funny git situation.
I had a directory under git control named "someName", with a bunch of
files inside. This was committed and working for some time.
I then added a file name "somename", and under linux, that worked OK.
However when I checked out the project under windows (either clone or
pull) one or the other would disappear and it would be staged as removed.
The surprising bit for me was not so much that windows could not cope
with the case sensitivity, but that git would stage the changes!
I have attached a new git project with the problem that should help show
the issue.
If you clone from this repo on a windows box you should be able to see it
BTW, I'm using git v 1.7.4.1
--
Luis Gutierrez
Test and Verification Solutions (TVS)
skype: luis.tandv
[-- Attachment #2: bugdemo.tar.gz --]
[-- Type: application/x-gzip, Size: 7668 bytes --]
^ permalink raw reply
* Re: windows git problem
From: Michael Witten @ 2011-09-12 18:05 UTC (permalink / raw)
To: luis; +Cc: git
In-Reply-To: <4E6E42CE.80405@tandvsolns.co.uk>
On Mon, Sep 12, 2011 at 17:35, luis <luis@tandvsolns.co.uk> wrote:
> However when I checked out the project under windows (either clone or pull)
> one or the other would disappear and it would be staged as removed.
>
> The surprising bit for me was not so much that windows could not cope with
> the case sensitivity, but that git would stage the changes!
It would be recorded in the index as a change ready to be committed
(as though `git rm' had been used)?
^ permalink raw reply
* Re: [PATCH/RFCv2 1/2] format-patch: demonstrate that color.ui=always produces colorized patches
From: Junio C Hamano @ 2011-09-12 18:07 UTC (permalink / raw)
To: Pang Yan Han; +Cc: git, peff, martin.von.zweigbergk, sdaoden, ib
In-Reply-To: <1315849601-26497-2-git-send-email-pangyanhan@gmail.com>
Pang Yan Han <pangyanhan@gmail.com> writes:
> commit c9bfb953 (want_color: automatically fallback to color.ui,
> 2011-08-17) introduced a regression where format-patch produces colorized
> patches when color.ui is set to "always".
Thanks.
I'd very much prefer this "one setup, one test" folded into an existing
test script, instead of wasting a new test number. Perhaps in t4014 whose
title reads "various format-patch tests"?
> diff --git a/t/t4051-format-patch-config.sh b/t/t4051-format-patch-config.sh
> new file mode 100755
> index 0000000..cea9c7d
> --- /dev/null
> +++ b/t/t4051-format-patch-config.sh
> @@ -0,0 +1,23 @@
> +#!/bin/sh
> +
> +test_description='check that format-patch does not respect porcelain config'
> +
> +. ./test-lib.sh
> +
> +test_expect_success setup '
> + echo foo >foo &&
> + git add foo &&
> + git commit -m "commit1" &&
> + echo bar >foo &&
> + git add foo &&
> + git commit -m "commit2"
> +'
> +
> +test_expect_failure 'format patch with ui.color=always generates non colorized patch' '
> + git config color.ui always &&
> + git format-patch -1 &&
> + mv 0001-commit2.patch actual &&
If you have a concrete output file, there is no point moving it to
"actual", especially when you are not comparing it with "expect".
> + test_must_fail grep "\[31m-" actual
> +'
Hmm, is this grep safe?
Perhaps adding something like this near the end of an existing test script
might be simpler and sufficient, no?
test_expect_failure 'format patch ignores color.ui' '
test_unconfig color.ui &&
git format-patch --stdout -1 >expect &&
test_config color.ui always &&
git format-patch --stdout -1 >actual &&
test_cmp expect actual
'
^ permalink raw reply
* Re: [PATCH/RFCv2 2/2] format-patch: produce non colorized patches when ui.color=always
From: Junio C Hamano @ 2011-09-12 18:08 UTC (permalink / raw)
To: Pang Yan Han; +Cc: git, peff, martin.von.zweigbergk, sdaoden, ib
In-Reply-To: <1315849601-26497-3-git-send-email-pangyanhan@gmail.com>
Pang Yan Han <pangyanhan@gmail.com> writes:
> commit c9bfb953 (want_color: automatically fallback to color.ui,
> 2011-08-17) introduced a regression where format-patch produces colorized
> patches when color.ui is set to "always".
>
> In f3aafa4 (Disable color detection during format-patch, 2006-07-09),
> git_format_config was taught to intercept diff.color to avoid passing it
> down to git_log_config and later, git_diff_ui_config.
>
> Teach git_format_config to intercept color.ui in the same way.
>
> Helped-by: Jeff King <peff@peff.net>
> Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
> ---
> builtin/log.c | 3 ++-
> t/t4051-format-patch-config.sh | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/log.c b/builtin/log.c
> index d760ee0..99f8c4c 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -608,7 +608,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
> string_list_append(&extra_cc, value);
> return 0;
> }
> - if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
> + if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff") ||
> + !strcmp(var, "color.ui")) {
> return 0;
Looks sensible. Thanks.
^ permalink raw reply
* Re: windows git problem
From: luis @ 2011-09-12 18:31 UTC (permalink / raw)
To: Michael Witten; +Cc: git
In-Reply-To: <CAMOZ1Bs6tGGJ8eZja0OaqtzK0imKt_NtiWOTgpLCaisvEXh2Rw@mail.gmail.com>
Exactly!
so the next time someone (in windows) does a commit, they remove the
file or the folder contents!
On 12/09/11 19:05, Michael Witten wrote:
> On Mon, Sep 12, 2011 at 17:35, luis<luis@tandvsolns.co.uk> wrote:
>> However when I checked out the project under windows (either clone or pull)
>> one or the other would disappear and it would be staged as removed.
>>
>> The surprising bit for me was not so much that windows could not cope with
>> the case sensitivity, but that git would stage the changes!
> It would be recorded in the index as a change ready to be committed
> (as though `git rm' had been used)?
>
--
Luis Gutierrez
Test and Verification Solutions (TVS)
skype: luis.tandv
^ permalink raw reply
* Re: [PATCH/RFCv2 2/2] format-patch: produce non colorized patches when ui.color=always
From: Junio C Hamano @ 2011-09-12 18:43 UTC (permalink / raw)
To: Pang Yan Han; +Cc: git, peff, martin.von.zweigbergk, sdaoden, ib
In-Reply-To: <7vsjo17hws.fsf@alter.siamese.dyndns.org>
I've queued this. Thanks.
-- >8 --
From: Pang Yan Han <pangyanhan@gmail.com>
Date: Tue, 13 Sep 2011 01:46:41 +0800
Subject: [PATCH] format-patch: ignore ui.color
commit c9bfb953 (want_color: automatically fallback to color.ui,
2011-08-17) introduced a regression where format-patch produces colorized
patches when color.ui is set to "always".
In f3aafa4 (Disable color detection during format-patch, 2006-07-09),
git_format_config was taught to intercept diff.color to avoid passing it
down to git_log_config and later, git_diff_ui_config.
Teach git_format_config to intercept color.ui in the same way.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin/log.c | 3 ++-
t/t4014-format-patch.sh | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index d760ee0..f5d4930 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -608,7 +608,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
string_list_append(&extra_cc, value);
return 0;
}
- if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
+ if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff") ||
+ !strcmp(var, "color.ui")) {
return 0;
}
if (!strcmp(var, "format.numbered")) {
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 5cbc066..7e405d7 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -886,4 +886,12 @@ test_expect_success 'empty subject prefix does not have extra space' '
test_cmp expect actual
'
+test_expect_success 'format patch ignores color.ui' '
+ test_unconfig color.ui &&
+ git format-patch --stdout -1 >expect &&
+ test_config color.ui always &&
+ git format-patch --stdout -1 >actual &&
+ test_cmp expect actual
+'
+
test_done
--
1.7.7.rc1
^ permalink raw reply related
* [PATCH] fetch: avoid quadratic loop checking for updated submodules
From: Jeff King @ 2011-09-12 19:56 UTC (permalink / raw)
To: Jens Lehmann; +Cc: Junio C Hamano, git, git-dev
Recent versions of git can be slow to fetch repositories with a
large number of refs (or when they already have a large
number of refs). For example, GitHub makes pull-requests
available as refs, which can lead to a large number of
available refs. This slowness goes away when submodule
recursion is turned off:
$ git ls-remote git://github.com/rails/rails.git | wc -l
3034
[this takes ~10 seconds of CPU time to complete]
git fetch --recurse-submodules=no \
git://github.com/rails/rails.git "refs/*:refs/*"
[this still isn't done after 10 _minutes_ of pegging the CPU]
git fetch \
git://github.com/rails/rails.git "refs/*:refs/*"
You can produce a quicker and simpler test case like this:
doit() {
head=`git rev-parse HEAD`
for i in `seq 1 $1`; do
echo $head refs/heads/ref$i
done >.git/packed-refs
echo "==> $1"
rm -rf dest
git init -q --bare dest &&
(cd dest && time git.compile fetch -q .. refs/*:refs/*)
}
rm -rf repo
git init -q repo && cd repo &&
>file && git add file && git commit -q -m one
doit 100
doit 200
doit 400
doit 800
doit 1600
doit 3200
Which yields timings like:
# refs seconds of CPU
100 0.06
200 0.24
400 0.95
800 3.39
1600 13.66
3200 54.09
Notice that although the number of refs doubles in each
trial, the CPU time spent quadruples.
The problem is that the submodule recursion code works
something like:
- for each ref we fetch
- for each commit in git rev-list $new_sha1 --not --all
- add modified submodules to list
- fetch any newly referenced submodules
But that means if we fetch N refs, we start N revision
walks. Worse, because we use "--all", the number of refs we
must process that constitute "--all" keeps growing, too. And
you end up doing O(N^2) ref resolutions.
Instead, this patch structures the code like this:
- for each sha1 we already have
- add $old_sha1 to list $old
- for each ref we fetch
- add $new_sha1 to list $new
- for each commit in git rev-list $new --not $old
- add modified submodules to list
- fetch any newly referenced submodules
This yields timings like:
# refs seconds of CPU
100 0.00
200 0.04
400 0.04
800 0.10
1600 0.21
3200 0.39
Note that the amount of effort doubles as the number of refs
doubles. Similarly, the fetch of rails.git takes about as
much time as it does with --recurse-submodules=no.
Signed-off-by: Jeff King <peff@peff.net>
---
submodule.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 71 insertions(+), 5 deletions(-)
diff --git a/submodule.c b/submodule.c
index 7a76edf..00aeb71 100644
--- a/submodule.c
+++ b/submodule.c
@@ -8,12 +8,17 @@
#include "diffcore.h"
#include "refs.h"
#include "string-list.h"
+#include "sha1-array.h"
static struct string_list config_name_for_path;
static struct string_list config_fetch_recurse_submodules_for_name;
static struct string_list config_ignore_for_name;
static int config_fetch_recurse_submodules = RECURSE_SUBMODULES_ON_DEMAND;
static struct string_list changed_submodule_paths;
+static int initialized_fetch_ref_tips;
+static struct sha1_array ref_tips_before_fetch;
+static struct sha1_array ref_tips_after_fetch;
+
/*
* The following flag is set if the .gitmodules file is unmerged. We then
* disable recursion for all submodules where .git/config doesn't have a
@@ -474,16 +479,71 @@ static void submodule_collect_changed_cb(struct diff_queue_struct *q,
}
}
+static int add_sha1_to_array(const char *ref, const unsigned char *sha1,
+ int flags, void *data)
+{
+ sha1_array_append(data, sha1);
+ return 0;
+}
+
void check_for_new_submodule_commits(unsigned char new_sha1[20])
{
+ if (!initialized_fetch_ref_tips) {
+ for_each_ref(add_sha1_to_array, &ref_tips_before_fetch);
+ initialized_fetch_ref_tips = 1;
+ }
+
+ sha1_array_append(&ref_tips_after_fetch, new_sha1);
+}
+
+struct argv_array {
+ const char **argv;
+ unsigned int argc;
+ unsigned int alloc;
+};
+
+static void init_argv(struct argv_array *array)
+{
+ array->argv = NULL;
+ array->argc = 0;
+ array->alloc = 0;
+}
+
+static void push_argv(struct argv_array *array, const char *value)
+{
+ ALLOC_GROW(array->argv, array->argc + 2, array->alloc);
+ array->argv[array->argc++] = xstrdup(value);
+ array->argv[array->argc] = NULL;
+}
+
+static void clear_argv(struct argv_array *array)
+{
+ int i;
+ for (i = 0; i < array->argc; i++)
+ free((char **)array->argv[i]);
+ free(array->argv);
+ init_argv(array);
+}
+
+static void add_sha1_to_argv(const unsigned char sha1[20], void *data)
+{
+ push_argv(data, sha1_to_hex(sha1));
+}
+
+static void calculate_changed_submodule_paths() {
struct rev_info rev;
struct commit *commit;
- const char *argv[] = {NULL, NULL, "--not", "--all", NULL};
- int argc = ARRAY_SIZE(argv) - 1;
+ struct argv_array argv;
init_revisions(&rev, NULL);
- argv[1] = xstrdup(sha1_to_hex(new_sha1));
- setup_revisions(argc, argv, &rev, NULL);
+ init_argv(&argv);
+ push_argv(&argv, "--"); /* argv[0] program name */
+ sha1_array_for_each_unique(&ref_tips_after_fetch,
+ add_sha1_to_argv, &argv);
+ push_argv(&argv, "--not");
+ sha1_array_for_each_unique(&ref_tips_before_fetch,
+ add_sha1_to_argv, &argv);
+ setup_revisions(argv.argc, argv.argv, &rev, NULL);
if (prepare_revision_walk(&rev))
die("revision walk setup failed");
@@ -507,7 +567,11 @@ void check_for_new_submodule_commits(unsigned char new_sha1[20])
parent = parent->next;
}
}
- free((char *)argv[1]);
+
+ clear_argv(&argv);
+ sha1_array_clear(&ref_tips_before_fetch);
+ sha1_array_clear(&ref_tips_after_fetch);
+ initialized_fetch_ref_tips = 0;
}
int fetch_populated_submodules(int num_options, const char **options,
@@ -541,6 +605,8 @@ int fetch_populated_submodules(int num_options, const char **options,
cp.git_cmd = 1;
cp.no_stdin = 1;
+ calculate_changed_submodule_paths();
+
for (i = 0; i < active_nr; i++) {
struct strbuf submodule_path = STRBUF_INIT;
struct strbuf submodule_git_dir = STRBUF_INIT;
--
1.7.6.10.g62f04
^ permalink raw reply related
* What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 20:16 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'.
The tip of 'master' is tagged as 1.7.7-rc1. Unfortunately k.org seems to
be still down, so there will be no pre-built rpms nor pre-formatted manual
or documentation pages.
I've tentatively uploaded a release candidate tarball at:
http://code.google.com/p/git-core/downloads/list
and its SHA-1 checksum is:
80dfcce410d2f36ffed4c8b48c8c896a45159e41 git-1.7.7.rc1.tar.gz
Here are the repositories that have my integration branches:
With maint, master, next, pu and todo:
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
With only maint and master:
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
With all the topics and integration branches:
url = https://github.com/gitster/git
--------------------------------------------------
[New Topics]
* ph/format-patch-no-color (2011-09-12) 1 commit
- format-patch: ignore ui.color
This fix for the recent regression probably should be in 1.7.7 final.
Will merge to "master" soonish.
--------------------------------------------------
[Graduated to "master"]
* jl/maint-fetch-submodule-check-fix (2011-09-09) 1 commit
+ fetch: skip on-demand checking when no submodules are configured
* jn/remote-helpers-doc (2011-09-01) 3 commits
+ (short) documentation for the testgit remote helper
+ Documentation/git-remote-helpers: explain how import works with multiple refs
+ Documentation/remote-helpers: explain capabilities first
--------------------------------------------------
[Stalled]
* jk/default-attr (2011-08-26) 1 commit
- attr: map builtin userdiff drivers to well-known extensions
Not urgent; I fixed up the test breakage just for fun.
* nd/maint-autofix-tag-in-head (2011-08-26) 3 commits
- Accept tags in HEAD or MERGE_HEAD
- merge: remove global variable head[]
- merge: keep stash[] a local variable
Probably needs a re-roll to aim a bit higher.
Not urgent; will not be in 1.7.7.
* tr/doc-note-rewrite (2011-09-05) 1 commit
- Documentation: "on for all" configuration of notes.rewriteRef
It was questioned if the new text suggests a sane and safe thing to do.
* jk/add-i-hunk-filter (2011-07-27) 5 commits
(merged to 'next' on 2011-08-11 at 8ff9a56)
+ add--interactive: add option to autosplit hunks
+ add--interactive: allow negatation of hunk filters
+ add--interactive: allow hunk filtering on command line
+ add--interactive: factor out regex error handling
+ add--interactive: refactor patch mode argument processing
Needs documentation updates, tests, and integration with the higher level
callers, e.g. "git add -p".
* jh/receive-count-limit (2011-05-23) 10 commits
- receive-pack: Allow server to refuse pushes with too many objects
- pack-objects: Estimate pack size; abort early if pack size limit is exceeded
- send-pack/receive-pack: Allow server to refuse pushing too large packs
- pack-objects: Allow --max-pack-size to be used together with --stdout
- send-pack/receive-pack: Allow server to refuse pushes with too many commits
- pack-objects: Teach new option --max-commit-count, limiting #commits in pack
- receive-pack: Prepare for addition of the new 'limit-*' family of capabilities
- Tighten rules for matching server capabilities in server_supports()
- send-pack: Attempt to retrieve remote status even if pack-objects fails
- Update technical docs to reflect side-band-64k capability in receive-pack
Would need another round to separate per-pack and per-session limits.
* jm/mergetool-pathspec (2011-06-22) 2 commits
- mergetool: Don't assume paths are unmerged
- mergetool: Add tests for filename with whitespace
I think this is a good idea, but it probably needs a re-roll.
Cf. $gmane/176254, 176255, 166256
* jk/generation-numbers (2011-09-11) 8 commits
- metadata-cache.c: make two functions static
- limit "contains" traversals based on commit generation
- check commit generation cache validity against grafts
- pretty: support %G to show the generation number of a commit
- commit: add commit_generation function
- add metadata-cache infrastructure
- decorate: allow storing values instead of pointers
- Merge branch 'jk/tag-contains-ab' (early part) into HEAD
The initial "tag --contains" de-pessimization without need for generation
numbers is already in; backburnered.
* sr/transport-helper-fix-rfc (2011-07-19) 2 commits
- t5800: point out that deleting branches does not work
- t5800: document inability to push new branch with old content
* po/cygwin-backslash (2011-08-05) 2 commits
- On Cygwin support both UNIX and DOS style path-names
- git-compat-util: add generic find_last_dir_sep that respects is_dir_sep
--------------------------------------------------
[Cooking]
* hl/iso8601-more-zone-formats (2011-09-09) 2 commits
- fixup? simplification and tightening
- date.c: Support iso8601 timezone formats
Not urgent.
Will squash them into one and push them forward to "next", though.
* jc/signed-push (2011-09-09) 7 commits
. push -s: support pre-receive-signature hook
. push -s: receiving end
. push -s: send signed push certificate
. push -s: skeleton
. refactor run_receive_hook()
- Split GPG interface into its own helper library
- send-pack: typofix error message
(this branch is tangled with jc/signed-push-3.)
This was the v2 that updated notes tree on the receiving end.
* jc/signed-push-3 (2011-09-09) 4 commits
- push -s: signed push
- rename "match_refs()" to "match_push_refs()"
- Split GPG interface into its own helper library
- send-pack: typofix error message
(this branch is tangled with jc/signed-push.)
This is the third edition, that moves the preparation of the notes tree to
the sending end.
* jc/run-receive-hook-cleanup (2011-09-09) 1 commit
- refactor run_receive_hook()
This is a remnant in the jc/signed-push topic that has become unnecessary
for the purpose of jc/signed-push-3, but is retained for its clean-up
value.
The corresponding one will be dropped when rebuilding the jc/signed-push
topic on top of this topic later.
* jk/for-each-ref (2011-09-08) 5 commits
- for-each-ref: add split message parts to %(contents:*).
- for-each-ref: handle multiline subjects like --pretty
- for-each-ref: refactor subject and body placeholder parsing
- t6300: add more body-parsing tests
- t7004: factor out gpg setup
Not urgent.
Looked more or less reasonable, though.
* wh/normalize-alt-odb-path (2011-09-07) 1 commit
- sha1_file: normalize alt_odb path before comparing and storing
Not urgent.
Looked more or less reasonable, though.
* fk/use-kwset-pickaxe-grep-f (2011-09-11) 2 commits
- obstack.c: Fix some sparse warnings
- sparse: Fix an "Using plain integer as NULL pointer" warning
In general we would prefer to see these fixed at the upstream first, but
we have essentially forked from them at their last GPLv2 versions...
* jc/make-static (2011-09-11) 2 commits
(merged to 'next' on 2011-09-11 at 2acb0af)
+ vcs-svn: remove unused functions and make some static
+ make-static: master
I am not sure about the droppage of a few unused functions in the topmost
patch.
* rj/quietly-create-dep-dir (2011-09-11) 1 commit
- Makefile: Make dependency directory creation less noisy
Not urgent.
Will merge to "next", though.
* js/cred-macos-x-keychain (2011-09-11) 1 commit
- contrib: add a credential helper for Mac OS X's keychain
(this branch uses jk/http-auth-keyring.)
Welcome addition to build our confidence in the jk/http-auth-keyring topic.
Will merge to "next".
* mh/check-ref-format (2011-09-11) 8 commits
- Add tools to avoid the use of unnormalized refnames.
- Do not allow ".lock" at the end of any refname component
- Add a library function normalize_refname()
- Change check_ref_format() to take a flags argument
- fixup asciidoc formatting
- git check-ref-format: add options --allow-onelevel and --refspec-pattern
- Change bad_ref_char() to return a boolean value
- t1402: add some more tests
Another reroll coming.
* mz/remote-rename (2011-09-11) 4 commits
- remote: only update remote-tracking branch if updating refspec
- remote rename: warn when refspec was not updated
- remote: "rename o foo" should not rename ref "origin/bar"
- remote: write correct fetch spec when renaming remote 'remote'
* rj/maint-t9159-svn-rev-notation (2011-09-11) 1 commit
- t9159-*.sh: Add an svn version check
Ack/Nack from people involved in git-svn?
* cb/common-prefix-unification (2011-09-11) 4 commits
- dir.c: make common_prefix_len() static
- rename pathspec_prefix() to common_prefix() and move to dir.[ch]
- consolidate pathspec_prefix and common_prefix
- remove prefix argument from pathspec_prefix
Will merge to "next" after squashing the tip one into "consolidate" patch.
* cb/send-email-help (2011-09-05) 1 commit
- send-email: add option -h
I think we should further amend to drop the fully-spelled "help" that will
be intercepted by "git" wrapper before moving this forward.
A separate set of patches to remove the hidden fully-spelled "help" from
other commands would be nice to have as companion patches as well.
* jc/fetch-pack-fsck-objects (2011-09-04) 3 commits
- test: fetch/receive with fsckobjects
- transfer.fsckobjects: unify fetch/receive.fsckobjects
- fetch.fsckobjects: verify downloaded objects
We had an option to verify the sent objects before accepting a push but
lacked the corresponding option when fetching. In the light of the recent
k.org incident, a change like this would be a good addition.
Will merge to "next" to cook for more.
* jc/fetch-verify (2011-09-01) 3 commits
- fetch: verify we have everything we need before updating our ref
- rev-list --verify-object
- list-objects: pass callback data to show_objects()
(this branch uses jc/traverse-commit-list; is tangled with jc/receive-verify.)
During a fetch, we verify that the pack stream is self consistent,
but did not verify that the refs that are updated are consistent with
objects contained in the packstream, and this adds such a check.
Will merge to "next" to cook for more.
* jc/receive-verify (2011-09-09) 6 commits
- receive-pack: check connectivity before concluding "git push"
- check_everything_connected(): libify
- check_everything_connected(): refactor to use an iterator
- fetch: verify we have everything we need before updating our ref
- rev-list --verify-object
- list-objects: pass callback data to show_objects()
(this branch uses jc/traverse-commit-list; is tangled with jc/fetch-verify.)
While accepting a push, we verify that the pack stream is self consistent,
but did not verify that the refs the push updates are consistent with
objects contained in the packstream, and this adds such a check.
Will merge to "next" to cook for more.
* jc/request-pull-show-head (2011-09-06) 1 commit
- State what commit to expect in request-pull
Will merge to "next".
* jn/maint-http-error-message (2011-09-06) 2 commits
- http: avoid empty error messages for some curl errors
- http: remove extra newline in error message
Will merge to "next".
* bk/ancestry-path (2011-08-25) 3 commits
(merged to 'next' on 2011-09-02 at d05ba5d)
+ revision: do not include sibling history in --ancestry-path output
+ revision: keep track of the end-user input from the command line
+ rev-list: Demonstrate breakage with --ancestry-path --all
The topic came up a bit too late in the cycle.
Will cook for a while.
* mg/branch-list (2011-09-08) 6 commits
(merged to 'next' on 2011-09-11 at 20a9cdb)
+ branch: -v does not automatically imply --list
(merged to 'next' on 2011-09-02 at b818eae)
+ branch: allow pattern arguments
+ branch: introduce --list option
+ git-branch: introduce missing long forms for the options
+ git-tag: introduce long forms for the options
+ t6040: test branch -vv
Not urgent; the topic came up a bit too late in the cycle.
* mm/rebase-i-exec-edit (2011-08-26) 2 commits
(merged to 'next' on 2011-09-02 at e75b1b9)
+ rebase -i: notice and warn if "exec $cmd" modifies the index or the working tree
+ rebase -i: clean error message for --continue after failed exec
Not urgent; the topic came up a bit too late in the cycle.
* hv/submodule-merge-search (2011-08-26) 5 commits
- submodule: Search for merges only at end of recursive merge
- allow multiple calls to submodule merge search for the same path
- submodule: Demonstrate known breakage during recursive merge
- push: Don't push a repository with unpushed submodules
(merged to 'next' on 2011-08-24 at 398e764)
+ push: teach --recurse-submodules the on-demand option
(this branch is tangled with fg/submodule-auto-push.)
Not urgent; the topic came up a bit too late in the cycle. The second
from the bottom one needs to be replaced with a properly written commit
log message.
* mm/mediawiki-as-a-remote (2011-09-01) 2 commits
- git-remote-mediawiki: allow push to set MediaWiki metadata
- Add a remote helper to interact with mediawiki (fetch & push)
Fun.
Not urgent; the topic came up a bit too late in the cycle.
* bc/unstash-clean-crufts (2011-08-27) 4 commits
(merged to 'next' on 2011-09-02 at 7bfd66f)
+ git-stash: remove untracked/ignored directories when stashed
+ t/t3905: add missing '&&' linkage
+ git-stash.sh: fix typo in error message
+ t/t3905: use the name 'actual' for test output, swap arguments to test_cmp
Not urgent; the topic came up a bit too late in the cycle.
* da/make-auto-header-dependencies (2011-08-30) 1 commit
(merged to 'next' on 2011-09-02 at e04a4af)
+ Makefile: Improve compiler header dependency check
(this branch uses fk/make-auto-header-dependencies.)
Not urgent; will not be in 1.7.7.
* gb/am-hg-patch (2011-08-29) 1 commit
(merged to 'next' on 2011-09-02 at 3edfe4c)
+ am: preliminary support for hg patches
Not urgent; the topic came up a bit too late in the cycle.
* jc/diff-index-unpack (2011-08-29) 3 commits
(merged to 'next' on 2011-09-02 at 4206bd9)
+ diff-index: pass pathspec down to unpack-trees machinery
+ unpack-trees: allow pruning with pathspec
+ traverse_trees(): allow pruning with pathspec
Will cook for a while.
* nm/grep-object-sha1-lock (2011-08-30) 1 commit
(merged to 'next' on 2011-09-02 at 336f57d)
+ grep: Fix race condition in delta_base_cache
Not urgent; the topic came up a bit too late in the cycle.
* tr/mergetool-valgrind (2011-08-30) 1 commit
(merged to 'next' on 2011-09-02 at f5f2c61)
+ Symlink mergetools scriptlets into valgrind wrappers
Not urgent; the topic came up a bit too late in the cycle.
* fg/submodule-auto-push (2011-09-11) 2 commits
(merged to 'next' on 2011-09-11 at 3fc86f7)
+ submodule.c: make two functions static
(merged to 'next' on 2011-08-24 at 398e764)
+ push: teach --recurse-submodules the on-demand option
(this branch is tangled with hv/submodule-merge-search.)
What the topic aims to achieve may make sense, but the implementation
looked somewhat suboptimal.
* jc/traverse-commit-list (2011-08-22) 3 commits
(merged to 'next' on 2011-08-24 at df50dd7)
+ revision.c: update show_object_with_name() without using malloc()
+ revision.c: add show_object_with_name() helper function
+ rev-list: fix finish_object() call
(this branch is used by jc/fetch-verify and jc/receive-verify.)
Not urgent; will not be in 1.7.7.
* fk/make-auto-header-dependencies (2011-08-18) 1 commit
(merged to 'next' on 2011-08-24 at 3da2c25)
+ Makefile: Use computed header dependencies if the compiler supports it
(this branch is used by da/make-auto-header-dependencies.)
Not urgent; will not be in 1.7.7.
* mh/iterate-refs (2011-09-11) 7 commits
- refs.c: make create_cached_refs() static
- Retain caches of submodule refs
- Store the submodule name in struct cached_refs
- Allocate cached_refs objects dynamically
- Change the signature of read_packed_refs()
- Access reference caches only through new function get_cached_refs()
- Extract a function clear_cached_refs()
I did not see anything fundamentally wrong with this series, but it was
unclear what the benefit of these changes are. If the series were to read
parts of the ref hierarchy (like refs/heads/) lazily, the story would
have been different, though.
Not urgent; will not be in 1.7.7.
* hv/submodule-update-none (2011-08-11) 2 commits
(merged to 'next' on 2011-08-24 at 5302fc1)
+ add update 'none' flag to disable update of submodule by default
+ submodule: move update configuration variable further up
Not urgent; will not be in 1.7.7.
* jc/lookup-object-hash (2011-08-11) 6 commits
(merged to 'next' on 2011-08-24 at 5825411)
+ object hash: replace linear probing with 4-way cuckoo hashing
+ object hash: we know the table size is a power of two
+ object hash: next_size() helper for readability
+ pack-objects --count-only
+ object.c: remove duplicated code for object hashing
+ object.c: code movement for readability
I do not think there is anything fundamentally wrong with this series, but
the risk of breakage far outweighs observed performance gain in one
particular workload. Will keep it in 'next' at least for one cycle.
Not urgent; will not be in 1.7.7.
* fg/submodule-git-file-git-dir (2011-08-22) 2 commits
(merged to 'next' on 2011-08-23 at 762194e)
+ Move git-dir for submodules
+ rev-parse: add option --resolve-git-dir <path>
I do not think there is anything fundamentally wrong with this series, but
the risk of breakage outweighs any benefit for having this new
feature. Will keep it in 'next' at least for one cycle.
Not urgent; will not be in 1.7.7.
* jk/http-auth-keyring (2011-09-11) 14 commits
(merged to 'next' on 2011-09-11 at 491ce6a)
+ credentials: make credential_fill_gently() static
(merged to 'next' on 2011-08-03 at b06e80e)
+ credentials: add "getpass" helper
+ credentials: add "store" helper
+ credentials: add "cache" helper
+ docs: end-user documentation for the credential subsystem
+ http: use hostname in credential description
+ allow the user to configure credential helpers
+ look for credentials in config before prompting
+ http: use credential API to get passwords
+ introduce credentials API
+ http: retry authentication failures for all http requests
+ remote-curl: don't retry auth failures with dumb protocol
+ improve httpd auth tests
+ url: decode buffers that are not NUL-terminated
(this branch is used by js/cred-macos-x-keychain.)
Looked mostly reasonable except for the limitation that it is not clear
how to deal with a site at which a user needs to use different passwords
for different repositories. Will keep it in "next" at least for one cycle,
until we start hearing real-world success reports on the list.
Not urgent; will not be in 1.7.7.
* rr/revert-cherry-pick-continue (2011-09-11) 19 commits
(merged to 'next' on 2011-09-11 at 7d78054)
+ builtin/revert.c: make commit_list_append() static
(merged to 'next' on 2011-08-24 at 712c115)
+ revert: Propagate errors upwards from do_pick_commit
+ revert: Introduce --continue to continue the operation
+ revert: Don't implicitly stomp pending sequencer operation
+ revert: Remove sequencer state when no commits are pending
+ reset: Make reset remove the sequencer state
+ revert: Introduce --reset to remove sequencer state
+ revert: Make pick_commits functionally act on a commit list
+ revert: Save command-line options for continuing operation
+ revert: Save data for continuing after conflict resolution
+ revert: Don't create invalid replay_opts in parse_args
+ revert: Separate cmdline parsing from functional code
+ revert: Introduce struct to keep command-line options
+ revert: Eliminate global "commit" variable
+ revert: Rename no_replay to record_origin
+ revert: Don't check lone argument in get_encoding
+ revert: Simplify and inline add_message_to_msg
+ config: Introduce functions to write non-standard file
+ advice: Introduce error_resolve_conflict
Will keep it in 'next' at least for one cycle.
Not urgent; will not be in 1.7.7.
--------------------------------------------------
[Discarded]
* jk/pager-with-alias (2011-08-19) 1 commit
. support pager.* for aliases
* cb/maint-quiet-push (2011-09-05) 4 commits
. t5541: avoid TAP test miscounting
. push: old receive-pack does not understand --quiet
. fix push --quiet via http
. tests for push --quiet
Dropped for rerolling after 1.7.7 cycle.
^ permalink raw reply
* [ANNOUNCE] Git 1.7.6.3
From: Junio C Hamano @ 2011-09-12 20:17 UTC (permalink / raw)
To: git; +Cc: Linux Kernel
The latest maintenance release Git 1.7.6.3 is available but unfortunately
not at the usual places.
The release tarball is found at:
http://code.google.com/p/git-core/downloads/list
and its SHA-1 checksum is:
7264c0b0d97cb6a70447ba3b4b6fa488810d8115 git-1.7.6.3.tar.gz
Also the following public repositories all have a copy of the v1.7.6.3
tag and the maint branch that the tag points at:
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
url = https://github.com/gitster/git
Git v1.7.6.3 Release Notes
==========================
Fixes since v1.7.6.2
--------------------
* "git -c var=value subcmd" misparsed the custom configuration when
value contained an equal sign.
* "git fetch" had a major performance regression, wasting many
needless cycles in a repository where there is no submodules
present. This was especially bad, when there were many refs.
* "git reflog $refname" did not default to the "show" subcommand as
the documentation advertised the command to do.
* "git reset" did not leave meaningful log message in the reflog.
* "git status --ignored" did not show ignored items when there is no
untracked items.
* "git tag --contains $commit" was unnecessarily inefficient.
Also contains minor fixes and documentation updates.
^ permalink raw reply
* [ANNOUNCE] Git 1.7.7.rc1
From: Junio C Hamano @ 2011-09-12 20:17 UTC (permalink / raw)
To: git; +Cc: Linux Kernel
A release candidate Git 1.7.7.rc1 is available but unfortunately not at
the usual places. Even so (rather, exactly because it is in unusual
places, so we are likely to have smaller number of casual observers who
grab and build them), please test it to help us make the upcoming release
as solid as we could.
A release candidate tarball is found at:
http://code.google.com/p/git-core/downloads/list
and its SHA-1 checksum is:
80dfcce410d2f36ffed4c8b48c8c896a45159e41 git-1.7.7.rc1.tar.gz
Also the following public repositories all have a copy of the v1.7.7-rc1
tag and the master branch that the tag points at:
url = git://repo.or.cz/alt-git.git
url = https://code.google.com/p/git-core/
url = git://git.sourceforge.jp/gitroot/git-core/git.git
url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
url = https://github.com/gitster/git
Git v1.7.7 Release Notes (draft)
========================
Updates since v1.7.6
--------------------
* The scripting part of the codebase is getting prepared for i18n/l10n.
* Interix, Cygwin and Minix ports got updated.
* Various updates to git-p4 (in contrib/), fast-import, and git-svn.
* Gitweb learned to read from /etc/gitweb-common.conf when it exists,
before reading from gitweb_config.perl or from /etc/gitweb.conf
(this last one is read only when per-repository gitweb_config.perl
does not exist).
* Various codepaths that invoked zlib deflate/inflate assumed that these
functions can compress or uncompress more than 4GB data in one call on
platforms with 64-bit long, which has been corrected.
* Git now recognizes loose objects written by other implementations that
use a non-standard window size for zlib deflation (e.g. Agit running on
Android with 4kb window). We used to reject anything that was not
deflated with 32kb window.
* Interaction between the use of pager and coloring of the output has
been improved, especially when a command that is not built-in was
involved.
* "git am" learned to pass the "--exclude=<path>" option through to underlying
"git apply".
* You can now feed many empty lines before feeding an mbox file to
"git am".
* "git archive" can be told to pass the output to gzip compression and
produce "archive.tar.gz".
* "git bisect" can be used in a bare repository (provided that the test
you perform per each iteration does not need a working tree, of
course).
* The length of abbreviated object names in "git branch -v" output
now honors the core.abbrev configuration variable.
* "git check-attr" can take relative paths from the command line.
* "git check-attr" learned an "--all" option to list the attributes for a
given path.
* "git checkout" (both the code to update the files upon checking out a
different branch and the code to checkout a specific set of files) learned
to stream the data from object store when possible, without having to
read the entire contents of a file into memory first. An earlier round
of this code that is not in any released version had a large leak but
now it has been plugged.
* "git clone" can now take a "--config key=value" option to set the
repository configuration options that affect the initial checkout.
* "git commit <paths>..." now lets you feed relative pathspecs that
refer to outside your current subdirectory.
* "git diff --stat" learned a --stat-count option to limit the output of
a diffstat report.
* "git diff" learned a "--histogram" option to use a different diff
generation machinery stolen from jgit, which might give better
performance.
* "git diff" had a weird worst case behaviour that can be triggered
when comparing files with potentially many places that could match.
* "git fetch", "git push" and friends no longer show connection
errors for addresses that couldn't be connected to when at least one
address succeeds (this is arguably a regression but a deliberate
one).
* "git grep" learned "--break" and "--heading" options, to let users mimic
the output format of "ack".
* "git grep" learned a "-W" option that shows wider context using the same
logic used by "git diff" to determine the hunk header.
* Invoking the low-level "git http-fetch" without "-a" option (which
git itself never did---normal users should not have to worry about
this) is now deprecated.
* The "--decorate" option to "git log" and its family learned to
highlight grafted and replaced commits.
* "git rebase master topci" no longer spews usage hints after giving
the "fatal: no such branch: topci" error message.
* The recursive merge strategy implementation got a fairly large
fix for many corner cases that may rarely happen in real world
projects (it has been verified that none of the 16000+ merges in
the Linux kernel history back to v2.6.12 is affected with the
corner case bugs this update fixes).
* "git stash" learned an "--include-untracked option".
* "git submodule update" used to stop at the first error updating a
submodule; it now goes on to update other submodules that can be
updated, and reports the ones with errors at the end.
* "git push" can be told with the "--recurse-submodules=check" option to
refuse pushing of the supermodule, if any of its submodules'
commits hasn't been pushed out to their remotes.
* "git upload-pack" and "git receive-pack" learned to pretend that only a
subset of the refs exist in a repository. This may help a site to
put many tiny repositories into one repository (this would not be
useful for larger repositories as repacking would be problematic).
* "git verify-pack" has been rewritten to use the "index-pack" machinery
that is more efficient in reading objects in packfiles.
* test scripts for gitweb tried to run even when CGI-related perl modules
are not installed; they now exit early when the latter are unavailable.
Also contains various documentation updates and minor miscellaneous
changes.
Fixes since v1.7.6
------------------
Unless otherwise noted, all fixes in the 1.7.6.X maintenance track are
included in this release.
* The error reporting logic of "git am" when the command is fed a file
whose mail-storage format is unknown was fixed.
(merge dff4b0e gb/maint-am-patch-format-error-message later to 'maint').
* "git branch --set-upstream @{-1} foo" did not expand @{-1} correctly.
(merge e9d4f74 mg/branch-set-upstream-previous later to 'maint').
* "git branch -m" and "git checkout -b" incorrectly allowed the tip
of the branch that is currently checked out updated.
(merge 55c4a67 ci/forbid-unwanted-current-branch-update later to 'maint').
* "git check-ref-format --print" used to parrot a candidate string that
began with a slash (e.g. /refs/heads/master) without stripping it, to make
the result a suitably normalized string the caller can append to "$GIT_DIR/".
(merge f3738c1 mh/check-ref-format-print-normalize later to 'maint').
* "git clone" failed to clone locally from a ".git" file that itself
is not a directory but is a pointer to one.
(merge 9b0ebc7 nd/maint-clone-gitdir later to 'maint').
* "git clone" from a local repository that borrows from another
object store using a relative path in its objects/info/alternates
file did not adjust the alternates in the resulting repository.
(merge e6baf4a1 jc/maint-clone-alternates later to 'maint').
* "git describe --dirty" did not refresh the index before checking the
state of the working tree files.
(cherry-pick bb57148 ac/describe-dirty-refresh later to 'maint').
* "git ls-files ../$path" that is run from a subdirectory reported errors
incorrectly when there is no such path that matches the given pathspec.
(merge 0f64bfa cb/maint-ls-files-error-report later to 'maint').
^ permalink raw reply
* Re: [PATCH] fetch: avoid quadratic loop checking for updated submodules
From: Junio C Hamano @ 2011-09-12 20:21 UTC (permalink / raw)
To: Jeff King; +Cc: Jens Lehmann, git, git-dev
In-Reply-To: <20110912195652.GA27850@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Instead, this patch structures the code like this:
Yup, I agree that's the right way to do the other half of the issue.
Will queue for 1.7.6.X series, but I've already pushed out 1.7.6.3
so... ;-)
^ permalink raw reply
* Re: [PATCH] fetch: avoid quadratic loop checking for updated submodules
From: Junio C Hamano @ 2011-09-12 21:25 UTC (permalink / raw)
To: Jeff King; +Cc: Jens Lehmann, git, git-dev
In-Reply-To: <20110912195652.GA27850@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> +struct argv_array {
> + const char **argv;
> + unsigned int argc;
> + unsigned int alloc;
> +};
> +
> ...
> +static void calculate_changed_submodule_paths() {
Locally fixed while queueing; no need to resend:
static void calculate_changed_submodule_paths(void)
{
> struct rev_info rev;
> struct commit *commit;
> - const char *argv[] = {NULL, NULL, "--not", "--all", NULL};
> - int argc = ARRAY_SIZE(argv) - 1;
> + struct argv_array argv;
>
> init_revisions(&rev, NULL);
> - argv[1] = xstrdup(sha1_to_hex(new_sha1));
> - setup_revisions(argc, argv, &rev, NULL);
> + init_argv(&argv);
> + push_argv(&argv, "--"); /* argv[0] program name */
> + sha1_array_for_each_unique(&ref_tips_after_fetch,
> + add_sha1_to_argv, &argv);
> + push_argv(&argv, "--not");
> + sha1_array_for_each_unique(&ref_tips_before_fetch,
> + add_sha1_to_argv, &argv);
> + setup_revisions(argv.argc, argv.argv, &rev, NULL);
I initially thought "eh, what if we have very many refs that may not fit
on the command line", but this is running the internal rev-list, so there
is no such issue.
I however have to wonder if the use of object flags done by this revision
walking need to be cleared to prevent them from interfering with the
ancestry walking done in find_common(). Shouldn't this be done in a
subprocess "rev-list" that is fed these positive and negative refs from
its standard input?
The patch does not make things worse in any sense, so I'll queue it but I
have this suspicion that fetching in a superproject that uses submodules
may be broken in the versions of Git with these internal revision walking.
^ permalink raw reply
* Re: [PATCH] fetch: avoid quadratic loop checking for updated submodules
From: Jeff King @ 2011-09-12 22:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jens Lehmann, git, git-dev
In-Reply-To: <7vr53l5u7h.fsf@alter.siamese.dyndns.org>
On Mon, Sep 12, 2011 at 02:25:38PM -0700, Junio C Hamano wrote:
> > +static void calculate_changed_submodule_paths() {
>
> Locally fixed while queueing; no need to resend:
>
> static void calculate_changed_submodule_paths(void)
> {
Oops, thanks. Old habits die hard, I guess. :)
> I initially thought "eh, what if we have very many refs that may not fit
> on the command line", but this is running the internal rev-list, so there
> is no such issue.
>
> I however have to wonder if the use of object flags done by this revision
> walking need to be cleared to prevent them from interfering with the
> ancestry walking done in find_common(). Shouldn't this be done in a
> subprocess "rev-list" that is fed these positive and negative refs from
> its standard input?
Maybe. I haven't noticed any such breakage. I don't know if it's because
it's not there, or we don't have sufficient test cases. But if it were a
problem, it would be pretty severe, wouldn't it? The traversal is done
whether you actually have submodules or not, so lots of people should be
seeing it.
I tried to keep the patch as minimal as possible. If I were writing
from scratch, I think my strategy would be to actually start a
traversal, and mark the commit objects themselves as we find them. I.e.,
the two steps would be:
- start a traversal
- for each existing ref
- lookup_commit_reference, mark as SEEN
- for each new commit we fetched
- walk commits from $new_sha1 until we hit SEEN, marking each as
SEEN as we go.
IOW, instead of keeping "before" and "after" lists, just mark the
commits. But that perhaps exacerbates the protential problem you
mentioned (though we could maybe just use a different flag than SEEN).
To be honest, the whole submodule recursion thing seems a bit confusing
to me. We walk every commit we just fetched looking for it to introduce
a change in a submodule. But we don't actually remember the sha1 it
changed to. And even if we did, we can't just ask a remote for a sha1,
anyway. So with a set of changes like:
[assume submodule at commit A, superproject at commit B]
1. Make commit C in submodule repo.
2. Make commit D in superproject repo.
3. Make commit E in submodule repo.
4. Make commit F in superproject repo.
what does it buy us to find out that the submodule changed from "A" to
"C"? We can't actually fetch it. We can only fetch the tips of the
submodule and hope that they include everything we wanted (i.e., both C
and E; which might not be the case of E rewound and is not a descendant
of C).
So since we must accept that we can't necessarily get every intermediate
step, I wonder if we are simply better off diffing the "before" and
"after" state of a particular ref, rather than traversing. It's way
cheaper, and is just as likely to give us the same information (i.e.,
which submodule paths had changed commits). It can be fooled by rewinds,
too, of course:
1. Make commit C in submodule repo.
2. Make commit D in superproject repo.
3. Rewind submodule repo back to A.
4. Make commit E in superproject repo.
But in that case, you probably can't get commit "C" from the submodule
anyway, so knowing about it is unlikely to help.
I dunno. Maybe there is more going on. This is the first time I've
looked at the problem.
Also also. I was a little turned off by the fact that every fetch is
going to do the equivalent of "git log --raw -m $new --not $old",
whether you have submodules or not. If you fetch a lot of history, this
is a non-trivial price to pay. Is there some way we can detect whether
submodules are being used at all, and not even bother with this
traversal otherwise? Like checking whether .gitmodules exists? I know
virtually nothing about how submodules work.
-Peff
^ permalink raw reply
* Re: [PATCH] fetch: avoid quadratic loop checking for updated submodules
From: Junio C Hamano @ 2011-09-12 23:06 UTC (permalink / raw)
To: Jeff King; +Cc: Jens Lehmann, git, git-dev
In-Reply-To: <20110912224934.GA28994@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Also also. I was a little turned off by the fact that every fetch is
> going to do the equivalent of "git log --raw -m $new --not $old",
> whether you have submodules or not.
Notice I called your patch solving "the other half"?
See http://thread.gmane.org/gmane.comp.version-control.git/181101
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 21:48 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * nd/maint-autofix-tag-in-head (2011-08-26) 3 commits
> - Accept tags in HEAD or MERGE_HEAD
> - merge: remove global variable head[]
> - merge: keep stash[] a local variable
Could you start thinking about re-rolling this for post 1.7.7 release?
Thanks.
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 21:53 UTC (permalink / raw)
To: Thomas Rast, Jeff King; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * tr/doc-note-rewrite (2011-09-05) 1 commit
> - Documentation: "on for all" configuration of notes.rewriteRef
>
> It was questioned if the new text suggests a sane and safe thing to do.
Should we drop this post 1.7.7, or (preferrably) replace it with better
instructions?
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 21:51 UTC (permalink / raw)
To: Jeff King; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * jk/add-i-hunk-filter (2011-07-27) 5 commits
> (merged to 'next' on 2011-08-11 at 8ff9a56)
> + add--interactive: add option to autosplit hunks
> + add--interactive: allow negatation of hunk filters
> + add--interactive: allow hunk filtering on command line
> + add--interactive: factor out regex error handling
> + add--interactive: refactor patch mode argument processing
Could you start thinking about completing this series, or posting a "where
to go next" summary to guide others with lessor git clout to finish with
help from people who know "add -i" codepath better (I could help), once
1.7.7 ships?
Thanks.
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 21:55 UTC (permalink / raw)
To: Johan Herland; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * jh/receive-count-limit (2011-05-23) 10 commits
> - receive-pack: Allow server to refuse pushes with too many objects
> - pack-objects: Estimate pack size; abort early if pack size limit is exceeded
> - send-pack/receive-pack: Allow server to refuse pushing too large packs
> - pack-objects: Allow --max-pack-size to be used together with --stdout
> - send-pack/receive-pack: Allow server to refuse pushes with too many commits
> - pack-objects: Teach new option --max-commit-count, limiting #commits in pack
> - receive-pack: Prepare for addition of the new 'limit-*' family of capabilities
> - Tighten rules for matching server capabilities in server_supports()
> - send-pack: Attempt to retrieve remote status even if pack-objects fails
> - Update technical docs to reflect side-band-64k capability in receive-pack
>
> Would need another round to separate per-pack and per-session limits.
What's the plan for this topic? I could keep it and list it among the 1.7.8
short-term goals once 1.7.7 ships, or I could drop it.
It is not urgent as we just went into feature freeze for 1.7.7 but please
start thinking about it.
Thanks.
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 21:59 UTC (permalink / raw)
To: Jonathon Mah, Dan McGee, David Aguilar; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * jm/mergetool-pathspec (2011-06-22) 2 commits
> - mergetool: Don't assume paths are unmerged
> - mergetool: Add tests for filename with whitespace
>
> I think this is a good idea, but it probably needs a re-roll.
> Cf. $gmane/176254, 176255, 166256
What's the plan for this series? Do we still want to pursue it within the
timeframe for the next round?
Is there any mergetool/difftool expert who volunteers to help moving this
topic forward?
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 22:02 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * sr/transport-helper-fix-rfc (2011-07-19) 2 commits
> - t5800: point out that deleting branches does not work
> - t5800: document inability to push new branch with old content
I vaguely recall that one of my unrelated topics fixed the issue you were
trying to work around with this topic, or something? Can we see a re-roll
after 1.7.7 ships?
Thanks.
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 22:58 UTC (permalink / raw)
To: Sam Vilain, Michael J Gruber, Eric Wong; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> * rj/maint-t9159-svn-rev-notation (2011-09-11) 1 commit
> - t9159-*.sh: Add an svn version check
Ack/Nack from people involved in git-svn and/or the patch, please?
^ permalink raw reply
* Re: What's cooking in git.git (Sep 2011, #04; Mon, 12)
From: Junio C Hamano @ 2011-09-12 22:56 UTC (permalink / raw)
To: Pascal Obry, Ramsay Jones, Johannes Sixt, Erik Faye-Lund; +Cc: git
In-Reply-To: <7v4o0h7byd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> [Stalled]
>
> * po/cygwin-backslash (2011-08-05) 2 commits
> - On Cygwin support both UNIX and DOS style path-names
> - git-compat-util: add generic find_last_dir_sep that respects is_dir_sep
Honestly I lost track of this one. How would we want to proceed on this
topic after 1.7.7?
Asking help from Windows folks.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox