<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-compat-util.h, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-04-25T20:56:20Z</updated>
<entry>
<title>Merge branch 'en/header-split-cache-h'</title>
<updated>2023-04-25T20:56:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-04-25T20:56:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0807e57807aaffe2813fffb7704dcc9153f03832'/>
<id>urn:sha1:0807e57807aaffe2813fffb7704dcc9153f03832</id>
<content type='text'>
Header clean-up.

* en/header-split-cache-h: (24 commits)
  protocol.h: move definition of DEFAULT_GIT_PORT from cache.h
  mailmap, quote: move declarations of global vars to correct unit
  treewide: reduce includes of cache.h in other headers
  treewide: remove double forward declaration of read_in_full
  cache.h: remove unnecessary includes
  treewide: remove cache.h inclusion due to pager.h changes
  pager.h: move declarations for pager.c functions from cache.h
  treewide: remove cache.h inclusion due to editor.h changes
  editor: move editor-related functions and declarations into common file
  treewide: remove cache.h inclusion due to object.h changes
  object.h: move some inline functions and defines from cache.h
  treewide: remove cache.h inclusion due to object-file.h changes
  object-file.h: move declarations for object-file.c functions from cache.h
  treewide: remove cache.h inclusion due to git-zlib changes
  git-zlib: move declarations for git-zlib functions from cache.h
  treewide: remove cache.h inclusion due to object-name.h changes
  object-name.h: move declarations for object-name.c functions from cache.h
  treewide: remove unnecessary cache.h inclusion
  treewide: be explicit about dependence on mem-pool.h
  treewide: be explicit about dependence on oid-array.h
  ...
