<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/path.c, branch v2.22.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.22.1</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.22.1'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2019-04-09T17:14:23Z</updated>
<entry>
<title>Merge branch 'nd/rewritten-ref-is-per-worktree'</title>
<updated>2019-04-09T17:14:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-09T17:14:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=917f2cd1c2396c694ae956a1a26d9c92bf50b847'/>
<id>urn:sha1:917f2cd1c2396c694ae956a1a26d9c92bf50b847</id>
<content type='text'>
"git rebase" uses the refs/rewritten/ hierarchy to store its
intermediate states, which inherently makes the hierarchy per
worktree, but it didn't quite work well.

* nd/rewritten-ref-is-per-worktree:
  Make sure refs/rewritten/ is per-worktree
  files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()
  files-backend.c: factor out per-worktree code in loose_fill_ref_dir()
</content>
</entry>
<entry>
<title>Make sure refs/rewritten/ is per-worktree</title>
<updated>2019-03-08T02:57:47Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-03-07T12:29:17Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b9317d55a37f93c47d48f12a7b3e45a71434d0e7'/>
<id>urn:sha1:b9317d55a37f93c47d48f12a7b3e45a71434d0e7</id>
<content type='text'>
a9be29c981 (sequencer: make refs generated by the `label` command
worktree-local, 2018-04-25) adds refs/rewritten/ as per-worktree
reference space. Unfortunately (my bad) there are a couple places that
need update to make sure it's really per-worktree.

 - add_per_worktree_entries_to_dir() is updated to make sure ref listing
   look at per-worktree refs/rewritten/ instead of per-repo one [1]

 - common_list[] is updated so that git_path() returns the correct
   location. This includes "rev-parse --git-path".

This mess is created by me. I started trying to fix it with the
introduction of refs/worktree, where all refs will be per-worktree
without special treatments. Unfortunate refs/rewritten came before
refs/worktree so this is all we can do.

This also fixes logs/refs/worktree not being per-worktree.

[1] note that ref listing still works sometimes. For example, if you
    have .git/worktrees/foo/refs/rewritten/bar AND the directory
    .git/worktrees/refs/rewritten, refs/rewritten/bar will show up.
    add_per_worktree_entries_to_dir() is only needed when the directory
    .git/worktrees/refs/rewritten is missing.

Reported-by: Phillip Wood &lt;phillip.wood123@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 'jk/loose-object-cache'</title>
<updated>2019-01-04T21:33:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-01-04T21:33:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3b2f8a02fa9a9e68d5215828e1d97bb4f6996976'/>
<id>urn:sha1:3b2f8a02fa9a9e68d5215828e1d97bb4f6996976</id>
<content type='text'>
Code clean-up with optimization for the codepath that checks
(non-)existence of loose objects.

* jk/loose-object-cache:
  odb_load_loose_cache: fix strbuf leak
  fetch-pack: drop custom loose object cache
  sha1-file: use loose object cache for quick existence check
  object-store: provide helpers for loose_objects_cache
  sha1-file: use an object_directory for the main object dir
  handle alternates paths the same as the main object dir
  sha1_file_name(): overwrite buffer instead of appending
  rename "alternate_object_database" to "object_directory"
  submodule--helper: prefer strip_suffix() to ends_with()
  fsck: do not reuse child_process structs
</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://www.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>sha1-file: use an object_directory for the main object dir</title>
<updated>2018-11-13T05:22:03Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-11-12T14:50:39Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f0eaf638195a6510254b075026dcad955b8b607d'/>
<id>urn:sha1:f0eaf638195a6510254b075026dcad955b8b607d</id>
<content type='text'>
Our handling of alternate object directories is needlessly different
from the main object directory. As a result, many places in the code
basically look like this:

  do_something(r-&gt;objects-&gt;objdir);

  for (odb = r-&gt;objects-&gt;alt_odb_list; odb; odb = odb-&gt;next)
        do_something(odb-&gt;path);

That gets annoying when do_something() is non-trivial, and we've
resorted to gross hacks like creating fake alternates (see
find_short_object_filename()).

Instead, let's give each raw_object_store a unified list of
object_directory structs. The first will be the main store, and
everything after is an alternate. Very few callers even care about the
distinction, and can just loop over the whole list (and those who care
can just treat the first element differently).

