<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/repository.c, branch ethomson/commit_create_cb</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>Homogenize semantics for atomic-related functions</title>
<updated>2021-08-26T12:34:17+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-12-20T20:45:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=74708a813d586df3ba22a81b475f6aba0498e2ef'/>
<id>74708a813d586df3ba22a81b475f6aba0498e2ef</id>
<content type='text'>
There were some subtle semantic differences between the various
implementations of atomic functions. Now they behave the same, have
tests and are better documented to avoid this from happening again in
the future.

Of note:

* The semantics chosen for `git_atomic_compare_and_swap` match
  `InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now.
* The semantics chosen for `git_atomic_add` match
  `InterlockedAdd`/`__atomic_add_fetch`.
* `git_atomic_swap` and `git_atomic_load` still have a bit of semantic
  difference with the gcc builtins / msvc interlocked operations, since
  they require an l-value (not a pointer). If desired, this can be
  homogenized.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were some subtle semantic differences between the various
implementations of atomic functions. Now they behave the same, have
tests and are better documented to avoid this from happening again in
the future.

Of note:

* The semantics chosen for `git_atomic_compare_and_swap` match
  `InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now.
* The semantics chosen for `git_atomic_add` match
  `InterlockedAdd`/`__atomic_add_fetch`.
* `git_atomic_swap` and `git_atomic_load` still have a bit of semantic
  difference with the gcc builtins / msvc interlocked operations, since
  they require an l-value (not a pointer). If desired, this can be
  homogenized.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5823 from libgit2/ethomson/path_validation</title>
<updated>2021-05-02T09:27:56+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-05-02T09:27:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c44f56886f623df062739d6745297492d476a947'/>
<id>c44f56886f623df062739d6745297492d476a947</id>
<content type='text'>
Working directory path validation</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Working directory path validation</pre>
</div>
</content>
</entry>
<entry>
<title>repo: validate repository paths</title>
<updated>2021-04-28T12:03:34+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-04-26T11:23:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=c15ed350bb95fa7b07a70c60212f55be169ad12e'/>
<id>c15ed350bb95fa7b07a70c60212f55be169ad12e</id>
<content type='text'>
Ensure that a repository's path (at initialization or open time) is
valid.  On Windows systems, this means that the longest known path
beneath the repository will fit within MAX_PATH: this is a lock file for
a loose object within the repository itself.

Other paths, like a very long loose reference, may fail to be opened
after the repository is opened.  These variable length paths will be
checked when they are accessed themselves.  This new functionality is
done at open to prevent needlessly checking every file in the gitdir
(eg, `MERGE_HEAD`) for its length when we could instead check once at
repository open time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that a repository's path (at initialization or open time) is
valid.  On Windows systems, this means that the longest known path
beneath the repository will fit within MAX_PATH: this is a lock file for
a loose object within the repository itself.

Other paths, like a very long loose reference, may fail to be opened
after the repository is opened.  These variable length paths will be
checked when they are accessed themselves.  This new functionality is
done at open to prevent needlessly checking every file in the gitdir
(eg, `MERGE_HEAD`) for its length when we could instead check once at
repository open time.
</pre>
</div>
</content>
</entry>
<entry>
<title>repo: factor the commondir detection</title>
<updated>2021-04-28T12:03:34+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-04-24T12:11:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=3589587d6dcd33d0d755886741d6ce22666cb000'/>
<id>3589587d6dcd33d0d755886741d6ce22666cb000</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>repository: validate workdir path lengths</title>
<updated>2021-04-28T12:03:34+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-04-04T18:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e52c2989fb6911ef74cccd87a57bffd884842d36'/>
<id>e52c2989fb6911ef74cccd87a57bffd884842d36</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>repo: introduce git_repository_workdir_path</title>
<updated>2021-04-28T12:03:33+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-03-20T16:39:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=50e012163619a1808bb7e06e658f3d47a472f0d1'/>
<id>50e012163619a1808bb7e06e658f3d47a472f0d1</id>
<content type='text'>
Add a simple accessor for workdir paths to get an absolute on-disk path
given a repository and a relative path within it.  This is useful to
avoid copy-pasta `git_buf_joinpath` and to ensure that we validate
working directory paths while honoring `core.longpaths` settings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a simple accessor for workdir paths to get an absolute on-disk path
given a repository and a relative path within it.  This is useful to
avoid copy-pasta `git_buf_joinpath` and to ensure that we validate
working directory paths while honoring `core.longpaths` settings.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5834 from libgit2/cmn/repo-no-passthrough</title>
<updated>2021-04-13T16:00:37+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-04-13T16:00:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ac77d306f539938aa599ba81faee52854c262328'/>
<id>ac77d306f539938aa599ba81faee52854c262328</id>
<content type='text'>
repo: remove an inappropriate use of PASSTHROUGH</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
repo: remove an inappropriate use of PASSTHROUGH</pre>
</div>
</content>
</entry>
<entry>
<title>repo: specify init.defaultbranch is meant to be a branch name</title>
<updated>2021-04-11T19:22:33+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlosmn@github.com</email>
</author>
<published>2021-04-11T19:22:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=631fe56faeb0acc600074b89eaeca93e548d3e12'/>
<id>631fe56faeb0acc600074b89eaeca93e548d3e12</id>
<content type='text'>
We don't want the default branch's refname here but its name as branch.
Returning an error saying it's not a valid reference here suggests we want the
value of `init.defaultbranch` to be something like `refs/heads/default` which is
not the case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't want the default branch's refname here but its name as branch.
Returning an error saying it's not a valid reference here suggests we want the
value of `init.defaultbranch` to be something like `refs/heads/default` which is
not the case.
</pre>
</div>
</content>
</entry>
<entry>
<title>repo: remove an inappropriate use of PASSTHROUGH</title>
<updated>2021-04-11T16:29:48+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlosmn@github.com</email>
</author>
<published>2021-04-11T12:27:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6591deefbf2443ef2162ac2384620bf0ec8065cb'/>
<id>6591deefbf2443ef2162ac2384620bf0ec8065cb</id>
<content type='text'>
This error code is for callbacks where we should act as though the callback was
not set. This is not something that makes sense for a `_foreach` and checking
for that error message to bubble up mostly is happenstance precisely because
this is not an error code we expect in the callback.

As part of removing this, let's also remove a use of foreach as we can open-code
this check.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This error code is for callbacks where we should act as though the callback was
not set. This is not something that makes sense for a `_foreach` and checking
for that error message to bubble up mostly is happenstance precisely because
this is not an error code we expect in the callback.

As part of removing this, let's also remove a use of foreach as we can open-code
this check.
</pre>
</div>
</content>
</entry>
<entry>
<title>Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string</title>
<updated>2021-04-01T18:34:38+00:00</updated>
<author>
<name>Ian Hattendorf</name>
<email>ianh@axosoft.com</email>
</author>
<published>2021-04-01T18:34:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=7891e15375e1f9737f8e6a348fae36f0d6f5c2f6'/>
<id>7891e15375e1f9737f8e6a348fae36f0d6f5c2f6</id>
<content type='text'>
We already do this in repo_init_head
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already do this in repo_init_head
</pre>
</div>
</content>
</entry>
</feed>
