<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/setup.c, branch v1.7.9.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.7.9.7</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.7.9.7'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2012-02-03T00:41:55Z</updated>
<entry>
<title>standardize and improve lookup rules for external local repos</title>
<updated>2012-02-03T00:41:55Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-02-02T21:59:13Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b3256eb8b35937192e85725d0c2bcb422295790c'/>
<id>urn:sha1:b3256eb8b35937192e85725d0c2bcb422295790c</id>
<content type='text'>
When you specify a local repository on the command line of
clone, ls-remote, upload-pack, receive-pack, or upload-archive,
or in a request to git-daemon, we perform a little bit of
lookup magic, doing things like looking in working trees for
.git directories and appending ".git" for bare repos.

For clone, this magic happens in get_repo_path. For
everything else, it happens in enter_repo. In both cases,
there are some ambiguous or confusing cases that aren't
handled well, and there is one case that is not handled the
same by both methods.

This patch tries to provide (and test!) standard, sensible
lookup rules for both code paths. The intended changes are:

  1. When looking up "foo", we have always preferred
     a working tree "foo" (containing "foo/.git" over the
     bare "foo.git". But we did not prefer a bare "foo" over
     "foo.git". With this patch, we do so.

  2. We would select directories that existed but didn't
     actually look like git repositories. With this patch,
     we make sure a selected directory looks like a git
     repo. Not only is this more sensible in general, but it
     will help anybody who is negatively affected by change
     (1) negatively (e.g., if they had "foo.git" next to its
     separate work tree "foo", and expect to keep finding
     "foo.git" when they reference "foo").

  3. The enter_repo code path would, given "foo", look for
     "foo.git/.git" (i.e., do the ".git" append magic even
     for a repo with working tree). The clone code path did
     not; with this patch, they now behave the same.

In the unlikely case of a working tree overlaying a bare
repo (i.e., a ".git" directory _inside_ a bare repo), we
continue to treat it as a working tree (prefering the
"inner" .git over the bare repo). This is mainly because the
combination seems nonsensical, and I'd rather stick with
existing behavior on the off chance that somebody is relying
on it.

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 'cb/common-prefix-unification'</title>
<updated>2011-10-10T22:56:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-10T22:56:17Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ca3ef81ad78dcbaecd2bf03e22a5bb9d1fa5eff4'/>
<id>urn:sha1:ca3ef81ad78dcbaecd2bf03e22a5bb9d1fa5eff4</id>
<content type='text'>
* cb/common-prefix-unification:
  rename pathspec_prefix() to common_prefix() and move to dir.[ch]
  consolidate pathspec_prefix and common_prefix
  remove prefix argument from pathspec_prefix
</content>
</entry>
<entry>
<title>Merge branch 'fg/submodule-git-file-git-dir'</title>
<updated>2011-10-10T22:56:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-10T22:56:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=efc5fb6a77780c53c6636326ca82ff87b17e4c5f'/>
<id>urn:sha1:efc5fb6a77780c53c6636326ca82ff87b17e4c5f</id>
<content type='text'>
* fg/submodule-git-file-git-dir:
  Move git-dir for submodules
  rev-parse: add option --resolve-git-dir &lt;path&gt;

Conflicts:
	cache.h
	git-submodule.sh
</content>
</entry>
<entry>
<title>rename pathspec_prefix() to common_prefix() and move to dir.[ch]</title>
<updated>2011-09-12T21:38:32Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2011-09-04T10:42:01Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f950eb956092831730182daa7160eaa352277fa9'/>
<id>urn:sha1:f950eb956092831730182daa7160eaa352277fa9</id>
<content type='text'>
Also make common_prefix_len() static as this refactoring makes dir.c
itself the only caller of this helper function.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>consolidate pathspec_prefix and common_prefix</title>
<updated>2011-09-06T19:54:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-09-06T19:32:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4a085b16f430bcfe1b6e2e84e7a569f4e191e906'/>
<id>urn:sha1:4a085b16f430bcfe1b6e2e84e7a569f4e191e906</id>
<content type='text'>
The implementation from pathspec_prefix (slightly modified) replaces the
current common_prefix, because it also respects glob characters.

Based on a patch by Clemens Buchacher.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remove prefix argument from pathspec_prefix</title>
<updated>2011-09-06T19:50:10Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2011-09-04T10:41:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5879f5684cfe8a38326b4ffd078f96e35c68e640'/>
<id>urn:sha1:5879f5684cfe8a38326b4ffd078f96e35c68e640</id>
<content type='text'>
Passing a prefix to a function that is supposed to find the prefix is
strange. And it's really only used if the pathspec is NULL. Make the
callers handle this case instead.

As we are always returning a fresh copy of a string (or NULL), change the
type of the returned value to non-const "char *".

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/maint-clone-gitdir'</title>
<updated>2011-08-29T04:20:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-29T04:20:28Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2730f55527143d3476c159cebbdb63d5e6a5c2a8'/>
<id>urn:sha1:2730f55527143d3476c159cebbdb63d5e6a5c2a8</id>
<content type='text'>
* nd/maint-clone-gitdir:
  clone: allow to clone from .git file
  read_gitfile_gently(): rename misnamed function to read_gitfile()
</content>
</entry>
<entry>
<title>Merge branch 'di/parse-options-split'</title>
<updated>2011-08-25T23:00:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-25T23:00:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e11fa9a460b51947c3ef28be84346a1e90d027ca'/>
<id>urn:sha1:e11fa9a460b51947c3ef28be84346a1e90d027ca</id>
<content type='text'>
* di/parse-options-split:
  Reduce parse-options.o dependencies
  parse-options: export opterr, optbug
</content>
</entry>
<entry>
<title>read_gitfile_gently(): rename misnamed function to read_gitfile()</title>
<updated>2011-08-22T21:04:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-22T21:04:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=13d6ec913330ba90fb1a67ec5789e437f8ac4193'/>
<id>urn:sha1:13d6ec913330ba90fb1a67ec5789e437f8ac4193</id>
<content type='text'>
The function was not gentle at all to the callers and died without giving
them a chance to deal with possible errors. Rename it to read_gitfile(),
and update all the callers.

As no existing caller needs a true "gently" variant, we do not bother
adding one at this point.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rev-parse: add option --resolve-git-dir &lt;path&gt;</title>
<updated>2011-08-16T18:04:31Z</updated>
<author>
<name>Fredrik Gustafsson</name>
<email>iveqy@iveqy.com</email>
</author>
<published>2011-08-15T21:17:46Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=abc06822af57347d35c0cd64b67e1faeb5b65c71'/>
<id>urn:sha1:abc06822af57347d35c0cd64b67e1faeb5b65c71</id>
<content type='text'>
Check if &lt;path&gt; is a valid git-dir or a valid git-file that points
to a valid git-dir.

We want tests to be independent from the fact that a git-dir may
be a git-file. Thus we changed tests to use this feature.

Signed-off-by: Fredrik Gustafsson &lt;iveqy@iveqy.com&gt;
Mentored-by: Jens Lehmann &lt;Jens.Lehmann@web.de&gt;
Mentored-by: Heiko Voigt &lt;hvoigt@hvoigt.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
