<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/setup.c, branch v2.14.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.14.0</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.14.0'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2017-06-24T01:24:34Z</updated>
<entry>
<title>environment: place key repository state in the_repository</title>
<updated>2017-06-24T01:24:34Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-22T18:43:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c14c234f22e0656a61f5718baf155118e6e609c9'/>
<id>urn:sha1:c14c234f22e0656a61f5718baf155118e6e609c9</id>
<content type='text'>
Migrate 'git_dir', 'git_common_dir', 'git_object_dir', 'git_index_file',
'git_graft_file', and 'namespace' to be stored in 'the_repository'.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>setup: add comment indicating a hack</title>
<updated>2017-06-24T01:24:34Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-20T19:19:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7aee274fb4f3eb8d47ec9edce7042f809ce0e579'/>
<id>urn:sha1:7aee274fb4f3eb8d47ec9edce7042f809ce0e579</id>
<content type='text'>
'GIT_TOPLEVEL_PREFIX_ENVIRONMENT' was added in (b58a68c1c setup: allow
for prefix to be passed to git commands) to aid in fixing a bug where
'ls-files' and 'grep' were not able to properly recurse when called from
within a subdirectory.  Add a 'NEEDSWORK' comment indicating that this
envvar should be removed once 'ls-files' and 'grep' can recurse
in-process.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>setup: don't perform lazy initialization of repository state</title>
<updated>2017-06-24T01:24:34Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-20T19:19:32Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=73f192c991016bf88a9416cdf0e949f8b946f7e2'/>
<id>urn:sha1:73f192c991016bf88a9416cdf0e949f8b946f7e2</id>
<content type='text'>
Under some circumstances (bogus GIT_DIR value or the discovered gitdir
is '.git') 'setup_git_directory()' won't initialize key repository
state.  This leads to inconsistent state after running the setup code.
To account for this inconsistent state, lazy initialization is done once
a caller asks for the repository's gitdir or some other piece of
repository state.  This is confusing and can be error prone.

Instead let's tighten the expected outcome of 'setup_git_directory()'
and ensure that it initializes repository state in all cases that would
have been handled by lazy initialization.

This also lets us drop the requirement to have 'have_git_dir()' check if
the environment variable GIT_DIR was set as that will be handled by the
end of the setup code.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'bw/ls-files-sans-the-index' and 'bw/config-h' into bw/repo-object</title>
<updated>2017-06-24T01:24:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-21T22:20:44Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=25bf951381a4880c43a3d1c65e6dce651e61148f'/>
<id>urn:sha1:25bf951381a4880c43a3d1c65e6dce651e61148f</id>
<content type='text'>
* bw/ls-files-sans-the-index:
  ls-files: factor out tag calculation
  ls-files: factor out debug info into a function
  ls-files: convert show_files to take an index
  ls-files: convert show_ce_entry to take an index
  ls-files: convert prune_cache to take an index
  ls-files: convert ce_excluded to take an index
  ls-files: convert show_ru_info to take an index
  ls-files: convert show_other_files to take an index
  ls-files: convert show_killed_files to take an index
  ls-files: convert write_eolinfo to take an index
  ls-files: convert overlay_tree_on_cache to take an index
  tree: convert read_tree to take an index parameter
  convert: convert renormalize_buffer to take an index
  convert: convert convert_to_git to take an index
  convert: convert convert_to_git_filter_fd to take an index
  convert: convert crlf_to_git to take an index
  convert: convert get_cached_convert_stats_ascii to take an index

* bw/config-h:
  config: don't implicitly use gitdir or commondir
  config: respect commondir
  setup: teach discover_git_directory to respect the commondir
  config: don't include config.h by default
  config: remove git_config_iter
  config: create config.h
  alias: use the early config machinery to expand aliases
  t7006: demonstrate a problem with aliases in subdirectories
  t1308: relax the test verifying that empty alias values are disallowed
  help: use early config when autocorrecting aliases
  config: report correct line number upon error
  discover_git_directory(): avoid setting invalid git_dir
