<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-worktree.txt, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-03-18T05:45:21Z</updated>
<entry>
<title>doc: fix typos in man pages</title>
<updated>2019-03-18T05:45:21Z</updated>
<author>
<name>Alexander Blesius</name>
<email>alexander+git@blesius.eu</email>
</author>
<published>2019-03-16T10:34:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed31851fa640a0c23a3d6ead07af5155417aeb4e'/>
<id>urn:sha1:ed31851fa640a0c23a3d6ead07af5155417aeb4e</id>
<content type='text'>
Signed-off-by: Alexander Blesius &lt;alexander+git@blesius.eu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/per-worktree-ref-iteration'</title>
<updated>2018-11-13T13:37:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-13T13:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e146cc97be4c054c60d38e9f4edcdc33205bf563'/>
<id>urn:sha1:e146cc97be4c054c60d38e9f4edcdc33205bf563</id>
<content type='text'>
The code to traverse objects for reachability, used to decide what
objects are unreferenced and expendable, have been taught to also
consider per-worktree refs of other worktrees as starting points to
prevent data loss.

* nd/per-worktree-ref-iteration:
  git-worktree.txt: correct linkgit command name
  reflog expire: cover reflog from all worktrees
  fsck: check HEAD and reflog from other worktrees
  fsck: move fsck_head_link() to get_default_heads() to avoid some globals
  revision.c: better error reporting on ref from different worktrees
  revision.c: correct a parameter name
  refs: new ref types to make per-worktree refs visible to all worktrees
  Add a place for (not) sharing stuff between worktrees
  refs.c: indent with tabs, not spaces
</content>
</entry>
<entry>
<title>Merge branch 'nd/per-worktree-config'</title>
<updated>2018-11-13T13:37:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-13T13:37:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c758f9a67a265ae51beddfd9895d48a42c2af13'/>
<id>urn:sha1:8c758f9a67a265ae51beddfd9895d48a42c2af13</id>
<content type='text'>
A fourth class of configuration files (in addition to the
traditional "system wide", "per user in the $HOME directory" and
"per repository in the $GIT_DIR/config") has been introduced so
that different worktrees that share the same repository (hence the
same $GIT_DIR/config file) can use different customization.

* nd/per-worktree-config:
  worktree: add per-worktree config files
  t1300: extract and use test_cmp_config()
</content>
</entry>
<entry>
<title>git-worktree.txt: correct linkgit command name</title>
<updated>2018-11-05T01:22:04Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-03T05:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14f74d59072c7bf0586b15165538373bed898f18'/>
<id>urn:sha1:14f74d59072c7bf0586b15165538373bed898f18</id>
<content type='text'>
Noticed-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ah/doc-updates'</title>
<updated>2018-10-30T06:43:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-10-30T06:43:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=90d228b0d702d105dc2738f49528deb5fdb0e201'/>
<id>urn:sha1:90d228b0d702d105dc2738f49528deb5fdb0e201</id>
<content type='text'>
Doc updates.

* ah/doc-updates:
  doc: fix formatting in git-update-ref
  doc: fix indentation of listing blocks in gitweb.conf.txt
  doc: fix descripion for 'git tag --format'
  doc: fix inappropriate monospace formatting
  doc: fix ASCII art tab spacing
  doc: clarify boundaries of 'git worktree list --porcelain'
</content>
</entry>
<entry>
<title>doc: clarify boundaries of 'git worktree list --porcelain'</title>
<updated>2018-10-23T03:23:08Z</updated>
<author>
<name>Andreas Heiduk</name>
<email>asheiduk@gmail.com</email>
</author>
<published>2018-10-22T20:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e44a44aa25c5ff22334efe0bd4187b96303b00fd'/>
<id>urn:sha1:e44a44aa25c5ff22334efe0bd4187b96303b00fd</id>
<content type='text'>
Defined delimiters for 'git worktree list --porcelain' make the format
easier to parse in scripts. For example

	sed -n '/^worktree ID$/,/^$/p'

extracts only the information for the worktree 'ID'.

The format did not changed since [1], only the guaranty is added.

[1] bb9c03b82a (worktree: add 'list' command, 2015-10-08)

Signed-off-by: Andreas Heiduk &lt;asheiduk@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: new ref types to make per-worktree refs visible to all worktrees</title>
<updated>2018-10-22T04:32:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-10-21T08:08:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a3b9d8cde4ed647b1c56a8097f6db8e269bbc71'/>
<id>urn:sha1:3a3b9d8cde4ed647b1c56a8097f6db8e269bbc71</id>
<content type='text'>
One of the problems with multiple worktree is accessing per-worktree
refs of one worktree from another worktree. This was sort of solved by
multiple ref store, where the code can open the ref store of another
worktree and has access to the ref space of that worktree.

