<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/setup.c, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-06T10:06:13Z</updated>
<entry>
<title>Replace all die("BUG: ...") calls by BUG() ones</title>
<updated>2018-05-06T10:06:13Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2018-05-02T09:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=033abf97fcbc247eabf915780181d947cfb66205'/>
<id>urn:sha1:033abf97fcbc247eabf915780181d947cfb66205</id>
<content type='text'>
In d8193743e08 (usage.c: add BUG() function, 2017-05-12), a new macro
was introduced to use for reporting bugs instead of die(). It was then
subsequently used to convert one single caller in 588a538ae55
(setup_git_env: convert die("BUG") to BUG(), 2017-05-12).

The cover letter of the patch series containing this patch
(cf 20170513032414.mfrwabt4hovujde2@sigill.intra.peff.net) is not
terribly clear why only one call site was converted, or what the plan
is for other, similar calls to die() to report bugs.

Let's just convert all remaining ones in one fell swoop.

This trick was performed by this invocation:

	sed -i 's/die("BUG: /BUG("/g' $(git grep -l 'die("BUG' \*.c)

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/relative-directory-fix'</title>
<updated>2018-04-25T04:28:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-25T04:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff6eb825f0aa1f45230c10fbb0cf8d484c927c55'/>
<id>urn:sha1:ff6eb825f0aa1f45230c10fbb0cf8d484c927c55</id>
<content type='text'>
Some codepaths, including the refs API, get and keep relative
paths, that go out of sync when the process does chdir(2).  The
chdir-notify API is introduced to let these codepaths adjust these
cached paths to the new current directory.

* jk/relative-directory-fix:
  refs: use chdir_notify to update cached relative paths
  set_work_tree: use chdir_notify
  add chdir-notify API
  trace.c: export trace_setup_key
  set_git_dir: die when setenv() fails
</content>
</entry>
<entry>
<title>Merge branch 'nd/remove-ignore-env-field'</title>
<updated>2018-04-10T07:28:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-10T07:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0873c393c750d32a111ee66ab4ca4d7d21bee0ba'/>
<id>urn:sha1:0873c393c750d32a111ee66ab4ca4d7d21bee0ba</id>
<content type='text'>
Code clean-up for the "repository" abstraction.

* nd/remove-ignore-env-field:
  repository.h: add comment and clarify repo_set_gitdir
  repository: delete ignore_env member
  sha1_file.c: move delayed getenv(altdb) back to setup_git_env()
  repository.c: delete dead functions
  repository.c: move env-related setup code back to environment.c
  repository: initialize the_repository in main()
</content>
</entry>
<entry>
<title>set_work_tree: use chdir_notify</title>
<updated>2018-03-30T19:49:57Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2018-03-30T18:35:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8500e0de3fe2e33ba503d432a4a5301ce2fb60fa'/>
<id>urn:sha1:8500e0de3fe2e33ba503d432a4a5301ce2fb60fa</id>
<content type='text'>
When we change to the top of the working tree, we manually
re-adjust $GIT_DIR and call set_git_dir() again, in order to
update any relative git-dir we'd compute earlier.

Instead of the work-tree code having to know to call the
git-dir code, let's use the new chdir_notify interface.
There are two spots that need updating, with a few
subtleties in each:

  1. the set_git_dir() code needs to chdir_notify_register()
     so it can be told when to update its path.

     Technically we could push this down into repo_set_gitdir(),
     so that even repository structs besides the_repository
     could benefit from this. But that opens up a lot of
     complications:

      - we'd still need to touch set_git_dir(), because it
        does some other setup (like setting $GIT_DIR in the
        environment)

      - submodules using other repository structs get
        cleaned up, which means we'd need to remove them
        from the chdir_notify list

      - it's unlikely to fix any bugs, since we shouldn't
        generally chdir() in the middle of working on a
        submodule

  2. setup_work_tree now needs to call chdir_notify(), and
     can lose its manual set_git_dir() call.

     Note that at first glance it looks like this undoes the
     absolute-to-relative optimization added by 044bbbcb63
     (Make git_dir a path relative to work_tree in
     setup_work_tree(), 2008-06-19). But for the most part
     that optimization was just _undoing_ the
     relative-to-absolute conversion which the function was
     doing earlier (and which is now gone).

     It is true that if you already have an absolute git_dir
     that the setup_work_tree() function will no longer make
     it relative as a side effect. But:

       - we generally do have relative git-dir's due to the
         way the discovery code works

       - if we really care about making git-dir's relative
         when possible, then we should be relativizing them
         earlier (e.g., when we see an absolute $GIT_DIR we
         could turn it relative, whether we are going to
         chdir into a worktree or not). That would cover all
         cases, including ones that 044bbbcb63 did not.

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>repository.c: move env-related setup code back to environment.c</title>
<updated>2018-03-05T19:14:03Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-03-03T11:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=357a03ebe9e04329705a46ff36d526c5ab0c3ebc'/>
<id>urn:sha1:357a03ebe9e04329705a46ff36d526c5ab0c3ebc</id>
<content type='text'>
It does not make sense that generic repository code contains handling
of environment variables, which are specific for the main repository
only. Refactor repo_set_gitdir() function to take $GIT_DIR and
optionally _all_ other customizable paths. These optional paths can be
NULL and will be calculated according to the default directory layout.

