From: Sergey Vlasov <vsu@altlinux.ru>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Alex Riesen <raa.lkml@gmail.com>
Subject: Re: [PATCH] Speedup recursive by flushing index only once for all entries
Date: Fri, 12 Jan 2007 18:48:39 +0300 [thread overview]
Message-ID: <20070112184839.9431ddff.vsu@altlinux.ru> (raw)
In-Reply-To: <7vr6u2adgx.fsf@assigned-by-dhcp.cox.net>
[-- Attachment #1: Type: text/plain, Size: 2846 bytes --]
On Wed, 10 Jan 2007 11:28:14 -0800 Junio C Hamano wrote:
> From: Junio C Hamano <junkio@cox.net>
> Date: Wed, 10 Jan 2007 11:20:58 -0800
> Subject: [PATCH] merge-recursive: do not use on-file index when not needed.
>
> This revamps the merge-recursive implementation following the
> outline in:
>
> Message-ID: <7v8xgileza.fsf@assigned-by-dhcp.cox.net>
>
> There is no need to write out the index until the very end just
> once from merge-recursive. Also there is no need to write out
> the resulting tree object for the simple case of merging with a
> single merge base.
>
> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit broke t3401-rebase-partial.sh:
...
* ok 3: rebase topic branch against new master and check git-am did not get halted
* expecting success: git-checkout -f my-topic-branch-merge &&
git-rebase --merge master-merge &&
test ! -d .git/.dotest-merge
First, rewinding head to replay your work on top of it...
HEAD is now at 5f97179... Add C.
Merging master-merge with my-topic-branch-merge~1
Merging:
5f97179 Add C.
1be2c8e Add B.
found 1 common ancestor(s):
0e8cba9 Add A.
.../git-rebase: line 82: 11517 Segmentation fault git-merge-$strategy "$cmt^" -- "$hd" "$cmt"
Unknown exit code (139) from command: git-merge-recursive 1be2c8e0eba8a7a383d0403facb1c72c622c0939^ -- HEAD 1be2c8e0eba8a7a383d0403facb1c72c622c0939
* FAIL 4: rebase --merge topic branch that was partially merged upstream
git-checkout -f my-topic-branch-merge &&
git-rebase --merge master-merge &&
test ! -d .git/.dotest-merge
* failed 1 among 4 test(s)
> @@ -1105,9 +1040,7 @@ static int merge_trees(struct tree *head,
> sha1_to_hex(head->object.sha1),
> sha1_to_hex(merge->object.sha1));
>
> - *result = git_write_tree();
Previously *result was set here...
> -
> - if (!*result) {
> + if (unmerged_index()) {
> struct path_list *entries, *re_head, *re_merge;
> int i;
> path_list_clear(¤t_file_set, 1);
> @@ -1128,17 +1061,11 @@ static int merge_trees(struct tree *head,
> if (!process_entry(path, e, branch1, branch2))
> clean = 0;
> }
> - if (cache_dirty)
> - flush_cache();
>
> path_list_clear(re_merge, 0);
> path_list_clear(re_head, 0);
> path_list_clear(entries, 1);
>
> - if (clean || index_only)
> - *result = git_write_tree();
> - else
> - *result = NULL;
> } else {
> clean = 1;
> printf("merging of trees %s and %s resulted in %s\n",
> @@ -1146,6 +1073,8 @@ static int merge_trees(struct tree *head,
> sha1_to_hex(merge->object.sha1),
> sha1_to_hex((*result)->object.sha1));
...and it is still used here - however, after the patch *result is
uninitialized at this point.
> }
> + if (index_only)
> + *result = git_write_tree();
Too late...
>
> return clean;
> }
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-01-12 16:18 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 10:47 [PATCH] Speedup recursive by flushing index only once for all entries Alex Riesen
2007-01-04 12:33 ` Johannes Schindelin
2007-01-04 12:47 ` Alex Riesen
2007-01-04 20:22 ` Junio C Hamano
2007-01-05 11:22 ` Alex Riesen
2007-01-07 16:31 ` Alex Riesen
2007-01-10 18:06 ` Junio C Hamano
2007-01-10 19:28 ` Junio C Hamano
2007-01-10 22:11 ` Junio C Hamano
2007-01-10 23:07 ` Alex Riesen
2007-01-10 23:23 ` Linus Torvalds
2007-01-11 8:14 ` Johannes Schindelin
2007-01-11 9:03 ` Alex Riesen
2007-01-11 12:11 ` Alex Riesen
2007-01-11 20:37 ` Junio C Hamano
2007-01-11 9:02 ` Alex Riesen
2007-01-11 16:38 ` Linus Torvalds
2007-01-11 17:43 ` Alex Riesen
2007-01-11 18:02 ` Linus Torvalds
2007-01-11 21:48 ` Alex Riesen
2007-01-11 20:23 ` Junio C Hamano
2007-01-11 22:10 ` Alex Riesen
2007-01-11 22:28 ` Linus Torvalds
2007-01-11 23:53 ` Junio C Hamano
2007-01-12 0:18 ` Alex Riesen
2007-01-11 0:34 ` Junio C Hamano
2007-01-11 8:15 ` Johannes Schindelin
2007-01-12 15:48 ` Sergey Vlasov [this message]
2007-01-12 17:38 ` Alex Riesen
2007-01-12 20:37 ` Sergey Vlasov
2007-01-12 18:23 ` Junio C Hamano
2007-01-12 20:09 ` [PATCH] merge-recursive: do not report the resulting tree object name Junio C Hamano
2007-01-12 23:36 ` Johannes Schindelin
2007-01-13 0:32 ` Junio C Hamano
2007-01-13 0:57 ` Jakub Narebski
2007-01-13 11:01 ` Johannes Schindelin
2007-01-13 5:14 ` Shawn O. Pearce
2007-01-13 7:03 ` Junio C Hamano
2007-01-12 20:30 ` [PATCH] Speedup recursive by flushing index only once for all entries Alex Riesen
2007-01-12 21:07 ` Sergey Vlasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070112184839.9431ddff.vsu@altlinux.ru \
--to=vsu@altlinux.ru \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.