From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [RFD PATCH 00/32] subtree clone v2
Date: Wed, 25 Aug 2010 15:21:00 +1000 [thread overview]
Message-ID: <AANLkTikkybj784PHoVCkVZyxo40q6BhdkOzFho-xBS6G@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinsNvVup43B6nQtU6dvJy789n8kQm6N6na0J9oa@mail.gmail.com>
On Wed, Aug 25, 2010 at 2:37 PM, Elijah Newren <newren@gmail.com> wrote:
>>>> Remote merge part.
>>>>
>>>> Split a merge operation into two parts, the real merge will be done
>>>> within narrow tree. Conflicts can happen and be resolved in the narrow
>>>> index, locally.
>>>>
>>>> Everything outside narrow tree will be merged (trivially) by
>>>> server. Then server sends the base tree back, so join_narrow_tree() in
>>>> patch 20 can be used to create proper commit.
>>>>
>>>> Server can disable this remote merge feature, which means users are
>>>> forced to do rebase/fast-forward. Not too bad.
>>>
>>> Yikes. Naïve question (please forgive my laziness): is it possible to
>>> merge without remote contact in the boring case, when no changes have
>>> occured outside the narrow tree?
>>
>> That's possible (and is implemented in my series). But I guess as soon
>> as you do "git pull", the boring case is likely not applicable
>> anymore.
>
> I'm not sure I follow. Are you allowing changes outside the narrow
> tree to occur? If you're not, I would have assumed that repeated
> pulls just work, without any need to talk to the server, using a
> resolve-like strategy (with no special rename detection).
I don't. But I can't stop all other users (who use full repos) change
outside the narrow tree and push their changes back upstream. When
narrow user pulls from upstream again, the tree outside narrow tree
might be not the same as before.
> Here's my understanding, though it might have holes:
>
> If you have a narrow/subtree clone, it means that you only have the
> data for a certain paths. I'm assuming that also meant you would only
> allow modifying those paths. In other words, you have no changes
> outside the narrow tree. Because of that, I think you can handle
> paths outside the narrow region using trivial-merge logic: From
> Documentation/technical/trivial-merge.txt, I think the relevant cases
> are 2, 3, 8, 10, 13, or 14. 13 & 14 already have a specified
> resolution. There's already a comment in the file that cases 8 & 10
> could validly be resolved as (empty), it just hasn't been done in the
> code as it tends to happen with the follow-up automatic merge anyway.
> That only leaves cases 2 & 3 as being slightly tricky -- if a path on
> one side of the merge started empty and ended empty, it would seem to
> make sense that the non-empty path on the other side would be the
> resolution. We can't do that in the non-narrow clone case because the
> non-empty path may have been created due to a rename and we'd like to
> have changes follow the rename appropriately. However, in the narrow
> clone case, one can't rename from a path you don't have to a path you
> do, so this possibility is eliminated.
Trivial merge did not work outside narrow tree for me because I did
not have all trees of a commit. So as soon as it steps on the narrow
border, it has to stop (without retrieving full path to files outside
narrow tree). trivial-merge.txt takes input as files, not directories.
Given two directories (because we don't have further details what
inside those directories), I don't know how to do trivial merge.
> So, if my understanding is correct, then if you have no changes from
> upstream outside the sparse/narrow/whatever paths (where "paths"
> currently means a single tree in your current patches), I think you
> should be able to do a merge locally in that sparse clone. The end
> result will also have no changes from upstream outside those paths.
> Thus, you should be able to merge again.
Yes. But other people will change outside narrow tree, unfortunately.
--
Duy
next prev parent reply other threads:[~2010-08-25 5:21 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 22:19 [RFD PATCH 00/32] subtree clone v2 Nguyễn Thái Ngọc Duy
2010-08-24 22:19 ` [PATCH 01/32] add const to ce_write() Nguyễn Thái Ngọc Duy
2010-08-24 22:19 ` [PATCH 02/32] cache-tree: abstract out write_sha1_file from cache_tree_update() Nguyễn Thái Ngọc Duy
2010-08-24 22:41 ` Jonathan Nieder
2010-08-24 22:19 ` [PATCH 03/32] cache-tree: ignore CE_REMOVE entries in verify_cache() Nguyễn Thái Ngọc Duy
2010-08-24 23:15 ` Jonathan Nieder
2010-08-25 0:23 ` Nguyen Thai Ngoc Duy
2010-08-25 0:48 ` Jonathan Nieder
2010-08-24 22:19 ` [PATCH 04/32] move do_compress() from pack-objects.c to pack-write.c Nguyễn Thái Ngọc Duy
2010-08-24 23:25 ` Jonathan Nieder
2010-08-25 3:19 ` Nguyen Thai Ngoc Duy
2010-08-24 22:19 ` [PATCH 05/32] pack-write: add functions for creating simple packs Nguyễn Thái Ngọc Duy
2010-08-24 22:19 ` [PATCH 06/32] tree.c: Add {set,clear}_tree_marks Nguyễn Thái Ngọc Duy
2010-08-24 22:19 ` [PATCH 07/32] tree.c: find_subtree() to search for a tree Nguyễn Thái Ngọc Duy
2010-08-25 3:35 ` Elijah Newren
2010-08-25 3:43 ` Nguyen Thai Ngoc Duy
2010-08-25 5:35 ` Elijah Newren
2010-08-24 22:19 ` [PATCH 08/32] Add $GIT_DIR/narrow check Nguyễn Thái Ngọc Duy
2010-08-24 22:19 ` [PATCH 09/32] index: make narrow index incompatible with older git Nguyễn Thái Ngọc Duy
2010-08-24 23:43 ` Jonathan Nieder
2010-08-25 0:25 ` Nguyen Thai Ngoc Duy
2010-08-24 22:20 ` [PATCH 10/32] rev-list: support traversing in narrow repository mode Nguyễn Thái Ngọc Duy
2010-08-25 4:11 ` Elijah Newren
2010-08-24 22:20 ` [PATCH 11/32] rev-list: support --narrow-tree Nguyễn Thái Ngọc Duy
2010-08-25 3:59 ` Elijah Newren
2010-08-25 22:11 ` Nguyen Thai Ngoc Duy
2010-08-24 22:20 ` [PATCH 12/32] pack-objects: " Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 13/32] upload-pack: support narrow-tree capability Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 14/32] fetch-pack: support --narrow-tree Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 15/32] unpack_trees: only unpack $GIT_DIR/narrow subtree in narrow repository Nguyễn Thái Ngọc Duy
2010-08-25 5:04 ` Elijah Newren
2010-08-25 5:38 ` Nguyen Thai Ngoc Duy
2010-08-24 22:20 ` [PATCH 16/32] cache-tree: only cache tree within narrow area Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 17/32] tree-diff: add narrow versions of diff_{root_,}tree_sha1 Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 18/32] log-tree: use narrow version of diff_tree_sha1 Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 19/32] clone: support --narrow option Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 20/32] narrow-tree: add join_narrow_tree to do tree fixup for commits Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 21/32] commit: add narrow's commit_tree version Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 22/32] commit: use commit_narrow_tree() to support narrow repo Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 23/32] commit-tree: require --narrow-base in " Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 24/32] merge: refuse to merge if narrow bases are different Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 25/32] merge: prepare commit properly in narrow mode Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 26/32] Add upload-narrow-base command Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 27/32] rev-list: traverse some more trees to make upload-narrow-base happy Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 28/32] narrow-tree: add oldest_narrow_base() Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 29/32] Add command fetch-narrow-base Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 30/32] merge: support merging when narrow bases are different Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 31/32] send-pack: do not use thin pack in narrow mode Nguyễn Thái Ngọc Duy
2010-08-24 22:20 ` [PATCH 32/32] daemon: support upload-narrow-base Nguyễn Thái Ngọc Duy
2010-08-24 22:37 ` [RFD PATCH 00/32] subtree clone v2 Jonathan Nieder
2010-08-24 22:47 ` Nguyen Thai Ngoc Duy
2010-08-24 23:09 ` Jonathan Nieder
2010-08-25 0:20 ` Nguyen Thai Ngoc Duy
2010-08-25 4:37 ` Elijah Newren
2010-08-25 5:21 ` Nguyen Thai Ngoc Duy [this message]
2010-08-25 5:31 ` Elijah Newren
2010-08-25 6:21 ` Nguyen Thai Ngoc Duy
2010-08-25 13:06 ` Elijah Newren
2010-08-25 22:13 ` Nguyen Thai Ngoc Duy
2010-08-26 2:50 ` Elijah Newren
2010-08-26 3:52 ` Nguyen Thai Ngoc Duy
2010-08-26 4:39 ` Elijah Newren
2010-08-26 4:45 ` Nguyen Thai Ngoc Duy
2010-08-25 5:21 ` Elijah Newren
2010-08-25 19:27 ` Junio C Hamano
2010-08-25 20:43 ` Elijah Newren
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=AANLkTikkybj784PHoVCkVZyxo40q6BhdkOzFho-xBS6G@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=newren@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).