* [PATCH v2] revert: plug memory leak in "cherry-pick root commit" codepath
From: Jonathan Nieder @ 2011-08-16 18:16 UTC (permalink / raw)
To: Junio C Hamano
Cc: Ramkumar Ramachandra, Git List, Christian Couder, Daniel Barkalow,
Jeff King
In-Reply-To: <7v39h1i6rr.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Thanks for noticing, but shouldn't we be just using
>
> lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN)
>
> or something, instead of hand-crafting a fake tree object?
Yes. Ever since v1.5.5-rc0~180^2~1 (hard-code the empty tree object,
2008-02-13), there is no need to call pretend_sha1_file() again to
get a fake empty tree object, so this lookup_tree() should work
fine.
-- >8 --
Subject: revert: plug memory leak in "cherry-pick root commit" codepath
For each parentless commit it is asked to reuse, "git cherry-pick" and
"git revert" hand-craft a fake parent tree object on the heap to pass
to merge_trees(). Leaking such a small one-time allocation would not
be a big deal, but now that cherry-pick/revert can take multiple
commit arguments, it can start to add up.
The fix is simple: don't create a new fake empty tree at all, but rely
on the built-in one that has existed since 346245a1 (hard-code the
empty tree object, 2008-02-13).
While at it, add a test to make sure cherry-picking multiple
parentless commits continues to work.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
---
builtin/revert.c | 7 +------
t/t3503-cherry-pick-root.sh | 27 ++++++++++++++++++++++++++-
2 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/builtin/revert.c b/builtin/revert.c
index 853e9e40..a26a7c93 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -273,12 +273,7 @@ static void write_message(struct strbuf *msgbuf, const char *filename)
static struct tree *empty_tree(void)
{
- struct tree *tree = xcalloc(1, sizeof(struct tree));
-
- tree->object.parsed = 1;
- tree->object.type = OBJ_TREE;
- pretend_sha1_file(NULL, 0, OBJ_TREE, tree->object.sha1);
- return tree;
+ return lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN);
}
static NORETURN void die_dirty_index(const char *me)
diff --git a/t/t3503-cherry-pick-root.sh b/t/t3503-cherry-pick-root.sh
index b0faa299..472e5b80 100755
--- a/t/t3503-cherry-pick-root.sh
+++ b/t/t3503-cherry-pick-root.sh
@@ -16,15 +16,40 @@ test_expect_success setup '
echo second > file2 &&
git add file2 &&
test_tick &&
- git commit -m "second"
+ git commit -m "second" &&
+
+ git symbolic-ref HEAD refs/heads/third &&
+ rm .git/index file2 &&
+ echo third > file3 &&
+ git add file3 &&
+ test_tick &&
+ git commit -m "third"
'
test_expect_success 'cherry-pick a root commit' '
+ git checkout second^0 &&
git cherry-pick master &&
test first = $(cat file1)
'
+test_expect_success 'cherry-pick two root commits' '
+
+ echo first >expect.file1 &&
+ echo second >expect.file2 &&
+ echo third >expect.file3 &&
+
+ git checkout second^0 &&
+ git cherry-pick master third &&
+
+ test_cmp expect.file1 file1 &&
+ test_cmp expect.file2 file2 &&
+ test_cmp expect.file3 file3 &&
+ git rev-parse --verify HEAD^^ &&
+ test_must_fail git rev-parse --verify HEAD^^^
+
+'
+
test_done
--
1.7.6
^ permalink raw reply related
* Re: [PATCH v2] revert: plug memory leak in "cherry-pick root commit" codepath
From: Jonathan Nieder @ 2011-08-16 18:27 UTC (permalink / raw)
To: Junio C Hamano
Cc: Ramkumar Ramachandra, Git List, Christian Couder, Daniel Barkalow,
Jeff King
In-Reply-To: <20110816181633.GB10336@elie.gateway.2wire.net>
Jonathan Nieder wrote:
> Junio C Hamano wrote:
>> Thanks for noticing, but shouldn't we be just using
>>
>> lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN)
>>
>> or something, instead of hand-crafting a fake tree object?
>
> Yes.
And here's another patch in the same spirit (no test this time,
though).
-- >8 --
Subject: merge-recursive: take advantage of hardcoded empty tree
When this code was first written (v1.4.3-rc1~174^2~4, merge-recur: if
there is no common ancestor, fake empty one, 2006-08-09), everyone
needing a fake empty tree had to make her own, but ever since
v1.5.5-rc0~180^2~1 (2008-02-13), the object lookup machinery provides
a ready-made one. Use it.
This is just a simplification, though it also fixes a small leak
(since the tree in the virtual common ancestor commit is never freed).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
merge-recursive.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 206c1036..7695fe89 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1309,12 +1309,10 @@ int merge_recursive(struct merge_options *o,
merged_common_ancestors = pop_commit(&ca);
if (merged_common_ancestors == NULL) {
- /* if there is no common ancestor, make an empty tree */
- struct tree *tree = xcalloc(1, sizeof(struct tree));
+ /* if there is no common ancestor, use an empty tree */
+ struct tree *tree;
- tree->object.parsed = 1;
- tree->object.type = OBJ_TREE;
- pretend_sha1_file(NULL, 0, OBJ_TREE, tree->object.sha1);
+ tree = lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN);
merged_common_ancestors = make_virtual_commit(tree, "ancestor");
}
--
1.7.6
^ permalink raw reply related
* Re: [PATCH v2] revert: plug memory leak in "cherry-pick root commit" codepath
From: Jeff King @ 2011-08-16 18:31 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Junio C Hamano, Ramkumar Ramachandra, Git List, Christian Couder,
Daniel Barkalow
In-Reply-To: <20110816181633.GB10336@elie.gateway.2wire.net>
On Tue, Aug 16, 2011 at 01:16:33PM -0500, Jonathan Nieder wrote:
> static struct tree *empty_tree(void)
> {
> - struct tree *tree = xcalloc(1, sizeof(struct tree));
> -
> - tree->object.parsed = 1;
> - tree->object.type = OBJ_TREE;
> - pretend_sha1_file(NULL, 0, OBJ_TREE, tree->object.sha1);
> - return tree;
> + return lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN);
> }
Much nicer. But doesn't your dab0d41 (correct type of
EMPTY_TREE_SHA1_BIN, 2011-02-07) make the cast unnecessary?
-Peff
^ permalink raw reply
* [PATCH/RFC] gitweb: highlight: strip non-printable characters via col(1)
From: Christopher M. Fuhrman @ 2011-08-16 18:16 UTC (permalink / raw)
To: git; +Cc: jnareb, cwilson, sylvain, Christopher M. Fuhrman
From: "Christopher M. Fuhrman" <cfuhrman@panix.com>
The current code, as is, passes control characters, such as form-feed
(^L) to highlight which then passes it through to the browser. This
will cause the browser to display one of the following warnings:
Safari v5.1 (6534.50) & Google Chrome v13.0.782.112:
This page contains the following errors:
error on line 657 at column 38: PCDATA invalid Char value 12
Below is a rendering of the page up to the first error.
Mozilla Firefox 3.6.19 & Mozilla Firefox 5.0:
XML Parsing Error: not well-formed
Location:
http://path/to/git/repo/blah/blah
Both errors were generated by gitweb.perl v1.7.3.4 w/ highlight 2.7
using arch/ia64/kernel/unwind.c from the Linux kernel.
Strip non-printable control-characters by piping the output produced
by git-cat-file(1) to col(1) as follows:
git cat-file blob deadbeef314159 | col -bx | highlight <args>
Tested under OpenSuSE 11.4 & NetBSD 5.1 using perl 5.12.3 and perl
5.12.2 respectively using Safari, Firefox, and Google Chrome.
Signed-off-by: Christopher M. Fuhrman <cfuhrman@panix.com>
---
For an example of this bug in action, see:
*
http://git.fuhrbear.com/~cfuhrman/?p=linux/.git;a=blob;f=arch/alpha/kernel/core_titan.c;h=219bf271c0ba2e5f2d668af707df57fbbd00ccfd;hb=HEAD
*
http://git.fuhrbear.com/~cfuhrman/?p=linux/.git;a=blob;f=arch/ia64/kernel/unwind.c;h=fed6afa2e8a9014e65229e51e64fa4b1c13cc284;hb=HEAD
WRT the col(1) command, I've verified that the binary is installed in
/usr/bin on OpenSuSE, NetBSD, OpenBSD, Solaris 10, and AIX. This
patch assumes that /usr/bin is in $PATH.
Cheers!
gitweb/gitweb.perl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 81dacf2..38d5d4e 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3656,6 +3656,7 @@ sub run_highlighter {
close $fd;
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
+ "col -bx | ".
quote_command($highlight_bin).
" --replace-tabs=8 --fragment --syntax $syntax |"
or die_error(500, "Couldn't open file or run syntax highlighter");
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH v2] revert: plug memory leak in "cherry-pick root commit" codepath
From: Jonathan Nieder @ 2011-08-16 18:56 UTC (permalink / raw)
To: Jeff King
Cc: Junio C Hamano, Ramkumar Ramachandra, Git List, Christian Couder,
Daniel Barkalow
In-Reply-To: <20110816183147.GA10117@sigill.intra.peff.net>
Jeff King wrote:
> On Tue, Aug 16, 2011 at 01:16:33PM -0500, Jonathan Nieder wrote:
>> static struct tree *empty_tree(void)
>> {
>> - struct tree *tree = xcalloc(1, sizeof(struct tree));
>> -
>> - tree->object.parsed = 1;
>> - tree->object.type = OBJ_TREE;
>> - pretend_sha1_file(NULL, 0, OBJ_TREE, tree->object.sha1);
>> - return tree;
>> + return lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN);
>> }
>
> Much nicer. But doesn't your dab0d41 (correct type of
> EMPTY_TREE_SHA1_BIN, 2011-02-07) make the cast unnecessary?
Yes, I was working against an older codebase (for no particular
reason).
^ permalink raw reply
* [PATCH v5 0/2] submodule: move gitdir into superproject
From: Fredrik Gustafsson @ 2011-08-16 19:32 UTC (permalink / raw)
To: git; +Cc: jens.lehmann, iveqy, hvoigt, gitster
Move git-dir for submodules into $GIT_DIR/modules/[name_of_submodule] of
the superproject. This is a step towards being able to delete submodule
directories without loosing the information from their .git directory
as that is now stored outside the submodules work tree.
This is done relying on the already existent .git-file functionality.
Tests that rely on .git being a directory have been fixed.
This is the forth iteration of this patchseries. The only change since last
iteration is the removal of a test of the return value of module_name in
git-submodule.sh, as suggested by Junio.
The first can be found here:
http://thread.gmane.org/gmane.comp.version-control.git/177582
The second can be found here:
http://thread.gmane.org/gmane.comp.version-control.git/178970/focus=179153
The third can be found here:
http://thread.gmane.org/gmane.comp.version-control.git/179243/focus=179244
The fourth can be found here:
http://thread.gmane.org/gmane.comp.version-control.git/179388/focus=179390
Fredrik Gustafsson (2):
rev-parse: add option --resolve-git-dir <path>
Move git-dir for submodules
Documentation/git-rev-parse.txt | 4 ++
builtin/rev-parse.c | 8 +++
cache.h | 1 +
git-submodule.sh | 45 ++++++++++++++--
setup.c | 7 +++
t/t7400-submodule-basic.sh | 4 +-
t/t7403-submodule-sync.sh | 5 +-
t/t7406-submodule-update.sh | 107 +++++++++++++++++++++++++++++++++++++++
t/t7407-submodule-foreach.sh | 103 +++++++++++++++++++------------------
t/t7408-submodule-reference.sh | 4 +-
10 files changed, 227 insertions(+), 61 deletions(-)
--
1.7.6.398.g43b167
^ permalink raw reply
* [PATCH v5 1/2] rev-parse: add option --resolve-git-dir <path>
From: Fredrik Gustafsson @ 2011-08-16 19:32 UTC (permalink / raw)
To: git; +Cc: jens.lehmann, iveqy, hvoigt, gitster
In-Reply-To: <1313523139-23244-1-git-send-email-iveqy@iveqy.com>
Check if <path> is a valid git-dir or a valid git-file that points
to a valid git-dir.
We want tests to be independent from the fact that a git-dir may
be a git-file. Thus we changed tests to use this feature.
Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
---
Documentation/git-rev-parse.txt | 4 ++
builtin/rev-parse.c | 8 +++
cache.h | 1 +
setup.c | 7 +++
t/t7400-submodule-basic.sh | 4 +-
t/t7403-submodule-sync.sh | 5 +-
t/t7407-submodule-foreach.sh | 103 ++++++++++++++++++++-------------------
7 files changed, 78 insertions(+), 54 deletions(-)
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 42c9676..8023dc0 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -180,6 +180,10 @@ print a message to stderr and exit with nonzero status.
<args>...::
Flags and parameters to be parsed.
+--resolve-git-dir <path>::
+ Check if <path> is a valid git-dir or a git-file pointing to a valid
+ git-dir. If <path> is a valid git-dir the resolved path to git-dir will
+ be printed.
include::revisions.txt[]
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 4c19f84..98d1cbe 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -468,6 +468,14 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
return 0;
}
+ if (argc > 2 && !strcmp(argv[1], "--resolve-git-dir")) {
+ const char *gitdir = resolve_gitdir(argv[2]);
+ if (!gitdir)
+ die("not a gitdir '%s'", argv[2]);
+ puts(gitdir);
+ return 0;
+ }
+
if (argc > 1 && !strcmp("-h", argv[1]))
usage(builtin_rev_parse_usage);
diff --git a/cache.h b/cache.h
index 9e12d55..550f632 100644
--- a/cache.h
+++ b/cache.h
@@ -436,6 +436,7 @@ extern char *get_graft_file(void);
extern int set_git_dir(const char *path);
extern const char *get_git_work_tree(void);
extern const char *read_gitfile_gently(const char *path);
+extern const char *resolve_gitdir(const char *suspect);
extern void set_git_work_tree(const char *tree);
#define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES"
diff --git a/setup.c b/setup.c
index 5ea5502..efad002 100644
--- a/setup.c
+++ b/setup.c
@@ -808,3 +808,10 @@ const char *setup_git_directory(void)
{
return setup_git_directory_gently(NULL);
}
+
+const char *resolve_gitdir(const char *suspect)
+{
+ if (is_git_directory(suspect))
+ return suspect;
+ return read_gitfile_gently(suspect);
+}
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 14dc927..270a7d5 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -360,10 +360,10 @@ test_expect_success 'update --init' '
git submodule update init > update.out &&
cat update.out &&
test_i18ngrep "not initialized" update.out &&
- ! test -d init/.git &&
+ test_must_fail git rev-parse --resolve-git-dir init/.git &&
git submodule update --init init &&
- test -d init/.git
+ git rev-parse --resolve-git-dir init/.git
'
test_expect_success 'do not add files from a submodule' '
diff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh
index 95ffe34..3620215 100755
--- a/t/t7403-submodule-sync.sh
+++ b/t/t7403-submodule-sync.sh
@@ -56,8 +56,9 @@ test_expect_success '"git submodule sync" should update submodule URLs' '
git pull --no-recurse-submodules &&
git submodule sync
) &&
- test -d "$(git config -f super-clone/submodule/.git/config \
- remote.origin.url)" &&
+ test -d "$(cd super-clone/submodule &&
+ git config remote.origin.url
+ )" &&
(cd super-clone/submodule &&
git checkout master &&
git pull
diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
index be745fb..9b69fe2 100755
--- a/t/t7407-submodule-foreach.sh
+++ b/t/t7407-submodule-foreach.sh
@@ -118,19 +118,19 @@ test_expect_success 'use "submodule foreach" to checkout 2nd level submodule' '
git clone super clone2 &&
(
cd clone2 &&
- test ! -d sub1/.git &&
- test ! -d sub2/.git &&
- test ! -d sub3/.git &&
- test ! -d nested1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
+ test_must_fail git rev-parse --resolve-git-dir nested1/.git &&
git submodule update --init &&
- test -d sub1/.git &&
- test -d sub2/.git &&
- test -d sub3/.git &&
- test -d nested1/.git &&
- test ! -d nested1/nested2/.git &&
+ git rev-parse --resolve-git-dir sub1/.git &&
+ git rev-parse --resolve-git-dir sub2/.git &&
+ git rev-parse --resolve-git-dir sub3/.git &&
+ git rev-parse --resolve-git-dir nested1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir nested1/nested2/.git &&
git submodule foreach "git submodule update --init" &&
- test -d nested1/nested2/.git &&
- test ! -d nested1/nested2/nested3/.git
+ git rev-parse --resolve-git-dir nested1/nested1/nested2/.git
+ test_must_fail git rev-parse --resolve-git-dir nested1/nested2/nested3/.git
)
'
@@ -138,8 +138,8 @@ test_expect_success 'use "foreach --recursive" to checkout all submodules' '
(
cd clone2 &&
git submodule foreach --recursive "git submodule update --init" &&
- test -d nested1/nested2/nested3/.git &&
- test -d nested1/nested2/nested3/submodule/.git
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
'
@@ -183,18 +183,18 @@ test_expect_success 'use "update --recursive" to checkout all submodules' '
git clone super clone3 &&
(
cd clone3 &&
- test ! -d sub1/.git &&
- test ! -d sub2/.git &&
- test ! -d sub3/.git &&
- test ! -d nested1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
+ test_must_fail git rev-parse --resolve-git-dir nested1/.git &&
git submodule update --init --recursive &&
- test -d sub1/.git &&
- test -d sub2/.git &&
- test -d sub3/.git &&
- test -d nested1/.git &&
- test -d nested1/nested2/.git &&
- test -d nested1/nested2/nested3/.git &&
- test -d nested1/nested2/nested3/submodule/.git
+ git rev-parse --resolve-git-dir sub1/.git &&
+ git rev-parse --resolve-git-dir sub2/.git &&
+ git rev-parse --resolve-git-dir sub3/.git &&
+ git rev-parse --resolve-git-dir nested1/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
'
@@ -247,14 +247,17 @@ test_expect_success 'ensure "status --cached --recursive" preserves the --cached
test_expect_success 'use "git clone --recursive" to checkout all submodules' '
git clone --recursive super clone4 &&
- test -d clone4/.git &&
- test -d clone4/sub1/.git &&
- test -d clone4/sub2/.git &&
- test -d clone4/sub3/.git &&
- test -d clone4/nested1/.git &&
- test -d clone4/nested1/nested2/.git &&
- test -d clone4/nested1/nested2/nested3/.git &&
- test -d clone4/nested1/nested2/nested3/submodule/.git
+ (
+ cd clone4 &&
+ git rev-parse --resolve-git-dir .git &&
+ git rev-parse --resolve-git-dir sub1/.git &&
+ git rev-parse --resolve-git-dir sub2/.git &&
+ git rev-parse --resolve-git-dir sub3/.git &&
+ git rev-parse --resolve-git-dir nested1/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
+ )
'
test_expect_success 'test "update --recursive" with a flag with spaces' '
@@ -262,14 +265,14 @@ test_expect_success 'test "update --recursive" with a flag with spaces' '
git clone super clone5 &&
(
cd clone5 &&
- test ! -d nested1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir d nested1/.git &&
git submodule update --init --recursive --reference="$(dirname "$PWD")/common objects" &&
- test -d nested1/.git &&
- test -d nested1/nested2/.git &&
- test -d nested1/nested2/nested3/.git &&
- test -f nested1/.git/objects/info/alternates &&
- test -f nested1/nested2/.git/objects/info/alternates &&
- test -f nested1/nested2/nested3/.git/objects/info/alternates
+ git rev-parse --resolve-git-dir nested1/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
+ test -f .git/modules/nested1/objects/info/alternates &&
+ test -f .git/modules/nested1/modules/nested2/objects/info/alternates &&
+ test -f .git/modules/nested1/modules/nested2/modules/nested3/objects/info/alternates
)
'
@@ -277,18 +280,18 @@ test_expect_success 'use "update --recursive nested1" to checkout all submodules
git clone super clone6 &&
(
cd clone6 &&
- test ! -d sub1/.git &&
- test ! -d sub2/.git &&
- test ! -d sub3/.git &&
- test ! -d nested1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
+ test_must_fail git rev-parse --resolve-git-dir nested1/.git &&
git submodule update --init --recursive -- nested1 &&
- test ! -d sub1/.git &&
- test ! -d sub2/.git &&
- test ! -d sub3/.git &&
- test -d nested1/.git &&
- test -d nested1/nested2/.git &&
- test -d nested1/nested2/nested3/.git &&
- test -d nested1/nested2/nested3/submodule/.git
+ test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
+ test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
+ git rev-parse --resolve-git-dir nested1/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
+ git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
'
--
1.7.6.398.g43b167
^ permalink raw reply related
* [PATCH v5 2/2] Move git-dir for submodules
From: Fredrik Gustafsson @ 2011-08-16 19:32 UTC (permalink / raw)
To: git; +Cc: jens.lehmann, iveqy, hvoigt, gitster
In-Reply-To: <1313523139-23244-1-git-send-email-iveqy@iveqy.com>
Move git-dir for submodules into $GIT_DIR/modules/[name_of_submodule] of
the superproject. This is a step towards being able to delete submodule
directories without loosing the information from their .git directory
as that is now stored outside the submodules work tree.
This is done relying on the already existent .git-file functionality.
When adding or updating a submodule whose git directory is found under
$GIT_DIR/modules/[name_of_submodule], don't clone it again but simply
point the .git-file to it and remove the now stale index file from it.
The index will be recreated by the following checkout.
This patch will not affect already cloned submodules at all.
Tests that rely on .git being a directory have been fixed.
Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
---
git-submodule.sh | 45 +++++++++++++++--
t/t7406-submodule-update.sh | 107 ++++++++++++++++++++++++++++++++++++++++
t/t7408-submodule-reference.sh | 4 +-
3 files changed, 149 insertions(+), 7 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index bc1d3fa..7576d14 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -122,14 +122,49 @@ module_clone()
path=$1
url=$2
reference="$3"
+ gitdir=
+ gitdir_base=
+ name=$(module_name "$path")
+ base_path=$(dirname "$path")
- if test -n "$reference"
+ gitdir=$(git rev-parse --git-dir)
+ gitdir_base="$gitdir/modules/$base_path"
+ gitdir="$gitdir/modules/$path"
+
+ case $gitdir in
+ /*)
+ a="$(cd_to_toplevel && pwd)/"
+ b=$gitdir
+ while [ "$b" ] && [ "${a%%/*}" = "${b%%/*}" ]
+ do
+ a=${a#*/} b=${b#*/};
+ done
+
+ rel="$a$name"
+ rel=`echo $rel | sed -e 's|[^/]*|..|g'`
+ rel_gitdir="$rel/$b"
+ ;;
+ *)
+ rel=`echo $name | sed -e 's|[^/]*|..|g'`
+ rel_gitdir="$rel/$gitdir"
+ ;;
+ esac
+
+ if test -d "$gitdir"
then
- git-clone "$reference" -n "$url" "$path"
+ mkdir -p "$path"
+ echo "gitdir: $rel_gitdir" >"$path/.git"
+ rm -f "$gitdir/index"
else
- git-clone -n "$url" "$path"
- fi ||
- die "$(eval_gettext "Clone of '\$url' into submodule path '\$path' failed")"
+ mkdir -p "$gitdir_base"
+ if test -n "$reference"
+ then
+ git-clone "$reference" -n "$url" "$path" --separate-git-dir "$gitdir"
+ else
+ git-clone -n "$url" "$path" --separate-git-dir "$gitdir"
+ fi ||
+ die "$(eval_gettext "Clone of '\$url' into submodule path '\$path' failed")"
+ fi
}
#
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index c679f36..1ae6b4e 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -408,6 +408,7 @@ test_expect_success 'submodule update exit immediately in case of merge conflict
test_cmp expect actual
)
'
+
test_expect_success 'submodule update exit immediately after recursive rebase error' '
(cd super &&
git checkout master &&
@@ -442,4 +443,110 @@ test_expect_success 'submodule update exit immediately after recursive rebase er
test_cmp expect actual
)
'
+
+test_expect_success 'add different submodules to the same path' '
+ (cd super &&
+ git submodule add ../submodule s1 &&
+ test_must_fail git submodule add ../merging s1
+ )
+'
+
+test_expect_success 'submodule add places git-dir in superprojects git-dir' '
+ (cd super &&
+ mkdir deeper &&
+ git submodule add ../submodule deeper/submodule &&
+ (cd deeper/submodule &&
+ git log > ../../expected
+ ) &&
+ (cd .git/modules/deeper/submodule &&
+ git log > ../../../../actual
+ ) &&
+ test_cmp actual expected
+ )
+'
+
+test_expect_success 'submodule update places git-dir in superprojects git-dir' '
+ (cd super &&
+ git commit -m "added submodule"
+ ) &&
+ git clone super super2 &&
+ (cd super2 &&
+ git submodule init deeper/submodule &&
+ git submodule update &&
+ (cd deeper/submodule &&
+ git log > ../../expected
+ ) &&
+ (cd .git/modules/deeper/submodule &&
+ git log > ../../../../actual
+ ) &&
+ test_cmp actual expected
+ )
+'
+
+test_expect_success 'submodule add places git-dir in superprojects git-dir recursive' '
+ (cd super2 &&
+ (cd deeper/submodule &&
+ git submodule add ../submodule subsubmodule &&
+ (cd subsubmodule &&
+ git log > ../../../expected
+ ) &&
+ git commit -m "added subsubmodule" &&
+ git push
+ ) &&
+ (cd .git/modules/deeper/submodule/modules/subsubmodule &&
+ git log > ../../../../../actual
+ ) &&
+ git add deeper/submodule &&
+ git commit -m "update submodule" &&
+ git push &&
+ test_cmp actual expected
+ )
+'
+
+test_expect_success 'submodule update places git-dir in superprojects git-dir recursive' '
+ mkdir super_update_r &&
+ (cd super_update_r &&
+ git init --bare
+ ) &&
+ mkdir subsuper_update_r &&
+ (cd subsuper_update_r &&
+ git init --bare
+ ) &&
+ mkdir subsubsuper_update_r &&
+ (cd subsubsuper_update_r &&
+ git init --bare
+ ) &&
+ git clone subsubsuper_update_r subsubsuper_update_r2 &&
+ (cd subsubsuper_update_r2 &&
+ test_commit "update_subsubsuper" file &&
+ git push origin master
+ ) &&
+ git clone subsuper_update_r subsuper_update_r2 &&
+ (cd subsuper_update_r2 &&
+ test_commit "update_subsuper" file &&
+ git submodule add ../subsubsuper_update_r subsubmodule &&
+ git commit -am "subsubmodule" &&
+ git push origin master
+ ) &&
+ git clone super_update_r super_update_r2 &&
+ (cd super_update_r2 &&
+ test_commit "update_super" file &&
+ git submodule add ../subsuper_update_r submodule &&
+ git commit -am "submodule" &&
+ git push origin master
+ ) &&
+ rm -rf super_update_r2 &&
+ git clone super_update_r super_update_r2 &&
+ (cd super_update_r2 &&
+ git submodule update --init --recursive &&
+ (cd submodule/subsubmodule &&
+ git log > ../../expected
+ ) &&
+ (cd .git/modules/submodule/modules/subsubmodule
+ git log > ../../../../../actual
+ )
+ test_cmp actual expected
+ )
+'
+
test_done
diff --git a/t/t7408-submodule-reference.sh b/t/t7408-submodule-reference.sh
index cc16d3f..ab37c36 100755
--- a/t/t7408-submodule-reference.sh
+++ b/t/t7408-submodule-reference.sh
@@ -43,7 +43,7 @@ git commit -m B-super-added'
cd "$base_dir"
test_expect_success 'after add: existence of info/alternates' \
-'test `wc -l <super/sub/.git/objects/info/alternates` = 1'
+'test `wc -l <super/.git/modules/sub/objects/info/alternates` = 1'
cd "$base_dir"
@@ -66,7 +66,7 @@ test_expect_success 'update with reference' \
cd "$base_dir"
test_expect_success 'after update: existence of info/alternates' \
-'test `wc -l <super-clone/sub/.git/objects/info/alternates` = 1'
+'test `wc -l <super-clone/.git/modules/sub/objects/info/alternates` = 1'
cd "$base_dir"
--
1.7.6.398.g43b167
^ permalink raw reply related
* Re: "git apply --check" successes but git am says "does not match index"
From: Junio C Hamano @ 2011-08-16 19:50 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, Zemacsh, git
In-Reply-To: <20110816001306.GA23695@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Subject: [PATCH] am: refresh the index at start and --resolved
Thanks; applied.
^ permalink raw reply
* Двери для офиса и квартиры дешево 740-90-44 в 495
From: Aafgd @ 2011-08-17 7:52 UTC (permalink / raw)
To: git, git
Позвони двери
5 0 ниже рыночной цены
4 95 74-09022
http://clck.ru/ImPi
^ permalink raw reply
* Re: [PATCH] update-index: add --swap to swap index and worktree content
From: Junio C Hamano @ 2011-08-16 20:01 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1313158058-7684-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> What I want is a quick way to modify index content without changing
> worktree, then I can continue adding more hunks to the index.
Why would you even want to do that?
Suppose you want to update hello.c in the index but not in the working
tree for whatever reason I do not understand. Presumably you would with
this patch do this:
edit hello.c
git update-index --swap hello.c
assuming that the state of hello.c _before_ the edit was pristine. But
then after that what would you do? Probably you would commit that
untested change, and rebase-i to clean them up later, which is fine.
BUT
After swapping, the file in the working tree lacks the change you made to
the index, so if you keep working on it after the above "swap" in your
editor, the next "git add" will revert whatever you did with the first
"edit".
I think that makes it too error prone and difficult to understand for both
new and experienced people.
Whatever the expected use case is, it needs to be explained a lot better.
^ permalink raw reply
* Re: [PATCH/RFC] gitweb: highlight: strip non-printable characters via col(1)
From: J.H. @ 2011-08-16 20:30 UTC (permalink / raw)
To: Christopher M. Fuhrman; +Cc: git, jnareb, cwilson, sylvain
In-Reply-To: <1313518605-26460-1-git-send-email-cfuhrman@panix.com>
On 08/16/2011 11:16 AM, Christopher M. Fuhrman wrote:
> From: "Christopher M. Fuhrman" <cfuhrman@panix.com>
>
> The current code, as is, passes control characters, such as form-feed
> (^L) to highlight which then passes it through to the browser. This
> will cause the browser to display one of the following warnings:
>
> Safari v5.1 (6534.50) & Google Chrome v13.0.782.112:
>
> This page contains the following errors:
>
> error on line 657 at column 38: PCDATA invalid Char value 12
> Below is a rendering of the page up to the first error.
>
> Mozilla Firefox 3.6.19 & Mozilla Firefox 5.0:
>
> XML Parsing Error: not well-formed
> Location:
> http://path/to/git/repo/blah/blah
>
> Both errors were generated by gitweb.perl v1.7.3.4 w/ highlight 2.7
> using arch/ia64/kernel/unwind.c from the Linux kernel.
>
> Strip non-printable control-characters by piping the output produced
> by git-cat-file(1) to col(1) as follows:
>
> git cat-file blob deadbeef314159 | col -bx | highlight <args>
So my only real concern here is that `col` itself is going to munge
whitespace. Quoting from the col man page:
[...] and replaces white-space characters with tabs where
possible. [...]
Have you actually run into a situation where something like ^L was
present in a blob that was being passed to highlight?
- John
^ permalink raw reply
* Re: [PATCH] update-index: add --swap to swap index and worktree content
From: Jeff King @ 2011-08-16 21:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nguyễn Thái Ngọc Duy, git
In-Reply-To: <7vippxgm6y.fsf@alter.siamese.dyndns.org>
On Tue, Aug 16, 2011 at 01:01:41PM -0700, Junio C Hamano wrote:
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
> > What I want is a quick way to modify index content without changing
> > worktree, then I can continue adding more hunks to the index.
>
> Why would you even want to do that?
>
> Suppose you want to update hello.c in the index but not in the working
> tree for whatever reason I do not understand. Presumably you would with
> this patch do this:
>
> edit hello.c
> git update-index --swap hello.c
>
> assuming that the state of hello.c _before_ the edit was pristine. But
> then after that what would you do? Probably you would commit that
> untested change, and rebase-i to clean them up later, which is fine.
I suspect (or at least, this is how I would use it) it is more about
having some changes in the index and some changes in the working tree,
but realizing that what's in the index needs tweaked. Something like:
# add some content with an error
echo 'printf("hello word!\n")' >hello.c
git add hello.c
# work on it more, realizing the error
echo 'printf("goodbye world!\n") >hello.c
# now what? you want to stage the s/word/world/ fixup,
# but you want to keep the hello/goodbye thing as a separate change.
# Using anything line-based is going to conflate the two.
# The change is simple, though, so you can just as easily edit the
# index file, if only you could get to it. So you do:
git update-index --swap hello.c
sed -i s/word/world/ hello.c
git update-index --swap hello.c
So the swap really functions as a toggle of "I would like to work on
the index version for a minute", and then you toggle back when you're
done.
I can think of two ways to do the same thing that are a little less
confusing or error-prone, though:
1. A command to dump the index version to a tempfile, run $EDITOR on
it, and then read it back in. Technically this restricts you to
using $EDITOR to make the changes, but in practice that is probably
fine.
2. You can dump the file to a pipe yourself, but getting it back into
the index is a little bit awkward. You have to do something like:
blob=`git cat-file blob :hello.c |
sed 's/word/world/ |
git hash-object --stdin -w`
mode=`git ls-files -s hello.c | cut -d' ' -f1`
git update-index --cacheinfo $mode $blob hello.c
it would be much nicer if this was:
git cat-file blob :hello.c |
sed 's/word/world/ |
git add --stdin-contents hello.c
However, I expect this sort of piping is the minority case, and
most people would be happy with (1).
-Peff
^ permalink raw reply
* Re: [PATCH/RFC] gitweb: highlight: strip non-printable characters via col(1)
From: Christopher M. Fuhrman @ 2011-08-16 21:32 UTC (permalink / raw)
To: J.H.; +Cc: git, jnareb, cwilson, sylvain
In-Reply-To: <4E4AD35E.8060907@eaglescrag.net>
On Tue, 16 Aug 2011 at 1:30pm, J.H. wrote:
> On 08/16/2011 11:16 AM, Christopher M. Fuhrman wrote:
> > From: "Christopher M. Fuhrman" <cfuhrman@panix.com>
> >
> > The current code, as is, passes control characters, such as form-feed
> > (^L) to highlight which then passes it through to the browser. This
> > will cause the browser to display one of the following warnings:
> >
<snip>
> > Strip non-printable control-characters by piping the output produced
> > by git-cat-file(1) to col(1) as follows:
> >
> > git cat-file blob deadbeef314159 | col -bx | highlight <args>
>
> So my only real concern here is that `col` itself is going to munge
> whitespace. Quoting from the col man page:
>
> [...] and replaces white-space characters with tabs where
> possible. [...]
I figured that would be a concern which is why I added the -x option.
From the col(1) man page:
-x Output multiple spaces instead of tabs.
I also took a diff between two XHTML files. One that used col -bx and one
that didn't. Here's the results:
--- withoutcol.xhtml 2011-08-16 14:11:39.000000000 -0700
+++ withcol.xhtml 2011-08-16 14:11:26.000000000 -0700
@@ -52,7 +52,7 @@
<span class="hl dir"># define DBG_CFG(args)</span>
<span class="hl dir">#endif</span>
-
+
<span class="hl com">/*</span>
<span class="hl com"> * Routines to access TIG registers.</span>
<span class="hl com"> */</span>
@@ -76,7 +76,7 @@
<span class="hl sym">*</span>tig_addr <span class="hl sym">= (</span><span class="hl kwb">unsigned long</span><span class="hl sym">)</span>value<span class="hl sym">;</span>
<span class="hl sym">}</span>
-
+
<span class="hl com">/*</span>
<span class="hl com"> * Given a bus, device, and function number, compute resulting</span>
<span class="hl com"> * configuration space address</span>
@@ -197,7 +197,7 @@
<span class="hl sym">.</span>write <span class="hl sym">=</span> titan_write_config<span class="hl sym">,</span>
<span class="hl sym">};</span>
(remainder stripped)
>
> Have you actually run into a situation where something like ^L was
> present in a blob that was being passed to highlight?
>
I've seen ^L is the Linux kernel source tree as well as the NetBSD src
tree. I've not encountered it elsewhere although I would think it would
be present depending on personal/corporate coding preferences.
> - John
Cheers!
--
Chris Fuhrman
cfuhrman@panix.com
^ permalink raw reply
* Re: [PATCH] update-index: add --swap to swap index and worktree content
From: Junio C Hamano @ 2011-08-16 21:56 UTC (permalink / raw)
To: Jeff King; +Cc: Nguyễn Thái Ngọc Duy, git
In-Reply-To: <20110816210108.GA13710@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> # add some content with an error
> echo 'printf("hello word!\n")' >hello.c
> git add hello.c
>
> # work on it more, realizing the error
> echo 'printf("goodbye world!\n") >hello.c
>
> # now what? you want to stage the s/word/world/ fixup,
> # but you want to keep the hello/goodbye thing as a separate change.
> # Using anything line-based is going to conflate the two.
> # The change is simple, though, so you can just as easily edit the
> # index file, if only you could get to it. So you do:
> git update-index --swap hello.c
> sed -i s/word/world/ hello.c
> git update-index --swap hello.c
>
> So the swap really functions as a toggle of "I would like to work on
> the index version for a minute", and then you toggle back when you're
> done.
And you have to redo what you did to the index version in the working tree
after the second "swap", no?
^ permalink raw reply
* Re: [PATCH] update-index: add --swap to swap index and worktree content
From: Jeff King @ 2011-08-16 22:22 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nguyễn Thái Ngọc Duy, git
In-Reply-To: <7vbovpggva.fsf@alter.siamese.dyndns.org>
On Tue, Aug 16, 2011 at 02:56:41PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > # add some content with an error
> > echo 'printf("hello word!\n")' >hello.c
> > git add hello.c
> >
> > # work on it more, realizing the error
> > echo 'printf("goodbye world!\n") >hello.c
> >
> > # now what? you want to stage the s/word/world/ fixup,
> > # but you want to keep the hello/goodbye thing as a separate change.
> > # Using anything line-based is going to conflate the two.
> > # The change is simple, though, so you can just as easily edit the
> > # index file, if only you could get to it. So you do:
> > git update-index --swap hello.c
> > sed -i s/word/world/ hello.c
> > git update-index --swap hello.c
> >
> > So the swap really functions as a toggle of "I would like to work on
> > the index version for a minute", and then you toggle back when you're
> > done.
>
> And you have to redo what you did to the index version in the working tree
> after the second "swap", no?
No. The point is that I _already_ did it in the working tree version
while doing my s/hello/goodbye/ change (let's call this the "new
change"). And ideally I would just use "git add -p" to stage only the
s/word/world/ change (let's call this the "fixup"). But they're tangled
in a single hunk, and I need some way of splitting them.
You could also use "add -e" to solve this situation. In this case, you
end up removing the "new change" from the patch, leaving only the fixup.
In this toy case, it would be pretty easy. But in more complex cases,
the fixup is a one-liner, but the "new change" is many lines. So rather
than edit out the new changes, it is simpler to recreate the fixup on
top of the index version.
-Peff
^ permalink raw reply
* Re: [PATCH 6/6] Retain caches of submodule refs
From: Junio C Hamano @ 2011-08-16 22:45 UTC (permalink / raw)
To: Michael Haggerty; +Cc: git, Jeff King, Drew Northup, Jakub Narebski
In-Reply-To: <1313188589-2330-7-git-send-email-mhagger@alum.mit.edu>
All the changes except for this one made sense to me, but I am not sure
about this one. How often do we look into different submodule refs in the
same process over and over again?
^ permalink raw reply
* Re: rejecting patches that have an offset
From: Andreas Gruenbacher @ 2011-08-16 22:48 UTC (permalink / raw)
To: Eric Blake; +Cc: bug-patch-mXXj517/zsQ, Git Mailing List
In-Reply-To: <4E49A8EA.5020507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Eric,
On Mon, 2011-08-15 at 17:16 -0600, Eric Blake wrote:
> It would have saved me a lot of time if both 'patch' and 'git apply'
> could be taught a mode of operation where they explicitly reject a patch
> that cannot be applied without relying on an offset.
that sounds reasonable. Can you send a patch or at least add a bug on
Savannah?
> It might also be nice if patch could learn the algorithm that appears to
> match the git behavior, where when there are multiple points with
> identical context (viewing just the context in isolation), but where
> those locations differ in function location (as learned by the @@ header
> line in the patch file), then the preferred offset is the one in the
> named function, even if that is not the closes context match to the line
> number given in the patch file.
Sounds interesting; a patch for that would be great as well.
Thanks,
Andreas
^ permalink raw reply
* Re: [PATCH] Utilize config variable pager.stash in stash list command
From: Jeff King @ 2011-08-16 22:56 UTC (permalink / raw)
To: Ingo Brückl; +Cc: git
In-Reply-To: <4e4a4743.4e230d8a.bm000@wupperonline.de>
On Tue, Aug 16, 2011 at 12:10:45PM +0200, Ingo Brückl wrote:
> > http://thread.gmane.org/gmane.comp.version-control.git/161756/focus=161771
>
> Actually, I only wanted to change the stash list behavior (but better should
> have used $(git config --get pager.stash.list) for that). Unfortunately, it
> is impossible then to force the pager with --paginate again.
>
> > I think what it really needs is more testing to see if looking at the
> > config then has any unintended side effects.
>
> Yours surely is a far better approach, although it only can handle the main
> command (stash), not the sub-command (list), but this is totally in
> accordance with everything else in git.
Yeah, that is a general problem with git's pager handling. We only have
one context: a single git command. But some commands may have multiple
subcommands, and a pager only makes sense for some of them.
You've run into it for "stash show", but it is no different than
something like "git branch". You might want the list of branches to go
through a pager, but almost certainly not branch creation or deletion
operations.
I think something like pager.stash.list is the right way forward. But
your patch by itself isn't enough. It only handles the negative case.
Setting "pager.stash.list" to "true" would do nothing.
> With "pager.stash false" (which would then require --paginate for a lot of
> stash commands), I found that a paginated output of 'git -p stash show -p'
> loses the diff colors, but that seems unrelated to your patch. It still is
> strange though.
We auto-detect whether to use colors based on whether we are outputting
to a terminal or not. If we start the pager ourselves, we will also
output colors (unless color.pager is false). I suspect the "pager in
use" flag is not making it to the external command.
-Peff
^ permalink raw reply
* Re: [PATCH] update-index: add --swap to swap index and worktree content
From: Junio C Hamano @ 2011-08-16 23:01 UTC (permalink / raw)
To: Jeff King; +Cc: Nguyễn Thái Ngọc Duy, git
In-Reply-To: <20110816222212.GA19471@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
>> > So the swap really functions as a toggle of "I would like to work on
>> > the index version for a minute", and then you toggle back when you're
>> > done.
>>
>> And you have to redo what you did to the index version in the working tree
>> after the second "swap", no?
>
> No. The point is that I _already_ did it in the working tree version
But that does not change that you have to do that twice. You may already
have done so in the working tree, and then redo it in the old indexed
version again.
> while doing my s/hello/goodbye/ change (let's call this the "new
> change"). And ideally I would just use "git add -p" to stage only the
> s/word/world/ change (let's call this the "fixup"). But they're tangled
> in a single hunk, and I need some way of splitting them.
As a way to punt from making "add -e" usable, I'd think it would be a
workable q&d workaround, even though it feels wrong, and I would imagine
that normal people would probably prefer the "check out to a temporary
file to be edited" solution you wrote in your previous message.
^ permalink raw reply
* Re: [PATCH] update-index: add --swap to swap index and worktree content
From: Jeff King @ 2011-08-16 23:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nguyễn Thái Ngọc Duy, git
In-Reply-To: <7vzkj9eza2.fsf@alter.siamese.dyndns.org>
On Tue, Aug 16, 2011 at 04:01:57PM -0700, Junio C Hamano wrote:
> > No. The point is that I _already_ did it in the working tree version
>
> But that does not change that you have to do that twice. You may already
> have done so in the working tree, and then redo it in the old indexed
> version again.
Right. The point is that the changes are tangled, to the point that it
is simpler to recreate them on one side than it is to instruct a tool
about how to untangle them. If they weren't tangled, then I would simply
make the change in the working tree, and then "add -p" it into the
index.
It's certainly not the dominant case. I'd say I run into it no more
frequently than once every week or so. I usually end up using "add -e"
to do what I want, but it's very error prone and annoying.
> > while doing my s/hello/goodbye/ change (let's call this the "new
> > change"). And ideally I would just use "git add -p" to stage only the
> > s/word/world/ change (let's call this the "fixup"). But they're tangled
> > in a single hunk, and I need some way of splitting them.
>
> As a way to punt from making "add -e" usable, I'd think it would be a
> workable q&d workaround, even though it feels wrong, and I would imagine
> that normal people would probably prefer the "check out to a temporary
> file to be edited" solution you wrote in your previous message.
Yeah, I think that is the sanest of the options brought up in this
thread. I'm curious if Duy had another use case, though, that made him
think of --swap.
-Peff
^ permalink raw reply
* Re: [bug-patch] rejecting patches that have an offset
From: Eric Blake @ 2011-08-16 23:10 UTC (permalink / raw)
To: Andreas Gruenbacher; +Cc: bug-patch, Git Mailing List
In-Reply-To: <1313534889.5598.21.camel@schurl.linbit>
On 08/16/2011 04:48 PM, Andreas Gruenbacher wrote:
> Eric,
>
> On Mon, 2011-08-15 at 17:16 -0600, Eric Blake wrote:
>> It would have saved me a lot of time if both 'patch' and 'git apply'
>> could be taught a mode of operation where they explicitly reject a patch
>> that cannot be applied without relying on an offset.
>
> that sounds reasonable. Can you send a patch or at least add a bug on
> Savannah?
Bug opened: https://savannah.gnu.org/bugs/index.php?34031
>
>> It might also be nice if patch could learn the algorithm that appears to
>> match the git behavior, where when there are multiple points with
>> identical context (viewing just the context in isolation), but where
>> those locations differ in function location (as learned by the @@ header
>> line in the patch file), then the preferred offset is the one in the
>> named function, even if that is not the closes context match to the line
>> number given in the patch file.
>
> Sounds interesting; a patch for that would be great as well.
Bug opened: https://savannah.gnu.org/bugs/index.php?34032
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
^ permalink raw reply
* Re: rejecting patches that have an offset
From: Junio C Hamano @ 2011-08-16 23:22 UTC (permalink / raw)
To: Eric Blake; +Cc: bug-patch, Git Mailing List
In-Reply-To: <4E49A8EA.5020507@redhat.com>
Eric Blake <eblake@redhat.com> writes:
> It would have saved me a lot of time if both 'patch' and 'git apply'
> could be taught a mode of operation where they explicitly reject a
> patch that cannot be applied without relying on an offset.
I am not sure about this. I somehow doubt you would want to make sure that
the preimage your patch is to be applied must be bit-for-bit identical to
what you prepared your patch for, IOW, you are using a patchfile merely as
a mean to "compress" the replacement file. You would want your RPM change
to tolerate some changes in the upstream and keep your patch applicable to
the next version of the upstream, no?
Given a patch that is not precise and can apply to multiple places,
"patch" and/or "git apply" can apply it to a place you may not have
intended. It may feel like a bug if that happens to a preimage that is
bit-for-bit identical to the version you prepared your patch is against,
but I would rather think, instead of blaming "patch" and/or "git apply",
it would be more productive to prepare a patch with larger context when
you know that the preimage file you are patching has many similar looking
lines, to make it _impossible_ for it to apply to places different from
what you intended.
^ permalink raw reply
* Re: rejecting patches that have an offset
From: Eric Blake @ 2011-08-16 23:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: bug-patch-mXXj517/zsQ, Git Mailing List
In-Reply-To: <7vobzpeybh.fsf-s2KvWo2KEQL18tm6hw+yZpy9Z0UEorGK@public.gmane.org>
On 08/16/2011 05:22 PM, Junio C Hamano wrote:
> Eric Blake<eblake-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> writes:
>
>> It would have saved me a lot of time if both 'patch' and 'git apply'
>> could be taught a mode of operation where they explicitly reject a
>> patch that cannot be applied without relying on an offset.
>
> I am not sure about this. I somehow doubt you would want to make sure that
> the preimage your patch is to be applied must be bit-for-bit identical to
> what you prepared your patch for, IOW, you are using a patchfile merely as
> a mean to "compress" the replacement file. You would want your RPM change
> to tolerate some changes in the upstream and keep your patch applicable to
> the next version of the upstream, no?
When the RPM file is generated by git->patchfile list conversion, and I
am trying to recreate a git repository from patchfile list->git, then
yes, I _do_ want that patchfile list to apply bit-for-bit identical to
anyone else starting from the same point, whether they use git or patch,
so that anyone else can regenerate the end sources that were compiled
into the rpm release.
Remember, the rpm file format includes both the starting point (it
documents the upstream tarball) and the changes to that starting point
(a patch stream) that were used to create a given released binary, in a
format that is independent of git. The idea is that managing an rpm
patch series in git is much nicer for day-to-day work (and daily work
within that git repository greatly benefits from the default of being
able to assume patch offsets, such as rebasing a patch series to apply
on top of newer upstream versions), but once converting from git out to
rpm, the conversion from rpm back to git should give a bit-for-bit
replay. If heuristics for how to apply patch offsets change, and an rpm
file includes an ambiguous patch that requires an offset, then you risk
the rpm file being broken the moment you upgrade to a newer tool chain
with a slightly different heuristic for where to resolve offsets; but if
all patches in the series are 0-offset, then you have isolated the rpm
from any implicit dependency on the version of the tool used to
reconstruct the final software from the patch series. So the question
is now how to identify whether a patch series meets that 0-offset rule,
and that's where a new option would be handy.
Hence, I'm requesting an option to reject patches with non-zero offsets,
but not making it default, as there are only a few limited places (such
as rebuilding a git repo starting from an rpm patch list) where
bit-for-bit rebuild is more desirable than accounting for offsets due to
changes in the starting point.
>
> Given a patch that is not precise and can apply to multiple places,
> "patch" and/or "git apply" can apply it to a place you may not have
> intended. It may feel like a bug if that happens to a preimage that is
> bit-for-bit identical to the version you prepared your patch is against,
> but I would rather think, instead of blaming "patch" and/or "git apply",
> it would be more productive to prepare a patch with larger context when
> you know that the preimage file you are patching has many similar looking
> lines, to make it _impossible_ for it to apply to places different from
> what you intended.
Yes, I know that as well - the particular patch that sparked this thread
was ambiguous with three lines of context, but unambiguous with 6 lines,
even when an offset still had to be applied.
So maybe you raise yet another feature proposal: What would it take for
git to generate unambiguous patches - that is, when generating a patch
with context, to then ensure that given the file it is being applied to,
then context is auto-widened until there are no other offsets where the
patch can possibly be applied? In other words, if I say 'git diff HEAD^
--auto-context', then the resulting patch would have automatically have
6 context lines for my problematic hunk, while sticking to the default 3
context lines for other hunks that were already unambiguous. Of course,
this only protects you if starting from the same version of the file
(since any other patch can introduce an ambiguity not present at the
time you computed the minimal context needed for non-ambiguity in your
version of the pre-patch file).
--
Eric Blake eblake-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org +1-801-349-2682
Libvirt virtualization library http://libvirt.org
^ permalink raw reply
* What's cooking in git.git (Aug 2011, #04; Tue, 16)
From: Junio C Hamano @ 2011-08-17 0:07 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 kernel.org machine seems to be very busy for the past 48 hours and it
might take a while for tonight's pushout to propagate to its public
mirrors. It may be faster to fetch from repo.or.gz, github, sourceforge,
or code.google.com mirrors, e.g.
git://repo.or.cz/alt-git.git/
git://github.com/gitster/git
https://code.google.com/p/git-core/
There are a few 'fixup!' commits queued in topics still in 'pu', so that
authors have a choice to just say "that fix looks good, squash it in!"
instead of going through an extra round.
--------------------------------------------------
[New Topics]
* di/fast-import-deltified-tree (2011-08-14) 2 commits
- fast-import: prevent producing bad delta
- fast-import: add a test for tree delta base corruption
* di/parse-options-split (2011-08-11) 2 commits
- Reduce parse-options.o dependencies
- parse-options: export opterr, optbug
* mh/attr (2011-08-14) 7 commits
- Unroll the loop over passes
- Change while loop into for loop
- Determine the start of the states outside of the pass loop
- Change parse_attr() to take a pointer to struct attr_state
- Increment num_attr in parse_attr_line(), not parse_attr()
- Document struct match_attr
- Add a file comment
All looked reasonable.
* mh/iterate-refs (2011-08-14) 6 commits
- 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()
* jn/plug-empty-tree-leak (2011-08-16) 2 commits
- merge-recursive: take advantage of hardcoded empty tree
- revert: plug memory leak in "cherry-pick root commit" codepath
Both looked reasonable.
--------------------------------------------------
[Stalled]
* jc/merge-reword (2011-05-25) 2 commits
- merge: mark the final "Merge made by..." message for l10n
- merge: reword the final message
Probably the topmost commit should be dropped.
* nk/branch-v-abbrev (2011-07-01) 1 commit
- branch -v: honor core.abbrev
Perhaps needs an updated commit log message?
* di/fast-import-doc (2011-07-13) 2 commits
- doc/fast-import: document feature import-marks-if-exists
- doc/fast-import: clarify notemodify command
Comments from fast-import folks?
* 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-07-14) 7 commits
- 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
I think a further refactoring (no, not my suggestion) was offered?
--------------------------------------------------
[Cooking]
* ac/describe-dirty-refresh (2011-08-11) 1 commit
- describe: Refresh the index when run with --dirty
Will merge to "next", but needs Sign-off.
* en/merge-recursive-2 (2011-08-14) 57 commits
- merge-recursive: Don't re-sort a list whose order we depend upon
- merge-recursive: Fix virtual merge base for rename/rename(1to2)/add-dest
- t6036: criss-cross + rename/rename(1to2)/add-dest + simple modify
- merge-recursive: Avoid unnecessary file rewrites
- t6022: Additional tests checking for unnecessary updates of files
- merge-recursive: Fix spurious 'refusing to lose untracked file...' messages
- t6022: Add testcase for spurious "refusing to lose untracked" messages
- t3030: fix accidental success in symlink rename
- merge-recursive: Fix working copy handling for rename/rename/add/add
- merge-recursive: add handling for rename/rename/add-dest/add-dest
- merge-recursive: Have conflict_rename_delete reuse modify/delete code
- merge-recursive: Make modify/delete handling code reusable
- merge-recursive: Consider modifications in rename/rename(2to1) conflicts
- merge-recursive: Create function for merging with branchname:file markers
- merge-recursive: Record more data needed for merging with dual renames
- merge-recursive: Defer rename/rename(2to1) handling until process_entry
- merge-recursive: Small cleanups for conflict_rename_rename_1to2
- merge-recursive: Fix rename/rename(1to2) resolution for virtual merge base
- merge-recursive: Introduce a merge_file convenience function
- merge-recursive: Fix modify/delete resolution in the recursive case
- merge-recursive: When we detect we can skip an update, actually skip it
- merge-recursive: Provide more info in conflict markers with file renames
- merge-recursive: Cleanup and consolidation of rename_conflict_info
- merge-recursive: Consolidate process_entry() and process_df_entry()
- merge-recursive: Improve handling of rename target vs. directory addition
- merge-recursive: Add comments about handling rename/add-source cases
- merge-recursive: Make dead code for rename/rename(2to1) conflicts undead
- merge-recursive: Fix deletion of untracked file in rename/delete conflicts
- merge-recursive: Split update_stages_and_entry; only update stages at end
- merge-recursive: Allow make_room_for_path() to remove D/F entries
- string-list: Add API to remove an item from an unsorted list
- merge-recursive: Split was_tracked() out of would_lose_untracked()
- merge-recursive: Save D/F conflict filenames instead of unlinking them
- merge-recursive: Fix code checking for D/F conflicts still being present
- merge-recursive: Fix sorting order and directory change assumptions
- merge-recursive: Fix recursive case with D/F conflict via add/add conflict
- merge-recursive: Avoid working directory changes during recursive case
- merge-recursive: Remember to free generated unique path names
- merge-recursive: Consolidate different update_stages functions
- merge-recursive: Mark some diff_filespec struct arguments const
- merge-recursive: Correct a comment
- merge-recursive: Make BUG message more legible by adding a newline
- t6022: Add testcase for merging a renamed file with a simple change
- t6022: New tests checking for unnecessary updates of files
- t6022: Remove unnecessary untracked files to make test cleaner
- t6036: criss-cross + rename/rename(1to2)/add-source + modify/modify
- t6036: criss-cross w/ rename/rename(1to2)/modify+rename/rename(2to1)/modify
- t6036: tests for criss-cross merges with various directory/file conflicts
- t6036: criss-cross with weird content can fool git into clean merge
- t6036: Add differently resolved modify/delete conflict in criss-cross test
- t6042: Add failing testcases for rename/rename/add-{source,dest} conflicts
- t6042: Ensure rename/rename conflicts leave index and workdir in sane state
- t6042: Add tests for content issues with modify/rename/directory conflicts
- t6042: Add a testcase where undetected rename causes silent file deletion
- t6042: Add a pair of cases where undetected renames cause issues
- t6042: Add failing testcase for rename/modify/add-source conflict
- t6042: Add a testcase where git deletes an untracked file
Rerolled.
* di/fast-import-ident (2011-08-11) 5 commits
- fsck: improve committer/author check
- fsck: add a few committer name tests
- fast-import: check committer name more strictly
- fast-import: don't fail on omitted committer name
- fast-import: add input format tests
* fg/submodule-ff-check-before-push (2011-08-09) 1 commit
- push: Don't push a repository with unpushed submodules
* hv/submodule-update-none (2011-08-11) 2 commits
- add update 'none' flag to disable update of submodule by default
- submodule: move update configuration variable further up
* jc/lookup-object-hash (2011-08-11) 6 commits
- 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
* js/i18n-scripts (2011-08-08) 5 commits
- submodule: take advantage of gettextln and eval_gettextln.
- stash: take advantage of eval_gettextln
- pull: take advantage of eval_gettextln
- git-am: take advantage of gettextln and eval_gettextln.
- gettext: add gettextln, eval_gettextln to encode common idiom
* cb/maint-ls-files-error-report (2011-08-11) 1 commit
(merged to 'next' on 2011-08-15 at 69f41cf)
+ ls-files: fix pathspec display on error
* jc/maint-combined-diff-work-tree (2011-08-04) 1 commit
(merged to 'next' on 2011-08-05 at 976a4d4)
+ diff -c/--cc: do not mistake "resolved as deletion" as "use working tree"
Will merge to "master" after cooking for a bit more.
* js/sh-style (2011-08-05) 2 commits
(merged to 'next' on 2011-08-11 at 4a4c22c)
+ filter-branch.sh: de-dent usage string
+ misc-sh: fix up whitespace in some other .sh files.
* ma/am-exclude (2011-08-09) 2 commits
(merged to 'next' on 2011-08-11 at cf0ba4d)
+ am: Document new --exclude=<path> option
(merged to 'next' on 2011-08-05 at 658e57c)
+ am: pass exclude down to apply
Will merge to "master" after cooking for a bit more.
* db/am-skip-blank-at-the-beginning (2011-08-11) 1 commit
(merged to 'next' on 2011-08-11 at 3637843)
+ am: ignore leading whitespace before patch
Will merge to "master" after cooking for a bit more.
* jc/maint-smart-http-race-upload-pack (2011-08-08) 1 commit
(merged to 'next' on 2011-08-11 at 3f24b64)
+ helping smart-http/stateless-rpc fetch race
* jn/maint-test-return (2011-08-11) 3 commits
(merged to 'next' on 2011-08-15 at 5a42301)
+ t3900: do not reference numbered arguments from the test script
+ test: cope better with use of return for errors
+ test: simplify return value of test_run_
* rt/zlib-smaller-window (2011-08-11) 2 commits
(merged to 'next' on 2011-08-15 at e05b26b)
+ test: consolidate definition of $LF
+ Tolerate zlib deflation with window size < 32Kb
* fg/submodule-git-file-git-dir (2011-08-16) 3 commits
- fixup! Move git-dir for submodules
- Move git-dir for submodules
- rev-parse: add option --resolve-git-dir <path>
* js/bisect-no-checkout (2011-08-09) 11 commits
(merged to 'next' on 2011-08-11 at 6c94a45)
+ bisect: add support for bisecting bare repositories
+ bisect: further style nitpicks
+ bisect: replace "; then" with "\n<tab>*then"
+ bisect: cleanup whitespace errors in git-bisect.sh.
+ bisect: add documentation for --no-checkout option.
+ bisect: add tests for the --no-checkout option.
+ bisect: introduce --no-checkout support into porcelain.
+ bisect: introduce support for --no-checkout option.
+ bisect: add tests to document expected behaviour in presence of broken trees.
+ bisect: use && to connect statements that are deferred with eval.
+ bisect: move argument parsing before state modification.
* cb/maint-exec-error-report (2011-08-01) 2 commits
(merged to 'next' on 2011-08-05 at 2764424)
+ notice error exit from pager
+ error_routine: use parent's stderr if exec fails
Will merge to "master" after cooking for a bit more.
* cb/maint-quiet-push (2011-08-08) 2 commits
(merged to 'next' on 2011-08-08 at 917d73b)
+ receive-pack: do not overstep command line argument array
(merged to 'next' on 2011-08-01 at 87df938)
+ propagate --quiet to send-pack/receive-pack
Will merge to "master" after cooking for a bit more.
* 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
* mh/check-attr-listing (2011-08-04) 23 commits
(merged to 'next' on 2011-08-11 at f73ad50)
+ Rename git_checkattr() to git_check_attr()
+ git-check-attr: Fix command-line handling to match docs
+ git-check-attr: Drive two tests using the same raw data
+ git-check-attr: Add an --all option to show all attributes
+ git-check-attr: Error out if no pathnames are specified
+ git-check-attr: Process command-line args more systematically
+ git-check-attr: Handle each error separately
+ git-check-attr: Extract a function error_with_usage()
+ git-check-attr: Introduce a new variable
+ git-check-attr: Extract a function output_attr()
+ Allow querying all attributes on a file
+ Remove redundant check
+ Remove redundant call to bootstrap_attr_stack()
+ Extract a function collect_all_attrs()
+ Teach prepare_attr_stack() to figure out dirlen itself
+ git-check-attr: Use git_attr_name()
+ Provide access to the name attribute of git_attr
+ git-check-attr: Add tests of command-line parsing
+ git-check-attr: Add missing "&&"
+ Disallow the empty string as an attribute name
+ Remove anachronism from comment
+ doc: Correct git_attr() calls in example code
+ doc: Add a link from gitattributes(5) to git-check-attr(1)
(this branch is used by mh/check-attr-relative.)
* mh/check-attr-relative (2011-08-04) 6 commits
(merged to 'next' on 2011-08-11 at f94550c)
+ test-path-utils: Add subcommand "prefix_path"
+ test-path-utils: Add subcommand "absolute_path"
+ git-check-attr: Normalize paths
+ git-check-attr: Demonstrate problems with relative paths
+ git-check-attr: Demonstrate problems with unnormalized paths
+ git-check-attr: test that no output is written to stderr
(this branch uses mh/check-attr-listing.)
* jk/http-auth-keyring (2011-08-03) 13 commits
(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
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.
* js/ref-namespaces (2011-07-21) 5 commits
(merged to 'next' on 2011-07-25 at 5b7dcfe)
+ ref namespaces: tests
+ ref namespaces: documentation
+ ref namespaces: Support remote repositories via upload-pack and receive-pack
+ ref namespaces: infrastructure
+ Fix prefix handling in ref iteration functions
* rc/histogram-diff (2011-08-08) 12 commits
(merged to 'next' on 2011-08-11 at 684dfd1)
+ xdiff/xhistogram: drop need for additional variable
+ xdiff/xhistogram: rely on xdl_trim_ends()
+ xdiff/xhistogram: rework handling of recursed results
+ xdiff: do away with xdl_mmfile_next()
(merged to 'next' on 2011-08-03 at f9e2328)
+ Make test number unique
(merged to 'next' on 2011-07-25 at 3351028)
+ xdiff/xprepare: use a smaller sample size for histogram diff
+ xdiff/xprepare: skip classification
+ teach --histogram to diff
+ t4033-diff-patience: factor out tests
+ xdiff/xpatience: factor out fall-back-diff function
+ xdiff/xprepare: refactor abort cleanups
+ xdiff/xprepare: use memset()
* rr/revert-cherry-pick-continue (2011-08-08) 18 commits
- 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
^ 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