Re: [PATCH v5 00/28] Support multiple checkouts
On Mon, Jul 7, 2014 at 3:46 AM, Max Kirillov m...@max630.net wrote: Hi. What future does this have? Currently it is marked as Stalled, but still mergeable with some trivial conflicts and seem to be working (except some bugs in interaction with submodules, see below). It would be very nice if this feature is officially supported. It's to be re-rolled soon. I have a patch about sparse-checkout and Dennis may contribute another one to enable checkout --to from a bare repository. By the way Dennis has been testing this feature and he reported (off-list) it worked fine, which is good news. I have done nothing so far because my git time (or energy to be precise) is limited these days, and I wanted to see if Dennis reported any new bugs. I also have a comment about how it interacts with submodules. Would it be more appropriate to mark modules as a per-checkout directory? Because each of the working tree's submodule is obviously a separated directory in filesystem, and in most cases (at least in my practice) they are checked-out to different revisions. Submodule interaction is something I have avoided so far because I'm not a big user and admittedly does not follow its development closely. I think we could get this in first, then let submodule people aware about this feature and let them decide how to use it. So, currently (before proper linking of submodules checkouts implemented), if make submodules per-checkout (actually it appears to somehow work even with current code, maybe because some submodule code ignores the common_dir), one could run git submodule update if necessary, and get fully separated clones, which would work normally. It still may break if submodules are removed, added or renamed, but this seems to be inevitable until config is separated to per-checkout and common parts, which I suppose is a much bigger task. -- Duy -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 00/28] Support multiple checkouts
On ma, 2014-07-07 at 17:25 +0700, Duy Nguyen wrote: I also have a comment about how it interacts with submodules. Would it be more appropriate to mark modules as a per-checkout directory? Because each of the working tree's submodule is obviously a separated directory in filesystem, and in most cases (at least in my practice) they are checked-out to different revisions. Submodule interaction is something I have avoided so far because I'm not a big user and admittedly does not follow its development closely. I think we could get this in first, then let submodule people aware about this feature and let them decide how to use it. I do intend to use checkout --to and submodule update on the same repository, but have not yet done so. I will poke at that later this month. If you can easily reproduce errors, I would appreciate to know how, because my use of submodules is very limited. -- Dennis Kaarsemaker http://www.kaarsemaker.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 00/28] Support multiple checkouts
On Mon, Jul 07, 2014 at 12:49:01PM +0200, Dennis Kaarsemaker wrote: I do intend to use checkout --to and submodule update on the same repository, but have not yet done so. I will poke at that later this month. If you can easily reproduce errors, I would appreciate to know how, because my use of submodules is very limited. I have collected all my tests to this script: https://raw.githubusercontent.com/max630/git/tmp/multiple_work_trees_dev/t/t7410-submodule-checkout-to.sh -- Max -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 00/28] Support multiple checkouts
Hi. What future does this have? Currently it is marked as Stalled, but still mergeable with some trivial conflicts and seem to be working (except some bugs in interaction with submodules, see below). It would be very nice if this feature is officially supported. I also have a comment about how it interacts with submodules. Would it be more appropriate to mark modules as a per-checkout directory? Because each of the working tree's submodule is obviously a separated directory in filesystem, and in most cases (at least in my practice) they are checked-out to different revisions. So, currently (before proper linking of submodules checkouts implemented), if make submodules per-checkout (actually it appears to somehow work even with current code, maybe because some submodule code ignores the common_dir), one could run git submodule update if necessary, and get fully separated clones, which would work normally. It still may break if submodules are removed, added or renamed, but this seems to be inevitable until config is separated to per-checkout and common parts, which I suppose is a much bigger task. -- Max -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 00/28] Support multiple checkouts
On Fri, Mar 7, 2014 at 9:47 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: The diff against v4 is kinda big but it's mostly about converting `...` to $(...) and making git_path() and friends return a const string. Another notable change is I no longer attempt to support checkouts on portable devices. Torsten pointed out (privately) that my dealing with Windows drives was insufficient. And Junio was not so happy with how link() was handled either. We can revisit it later. Many thanks to Eric, who was very patient to go through the series carefully and pointed out problems that I overlooked. v4..v5 diff below for convenience Thanks for providing an interdiff between the two versions. It simplified things considerably, especially with the v4 reviews still relatively fresh in my brain. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v5 00/28] Support multiple checkouts
The diff against v4 is kinda big but it's mostly about converting `...` to $(...) and making git_path() and friends return a const string. Another notable change is I no longer attempt to support checkouts on portable devices. Torsten pointed out (privately) that my dealing with Windows drives was insufficient. And Junio was not so happy with how link() was handled either. We can revisit it later. Many thanks to Eric, who was very patient to go through the series carefully and pointed out problems that I overlooked. v4..v5 diff below for convenience -- 8 -- diff --git a/Documentation/config.txt b/Documentation/config.txt index 438b213..c635b8d 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1184,9 +1184,10 @@ gc.pruneexpire:: unreachable objects immediately. gc.prunereposexpire:: - When 'git gc' is run, it will call 'prune --repos --expire 3.months.ago'. - Override the grace period with this config variable. The value - now may be used to disable this grace period and always prune + When 'git gc' is run, it will call + 'prune --repos --expire 3.months.ago'. + Override the grace period with this config variable. The value + now may be used to disable the grace period and always prune $GIT_DIR/repos immediately. gc.reflogexpire:: diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 8e6ad32..8a9cac8 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -238,7 +238,9 @@ print a message to stderr and exit with nonzero status. --git-path path:: Resolve $GIT_DIR/path and takes other path relocation variables such as $GIT_OBJECT_DIRECTORY, - $GIT_INDEX_FILE... into account. + $GIT_INDEX_FILE... into account. For example, if + $GIT_OBJECT_DIRECTORY is set to /foo/bar then git rev-parse + --git-path objects/abc returns /tmp/bar/abc. --show-cdup:: When the command is invoked from a subdirectory, show the diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt index 2dc6901..dff6c47 100644 --- a/Documentation/gitrepository-layout.txt +++ b/Documentation/gitrepository-layout.txt @@ -47,7 +47,7 @@ use with dumb transports but otherwise is OK as long as `objects/info/alternates` points at the object stores it borrows from. + -This directory is ignored $GIT_COMMON_DIR is set and +This directory is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/objects will be used instead. objects/[0-9a-f][0-9a-f]:: @@ -95,7 +95,7 @@ refs:: References are stored in subdirectories of this directory. The 'git prune' command knows to preserve objects reachable from refs found in this directory and - its subdirectories. This directory is ignored $GIT_COMMON_DIR + its subdirectories. This directory is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/refs will be used instead. refs/heads/`name`:: @@ -118,7 +118,7 @@ refs/replace/`obj-sha1`:: packed-refs:: records the same information as refs/heads/, refs/tags/, and friends record in a more efficient way. See - linkgit:git-pack-refs[1]. This file is ignored $GIT_COMMON_DIR + linkgit:git-pack-refs[1]. This file is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/packed-refs will be used instead. HEAD:: @@ -151,7 +151,7 @@ branches:: 'repository' argument. See the REMOTES section in linkgit:git-fetch[1] for details. This mechanism is legacy and not likely to be found in modern repositories. This - directory is ignored $GIT_COMMON_DIR is set and + directory is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/branches will be used instead. @@ -162,7 +162,7 @@ hooks:: default. To enable, the `.sample` suffix has to be removed from the filename by renaming. Read linkgit:githooks[5] for more details about - each hook. This directory is ignored $GIT_COMMON_DIR is set + each hook. This directory is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/hooks will be used instead. @@ -172,7 +172,7 @@ index:: info:: Additional information about the repository is recorded - in this directory. This directory is ignored $GIT_COMMON_DIR + in this directory. This directory is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/index will be used instead. info/refs:: @@ -210,7 +210,7 @@ remotes:: 'git pull' and 'git push' commands. See the REMOTES section in linkgit:git-fetch[1] for details. This mechanism is legacy and not likely to be found in modern repositories. This - directory is ignored $GIT_COMMON_DIR is set and + directory is ignored if $GIT_COMMON_DIR is set and $GIT_COMMON_DIR/remotes will be used instead. logs:: @@ -230,7 +230,7 @@ shallow:: This is