<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/path.c, branch v2.12.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.12.3</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.12.3'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2016-12-19T22:45:37Z</updated>
<entry>
<title>Merge branch 'js/normalize-path-copy-ceil'</title>
<updated>2016-12-19T22:45:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-12-19T22:45:37Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=4833b7ec2597e65285b4d35337db48f441e9b9d7'/>
<id>urn:sha1:4833b7ec2597e65285b4d35337db48f441e9b9d7</id>
<content type='text'>
A pathname that begins with "//" or "\\" on Windows is special but
path normalization logic was unaware of it.

* js/normalize-path-copy-ceil:
  normalize_path_copy(): fix pushing to //server/share/dir on Windows
</content>
</entry>
<entry>
<title>normalize_path_copy(): fix pushing to //server/share/dir on Windows</title>
<updated>2016-12-16T21:10:43Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2016-12-14T19:37:38Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7814fbe3f1e7cea1a675408df7b5dd1f5be731cc'/>
<id>urn:sha1:7814fbe3f1e7cea1a675408df7b5dd1f5be731cc</id>
<content type='text'>
normalize_path_copy() is not prepared to keep the double-slash of a
//server/share/dir kind of path, but treats it like a regular POSIX
style path and transforms it to /server/share/dir.

The bug manifests when 'git push //server/share/dir master' is run,
because tmp_objdir_add_as_alternate() uses the path in normalized
form when it registers the quarantine object database via
link_alt_odb_entries(). Needless to say that the directory cannot be
accessed using the wrongly normalized path.

Fix it by skipping all of the root part, not just a potential drive
prefix. offset_1st_component takes care of this, see the
implementation in compat/mingw.c::mingw_offset_1st_component().

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/ring-buffer-wraparound'</title>
<updated>2016-10-27T21:58:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-27T21:58:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=00d7cc0c0b324b1b1c75b97d05423a2dc3af70cf'/>
<id>urn:sha1:00d7cc0c0b324b1b1c75b97d05423a2dc3af70cf</id>
<content type='text'>
The code that we have used for the past 10+ years to cycle
4-element ring buffers turns out to be not quite portable in
theoretical world.

* rs/ring-buffer-wraparound:
  hex: make wraparound of the index into ring-buffer explicit
</content>
</entry>
<entry>
<title>hex: make wraparound of the index into ring-buffer explicit</title>
<updated>2016-10-26T17:54:11Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-10-23T17:57:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=bb84735c80dbae6408b79b56f574ae672d2232d4'/>
<id>urn:sha1:bb84735c80dbae6408b79b56f574ae672d2232d4</id>
<content type='text'>
Overflow is defined for unsigned integers, but not for signed ones.

We could make the ring-buffer index in sha1_to_hex() and
get_pathname() unsigned to be on the safe side to resolve this, but
let's make it explicit that we are wrapping around at whatever the
number of elements the ring-buffer has.  The compiler is smart enough
to turn modulus into bitmask for these codepaths that use
ring-buffers of a size that is a power of 2.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/diff-submodule-diff-inline'</title>
<updated>2016-09-12T22:34:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-12T22:34:31Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=305d7f133956a5f43c94d938beabbfbb0ac1753c'/>
<id>urn:sha1:305d7f133956a5f43c94d938beabbfbb0ac1753c</id>
<content type='text'>
The "git diff --submodule={short,log}" mechanism has been enhanced
to allow "--submodule=diff" to show the patch between the submodule
commits bound to the superproject.

* jk/diff-submodule-diff-inline:
  diff: teach diff to display submodule difference with an inline diff
  submodule: refactor show_submodule_summary with helper function
  submodule: convert show_submodule_summary to use struct object_id *
  allow do_submodule_path to work even if submodule isn't checked out
  diff: prepare for additional submodule formats
  graph: add support for --line-prefix on all graph-aware output
  diff.c: remove output_prefix_length field
  cache: add empty_tree_oid object and helper function