A few observations:

  - we don't need r-&gt;objects-&gt;objectdir anymore, and can just
    mechanically convert that to r-&gt;objects-&gt;odb-&gt;path

  - object_directory's path field needs to become a real pointer rather
    than a FLEX_ARRAY, in order to fill it with expand_base_dir()

  - we'll call prepare_alt_odb() earlier in many functions (i.e.,
    outside of the loop). This may result in us calling it even when our
    function would be satisfied looking only at the main odb.

    But this doesn't matter in practice. It's not a very expensive
    operation in the first place, and in the majority of cases it will
    be a noop. We call it already (and cache its results) in
    prepare_packed_git(), and we'll generally check packs before loose
    objects. So essentially every program is going to call it
    immediately once per program.

    Arguably we should just prepare_alt_odb() immediately upon setting
    up the repository's object directory, which would save us sprinkling
    calls throughout the code base (and forgetting to do so has been a
    source of subtle bugs in the past). But I've stopped short of that
    here, since there are already a lot of other moving parts in this
    patch.

  - Most call sites just get shorter. The check_and_freshen() functions
    are an exception, because they have entry points to handle local and
    nonlocal directories separately.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/char-may-be-unsigned'</title>
<updated>2018-11-06T06:50:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-11-06T06:50:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1f8e7dc4da901c33b52ea632ab651838abfb4864'/>
<id>urn:sha1:1f8e7dc4da901c33b52ea632ab651838abfb4864</id>
<content type='text'>
Build portability fix.

* tb/char-may-be-unsigned:
  path.c: char is not (always) signed
</content>
</entry>
<entry>
<title>path.c: char is not (always) signed</title>
<updated>2018-10-26T02:20:01Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2018-10-25T16:13:08Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3063477445423fd5ec52efa073fb8d15c1641f4e'/>
<id>urn:sha1:3063477445423fd5ec52efa073fb8d15c1641f4e</id>
<content type='text'>
If a "char" in C is signed or unsigned is not specified, because it is
out of tradition "implementation dependent".
Therefore constructs like "if (name[i] &lt; 0)" are not portable,
use "if (name[i] &amp; 0x80)" instead.

Detected by "gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516" when
setting
DEVELOPER = 1
DEVOPTS = extra-all

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&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://www.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>Merge branch 'sb/object-store-grafts'</title>
<updated>2018-07-18T19:20:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-07-18T19:20:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=00624d608cc69bd62801c93e74d1ea7a7ddd6598'/>
<id>urn:sha1:00624d608cc69bd62801c93e74d1ea7a7ddd6598</id>
<content type='text'>
The conversion to pass "the_repository" and then "a_repository"
throughout the object access API continues.

* sb/object-store-grafts:
  commit: allow lookup_commit_graft to handle arbitrary repositories
  commit: allow prepare_commit_graft to handle arbitrary repositories
  shallow: migrate shallow information into the object parser
  path.c: migrate global git_path_* to take a repository argument
  cache: convert get_graft_file to handle arbitrary repositories
  commit: convert read_graft_file to handle arbitrary repositories
  commit: convert register_commit_graft to handle arbitrary repositories
  commit: convert commit_graft_pos() to handle arbitrary repositories
  shallow: add repository argument to is_repository_shallow
  shallow: add repository argument to check_shallow_file_for_update
  shallow: add repository argument to register_shallow
  shallow: add repository argument to set_alternate_shallow_file
  commit: add repository argument to lookup_commit_graft
  commit: add repository argument to prepare_commit_graft
  commit: add repository argument to read_graft_file
  commit: add repository argument to register_commit_graft
  commit: add repository argument to commit_graft_pos
  object: move grafts to object parser
  object-store: move object access functions to object-store.h
</content>
</entry>
<entry>
<title>Sync with Git 2.17.1</title>
<updated>2018-05-29T08:10:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-29T08:09:58Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7913f53b5628997165e075008d6142da1c04271a'/>
<id>urn:sha1:7913f53b5628997165e075008d6142da1c04271a</id>
<content type='text'>
* maint: (25 commits)
  Git 2.17.1
  Git 2.16.4
  Git 2.15.2
  Git 2.14.4
  Git 2.13.7
  fsck: complain when .gitmodules is a symlink
  index-pack: check .gitmodules files with --strict
  unpack-objects: call fsck_finish() after fscking objects
  fsck: call fsck_finish() after fscking objects
  fsck: check .gitmodules content
  fsck: handle promisor objects in .gitmodules check
  fsck: detect gitmodules files
  fsck: actually fsck blob data
  fsck: simplify ".git" check
  index-pack: make fsck error message more specific
  verify_path: disallow symlinks in .gitmodules
  update-index: stat updated files earlier
  verify_dotfile: mention case-insensitivity in comment
  verify_path: drop clever fallthrough
  skip_prefix: add case-insensitive variant
  ...
</content>
</entry>
</feed>