The problem with this is reporting. "HEAD" in another ref space is
also called "HEAD" like in the current ref space. In order to
differentiate them, all the code must somehow carry the ref store
around and print something like "HEAD from this ref store".

But that is not feasible (or possible with a _lot_ of work). With the
current design, we pass a reference around as a string (so called
"refname"). Extending this design to pass a string _and_ a ref store
is a nightmare, especially when handling extended SHA-1 syntax.

So we do it another way. Instead of entering a separate ref space, we
make refs from other worktrees available in the current ref space. So
"HEAD" is always HEAD of the current worktree, but then we can have
"worktrees/blah/HEAD" to denote HEAD from a worktree named
"blah". This syntax coincidentally matches the underlying directory
structure which makes implementation a bit easier.

The main worktree has to be treated specially because well... it's
special from the beginning. So HEAD from the main worktree is
acccessible via the name "main-worktree/HEAD" instead of
"worktrees/main/HEAD" because "main" could be just another secondary
worktree.

This patch also makes it possible to specify refs from one worktree in
another one, e.g.

    git log worktrees/foo/HEAD

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: add per-worktree config files</title>
<updated>2018-10-22T04:17:04Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-10-21T14:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=58b284a2e9123588eedc8c5ee17e8b069d9454f8'/>
<id>urn:sha1:58b284a2e9123588eedc8c5ee17e8b069d9454f8</id>
<content type='text'>
A new repo extension is added, worktreeConfig. When it is present:

 - Repository config reading by default includes $GIT_DIR/config _and_
   $GIT_DIR/config.worktree. "config" file remains shared in multiple
   worktree setup.

 - The special treatment for core.bare and core.worktree, to stay
   effective only in main worktree, is gone. These config settings are
   supposed to be in config.worktree.

This extension is most useful in multiple worktree setup because you
now have an option to store per-worktree config (which is either
.git/config.worktree for main worktree, or
.git/worktrees/xx/config.worktree for linked ones).

This extension can be used in single worktree mode, even though it's
pretty much useless (but this can happen after you remove all linked
worktrees and move back to single worktree).

"git config" reads from both "config" and "config.worktree" by default
(i.e. without either --user, --file...) when this extension is
present. Default writes still go to "config", not "config.worktree". A
new option --worktree is added for that (*).

Since a new repo extension is introduced, existing git binaries should
refuse to access to the repo (both from main and linked worktrees). So
they will not misread the config file (i.e. skip the config.worktree
part). They may still accidentally write to the config file anyway if
they use with "git config --file &lt;path&gt;".

This design places a bet on the assumption that the majority of config
variables are shared so it is the default mode. A safer move would be
default writes go to per-worktree file, so that accidental changes are
isolated.

(*) "git config --worktree" points back to "config" file when this
    extension is not present and there is only one worktree so that it
    works in any both single and multiple worktree setups.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add a place for (not) sharing stuff between worktrees</title>
<updated>2018-10-06T23:21:18Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-09-29T19:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8aff1a9ca5a266020fe5b1bd8c54228581e34530'/>
<id>urn:sha1:8aff1a9ca5a266020fe5b1bd8c54228581e34530</id>
<content type='text'>
When multiple worktrees are used, we need rules to determine if
something belongs to one worktree or all of them. Instead of keeping
adding rules when new stuff comes (*), have a generic rule:

- Inside $GIT_DIR, which is per-worktree by default, add
  $GIT_DIR/common which is always shared. New features that want to
  share stuff should put stuff under this directory.

- Inside refs/, which is shared by default except refs/bisect, add
  refs/worktree/ which is per-worktree. We may eventually move
  refs/bisect to this new location and remove the exception in refs
  code.

(*) And it may also include stuff from external commands which will
    have no way to modify common/per-worktree rules.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>worktree: teach 'remove' to override lock when --force given twice</title>
<updated>2018-08-30T16:28:02Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-08-28T21:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4143101cbb26d189f63f2d29875f4acc07b2730'/>
<id>urn:sha1:f4143101cbb26d189f63f2d29875f4acc07b2730</id>
<content type='text'>
For consistency with "add -f -f" and "move -f -f" which override
the lock on a worktree, allow "remove -f -f" to do so, as well, as a
convenience.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