</content>
</entry>
<entry>
<title>allow do_submodule_path to work even if submodule isn't checked out</title>
<updated>2016-09-01T01:07:10Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.keller@gmail.com</email>
</author>
<published>2016-08-31T23:27:22Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=99b43a61f2daf5fe183056e5bf2a75a8a81a28bf'/>
<id>urn:sha1:99b43a61f2daf5fe183056e5bf2a75a8a81a28bf</id>
<content type='text'>
Currently, do_submodule_path will attempt locating the .git directory by
using read_gitfile on &lt;path&gt;/.git. If this fails it just assumes the
&lt;path&gt;/.git is actually a git directory.

This is good because it allows for handling submodules which were cloned
in a regular manner first before being added to the superproject.

Unfortunately this fails if the &lt;path&gt; is not actually checked out any
longer, such as by removing the directory.

Fix this by checking if the directory we found is actually a gitdir. In
the case it is not, attempt to lookup the submodule configuration and
find the name of where it is stored in the .git/modules/ directory of
the superproject.

If we can't locate the submodule configuration, this might occur because
for example a submodule gitlink was added but the corresponding
.gitmodules file was not properly updated.  A die() here would not be
pleasant to the users of submodule diff formats, so instead, modify
do_submodule_path() to return an error code:

 - git_pathdup_submodule() returns NULL when we fail to find a path.
 - strbuf_git_path_submodule() propagates the error code to the caller.

Modify the callers of these functions to check the error code and fail
properly. This ensures we don't attempt to use a bad path that doesn't
match the corresponding submodule.

Because this change fixes add_submodule_odb() to work even if the
submodule is not checked out, update the wording of the submodule log
diff format to correctly display that the submodule is "not initialized"
instead of "not checked out"

Add tests to ensure this change works as expected.

Signed-off-by: Jacob Keller &lt;jacob.keller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/hooks'</title>
<updated>2016-08-19T22:34:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-19T22:34:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d05d0e99665ecb67c3e8b9b3be40b12e9052a8b8'/>
<id>urn:sha1:d05d0e99665ecb67c3e8b9b3be40b12e9052a8b8</id>
<content type='text'>
"git rev-parse --git-path hooks/&lt;hook&gt;" learned to take
core.hooksPath configuration variable (introduced during 2.9 cycle)
into account.

* ab/hooks:
  rev-parse: respect core.hooksPath in --git-path
</content>
</entry>
<entry>
<title>rev-parse: respect core.hooksPath in --git-path</title>
<updated>2016-08-16T19:03:26Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-08-16T13:14:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9445b4921e3e996b2d38d58c594f95d63a72dcea'/>
<id>urn:sha1:9445b4921e3e996b2d38d58c594f95d63a72dcea</id>
<content type='text'>
The idea of the --git-path option is not only to avoid having to
prefix paths with the output of --git-dir all the time, but also to
respect overrides for specific common paths inside the .git directory
(e.g. `git rev-parse --git-path objects` will report the value of the
environment variable GIT_OBJECT_DIRECTORY, if set).

When introducing the core.hooksPath setting, we forgot to adjust
git_path() accordingly. This patch fixes that.

While at it, revert the special-casing of core.hooksPath in
run-command.c, as it is now no longer needed.

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 'rs/use-strbuf-addbuf' into maint</title>
<updated>2016-08-08T21:21:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-08T21:21:42Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=48aa37ed4266e75340abd3232860d6d14a30c774'/>
<id>urn:sha1:48aa37ed4266e75340abd3232860d6d14a30c774</id>
<content type='text'>
Code cleanup.

* rs/use-strbuf-addbuf:
  strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf()
  use strbuf_addbuf() for appending a strbuf to another
</content>
</entry>
<entry>
<title>Merge branch 'rs/use-strbuf-addbuf'</title>
<updated>2016-07-25T21:13:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-25T21:13:47Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b4e8a847ba4e775fb7d422b2daf18356db50eec8'/>
<id>urn:sha1:b4e8a847ba4e775fb7d422b2daf18356db50eec8</id>
<content type='text'>
Code cleanup.

* rs/use-strbuf-addbuf:
  strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf()
  use strbuf_addbuf() for appending a strbuf to another
</content>
</entry>
</feed>