</content>
</entry>
<entry>
<title>Merge branch 'jk/pathspec-magic-disambiguation'</title>
<updated>2017-06-19T19:38:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-19T19:38:42Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=32e0da583f70fe1406268217befd61e3f515505f'/>
<id>urn:sha1:32e0da583f70fe1406268217befd61e3f515505f</id>
<content type='text'>
The convention for a command line is to follow "git cmdname
--options" with revisions followed by an optional "--"
disambiguator and then finally pathspecs.  When "--" is not there,
we make sure early ones are all interpretable as revs (and do not
look like paths) and later ones are the other way around.  A
pathspec with "magic" (e.g. ":/p/a/t/h" that matches p/a/t/h from
the top-level of the working tree, no matter what subdirectory you
are working from) are conservatively judged as "not a path", which
required disambiguation more often.  The command line parser
learned to say "it's a pathspec" a bit more often when the syntax
looks like so.

* jk/pathspec-magic-disambiguation:
  verify_filename(): flip order of checks
  verify_filename(): treat ":(magic)" as a pathspec
  check_filename(): handle ":^" path magic
  check_filename(): use skip_prefix
  check_filename(): refactor ":/" handling
  t4208: add check for ":/" without matching file
</content>
</entry>
<entry>
<title>setup: teach discover_git_directory to respect the commondir</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:37Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d3fb71b3cb36971608a46744261e6b5f8802e784'/>
<id>urn:sha1:d3fb71b3cb36971608a46744261e6b5f8802e784</id>
<content type='text'>
Currently 'discover_git_directory' only looks at the gitdir to determine
if a git directory was discovered.  This causes a problem in the event
that the gitdir which was discovered was in fact a per-worktree git
directory and not the common git directory.  This is because the
repository config, which is checked to verify the repository's format,
is stored in the commondir and not in the per-worktree gitdir.  Correct
this behavior by checking the config stored in the commondir.

It will also be of use for callers to have access to the commondir, so
lets also return that upon successfully discovering a git directory.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: don't include config.h by default</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b2141fc1d20e659810245ec6ca1c143c60e033ec'/>
<id>urn:sha1:b2141fc1d20e659810245ec6ca1c143c60e033ec</id>
<content type='text'>
Stop including config.h by default in cache.h.  Instead only include
config.h in those files which require use of the config system.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>discover_git_directory(): avoid setting invalid git_dir</title>
<updated>2017-06-15T19:31:43Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-06-14T11:35:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=69743f9b4f8411853e347fbd392221552b43fd12'/>
<id>urn:sha1:69743f9b4f8411853e347fbd392221552b43fd12</id>
<content type='text'>
When discovering a .git/ directory, we take pains to ensure that its
repository format version matches Git's expectations, and we return NULL
otherwise.

However, we still appended the invalid path to the strbuf passed as
argument.

Let's just reset the strbuf to the state before we appended the .git/
directory that was eventually rejected.

There is another early return path in that function, when
setup_git_directory_gently_1() returns GIT_DIR_NONE or an error. In that
case, the gitdir parameter has not been touched, therefore there is no
need for an equivalent change in that code path.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Reviewed-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 'jc/noent-notdir'</title>
<updated>2017-06-13T20:47:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-13T20:47:06Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=93dd544f54ea596e9d70d06c100123c10689861c'/>
<id>urn:sha1:93dd544f54ea596e9d70d06c100123c10689861c</id>
<content type='text'>
Our code often opens a path to an optional file, to work on its
contents when we can successfully open it.  We can ignore a failure
to open if such an optional file does not exist, but we do want to
report a failure in opening for other reasons (e.g. we got an I/O
error, or the file is there, but we lack the permission to open).

The exact errors we need to ignore are ENOENT (obviously) and
ENOTDIR (less obvious).  Instead of repeating comparison of errno
with these two constants, introduce a helper function to do so.

* jc/noent-notdir:
  treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checked
  compat-util: is_missing_file_error()
</content>
</entry>
<entry>
<title>treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checked</title>
<updated>2017-05-30T00:29:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-05-30T00:23:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c7054209d65db430bdbcb2243288e63cea3e417c'/>
<id>urn:sha1:c7054209d65db430bdbcb2243288e63cea3e417c</id>
<content type='text'>
Using the is_missing_file_error() helper introduced in the previous
step, update all hits from

  $ git grep -e ENOENT --and -e ENOTDIR

There are codepaths that only check ENOENT, and it is possible that
some of them should be checking both.  Updating them is kept out of
this step deliberately, as we do not want to change behaviour in this
step.

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