Note that some dead functions are left behind to reduce diff
noise. They will be deleted in the next patch.

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 'as/ll-i18n'</title>
<updated>2018-02-27T18:33:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-02-27T18:33:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d4053966ea71a9f6460419fd68db912bda91ff85'/>
<id>urn:sha1:d4053966ea71a9f6460419fd68db912bda91ff85</id>
<content type='text'>
Some messages in low level start-up codepath have been i18n-ized.

* as/ll-i18n:
  Mark messages for translations
</content>
</entry>
<entry>
<title>Merge branch 'jh/fsck-promisors'</title>
<updated>2018-02-13T21:39:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-02-13T21:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3d618d2bf4099abe99babc8b56dcd483c5eec71'/>
<id>urn:sha1:f3d618d2bf4099abe99babc8b56dcd483c5eec71</id>
<content type='text'>
In preparation for implementing narrow/partial clone, the machinery
for checking object connectivity used by gc and fsck has been
taught that a missing object is OK when it is referenced by a
packfile specially marked as coming from trusted repository that
promises to make them available on-demand and lazily.

* jh/fsck-promisors:
  gc: do not repack promisor packfiles
  rev-list: support termination at promisor objects
  sha1_file: support lazily fetching missing objects
  introduce fetch-object: fetch one promisor object
  index-pack: refactor writing of .keep files
  fsck: support promisor objects as CLI argument
  fsck: support referenced promisor objects
  fsck: support refs pointing to promisor objects
  fsck: introduce partialclone extension
  extension.partialclone: introduce partial clone extension
</content>
</entry>
<entry>
<title>Mark messages for translations</title>
<updated>2018-02-13T18:59:58Z</updated>
<author>
<name>Alexander Shopov</name>
<email>ash@kambanaria.org</email>
</author>
<published>2018-02-13T13:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc045fe7d4fa220f19274715c936636fe0516ea3'/>
<id>urn:sha1:fc045fe7d4fa220f19274715c936636fe0516ea3</id>
<content type='text'>
Small changes in messages to fit the style and typography of rest.
Reuse already translated messages if possible.
Do not translate messages aimed at developers of git.
Fix unit tests depending on the original string.
Use `test_i18ngrep` for tests with translatable strings.
Change and verify rest of tests via `make GETTEXT_POISON=1 test`.

Signed-off-by: Alexander Shopov &lt;ash@kambanaria.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sg/setup-doc-update'</title>
<updated>2017-12-19T19:33:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-12-19T19:33:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bdae4af87053490adad2dc9fb184d6d050d46a4c'/>
<id>urn:sha1:bdae4af87053490adad2dc9fb184d6d050d46a4c</id>
<content type='text'>
Comment update.

* sg/setup-doc-update:
  setup.c: fix comment about order of .git directory discovery
</content>
</entry>
<entry>
<title>setup.c: fix comment about order of .git directory discovery</title>
<updated>2017-12-07T16:09:06Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-07T08:59:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=176b2d328ccc305aa2e565c39ad7b0fb24099275'/>
<id>urn:sha1:176b2d328ccc305aa2e565c39ad7b0fb24099275</id>
<content type='text'>
Since gitfiles were introduced in b44ebb19e (Add platform-independent
.git "symlink", 2008-02-20) the order of checks during .git directory
discovery is: gitfile, gitdir, bare repo.  However, that commit did
only partially update the in-code comment describing this order,
missing the last line which still puts gitdir before gitfile.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