</content>
</entry>
<entry>
<title>treewide: remove double forward declaration of read_in_full</title>
<updated>2023-04-11T15:52:11Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-11T07:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65156bb7ec6443ba01edcff3691d878c7a04ede0'/>
<id>urn:sha1:65156bb7ec6443ba01edcff3691d878c7a04ede0</id>
<content type='text'>
cache.h's nature of a dumping ground of includes prevented it from
being included in some compat/ files, forcing us into a workaround
of having a double forward declaration of the read_in_full() function
(see commit 14086b0a13 ("compat/pread.c: Add a forward declaration to
fix a warning", 2007-11-17)).  Now that we have moved functions like
read_in_full() from cache.h to wrapper.h, and wrapper.h isn't littered
with unrelated and scary #defines, get rid of the extra forward
declaration and just have compat/pread.c include wrapper.h.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Acked-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pe/time-use-gettimeofday'</title>
<updated>2023-03-28T17:51:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-03-28T17:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdb1ef07d22c3ca88bf42ecd08c0c24d515c11ef'/>
<id>urn:sha1:cdb1ef07d22c3ca88bf42ecd08c0c24d515c11ef</id>
<content type='text'>
time(2) on glib 2.31+, especially on Linux, goes out of sync with
higher resolution timers used for gettimeofday(2) and by the
filesystem.  Replace all calls to it with a git_time() wrapper and
use gettimeofday(2) in its implementation.

* pe/time-use-gettimeofday:
  git-compat-util: use gettimeofday(2) for time(2)
</content>
</entry>
<entry>
<title>git-compat-util: use gettimeofday(2) for time(2)</title>
<updated>2023-03-21T20:11:42Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2023-03-20T23:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=370ddcbc89646c7f53728ec7d1fb87597b52de67'/>
<id>urn:sha1:370ddcbc89646c7f53728ec7d1fb87597b52de67</id>
<content type='text'>
Use gettimeofday instead of time(NULL) to get current time.
This avoids clock skew on glibc 2.31+ on Linux, where in the
first 1 to 2.5 ms of every second, time(NULL) returns a
value that is one less than the tv_sec part of
higher-resolution timestamps such as those returned by
gettimeofday or timespec_get, or those in the file system.
There are similar clock skew problems on AIX and MS-Windows,
which have problems in the first 5 ms of every second.

Without this patch, users can observe Git issuing a
timestamp T+1 before it issues timestamp T, because Git
sometimes uses time(NULL) or time(&amp;t) and sometimes uses
higher-res methods like gettimeofday.  Although strictly
speaking users should tolerate this behavior because a
superuser can always change the clock back, this is a
quality of implementation issue and users naturally expect
Git to issue timestamps in increasing order unless the
superuser has fiddled with the system clock.

This patch always uses gettimeofday(...) instead of time(...),
and I have verified that the resulting .o files never refer
to the name 'time'.  A trickier patch would change only
those calls for which timestamp monotonicity is user-visible.
Such a patch would require more expertise about Git internals,
though, and would be harder to maintain later.

Another possibility would be to change Git's documentation
to warn users that Git does not always issue timestamps in
increasing order.  However, Git users would likely be either
dismayed by this possibility, or confused by the level of
detail that any such documentation would require.

Yet another possibility would be to fix the Linux kernel so
that the time syscall is consistent with the other timestamp
syscalls.  I suppose this has not been done due to
performance implications.  (Git's use of timestamps is rare
enough that performance is not a significant consideration
for git.)  However, this wouldn't fix Git's problem on older
Linux kernels, or on AIX or MS-Windows.

Signed-off-by: Paul Eggert &lt;eggert@cs.ucla.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mc/credential-helper-www-authenticate'</title>
<updated>2023-03-17T21:03:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-03-17T21:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92c56da09683fa3331668adec073b6769da8f0b7'/>
<id>urn:sha1:92c56da09683fa3331668adec073b6769da8f0b7</id>
<content type='text'>
Allow information carried on the WWW-AUthenticate header to be
passed to the credential helpers.

* mc/credential-helper-www-authenticate:
  credential: add WWW-Authenticate header to cred requests
  http: read HTTP WWW-Authenticate response headers
  t5563: add tests for basic and anoymous HTTP access
</content>
</entry>
<entry>
<title>http: read HTTP WWW-Authenticate response headers</title>
<updated>2023-02-27T18:40:40Z</updated>
<author>
<name>Matthew John Cheetham</name>
<email>mjcheetham@outlook.com</email>
</author>
<published>2023-02-27T17:20:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b8dda9a4fdec1638b047506a121df8e15872492'/>
<id>urn:sha1:6b8dda9a4fdec1638b047506a121df8e15872492</id>
<content type='text'>
Read and store the HTTP WWW-Authenticate response headers made for
a particular request.

This will allow us to pass important authentication challenge
information to credential helpers or others that would otherwise have
been lost.

libcurl only provides us with the ability to read all headers recieved
for a particular request, including any intermediate redirect requests
or proxies. The lines returned by libcurl include HTTP status lines
delinating any intermediate requests such as "HTTP/1.1 200". We use
these lines to reset the strvec of WWW-Authenticate header values as
we encounter them in order to only capture the final response headers.

The collection of all header values matching the WWW-Authenticate
header is complicated by the fact that it is legal for header fields to
be continued over multiple lines, but libcurl only gives us each
physical line a time, not each logical header. This line folding feature
is deprecated in RFC 7230 [1] but older servers may still emit them, so
we need to handle them.

In the future [2] we may be able to leverage functions to read headers
from libcurl itself, but as of today we must do this ourselves.

[1] https://www.rfc-editor.org/rfc/rfc7230#section-3.2
[2] https://daniel.haxx.se/blog/2022/03/22/a-headers-api-for-libcurl/

Signed-off-by: Matthew John Cheetham &lt;mjcheetham@outlook.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hex.h: move some hex-related declarations from cache.h</title>
<updated>2023-02-24T01:25:28Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b73ecb48114926d063d7ab96943bafcc0ae913b6'/>
<id>urn:sha1:b73ecb48114926d063d7ab96943bafcc0ae913b6</id>
<content type='text'>
hex.c contains code for hex-related functions, but for some reason these
functions were declared in the catch-all cache.h.  Move the function
declarations into a hex.h header instead.

This also allows us to remove includes of cache.h from a few C files.
For now, we make cache.h include hex.h, so that it is easier to review
the direct changes being made by this patch.  In the next patch, we will
remove that, and add the necessary direct '#include "hex.h"' in the
hundreds of C files that need it.

Note that reviewing the header changes in this commit might be
simplified via
    git log --no-walk -p --color-moved $COMMIT -- '*.h'`
In particular, it highlights the simple movement of code in .h files
rather nicely.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/use-enhanced-bre-on-macos'</title>
<updated>2023-01-23T21:39:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-01-23T21:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5427bb4893e29a9502bbee5aed84c3b26e1a4e15'/>
<id>urn:sha1:5427bb4893e29a9502bbee5aed84c3b26e1a4e15</id>
<content type='text'>
Newer regex library macOS stopped enabling GNU-like enhanced BRE,
where '\(A\|B\)' works as alternation, unless explicitly asked with
the REG_ENHANCED flag.  "git grep" now can be compiled to do so, to
retain the old behaviour.

* rs/use-enhanced-bre-on-macos:
  use enhanced basic regular expressions on macOS
</content>
</entry>
<entry>
<title>Merge branch 'rs/dup-array'</title>
<updated>2023-01-22T01:21:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-01-22T01:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=60ce816cb637f8fac5e8e5b8a53dff8707b2c04c'/>
<id>urn:sha1:60ce816cb637f8fac5e8e5b8a53dff8707b2c04c</id>
<content type='text'>
Code cleaning.

* rs/dup-array:
  use DUP_ARRAY
  add DUP_ARRAY
  do full type check in BARF_UNLESS_COPYABLE
  factor out BARF_UNLESS_COPYABLE
  mingw: make argv2 in try_shell_exec() non-const
</content>
</entry>
<entry>
<title>Sync with 2.39.1</title>
<updated>2023-01-16T20:11:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-01-16T20:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=508386c6c5857b4faa2c3e491f422c98cc69ae76'/>
<id>urn:sha1:508386c6c5857b4faa2c3e491f422c98cc69ae76</id>
<content type='text'>
</content>
</entry>
</feed>
