<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/path.c, branch editorconfig</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>path: unify `git_path_is_*` APIs</title>
<updated>2018-06-01T10:49:09+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-05-30T10:18:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=92159bd46568870264d72741390e387ce5dbe271'/>
<id>92159bd46568870264d72741390e387ce5dbe271</id>
<content type='text'>
Right now, there's quite a lot of different function calls to determine
whether a path component matches a specific name after normalization
from the filesystem. We have a function for each of {gitattributes,
gitmodules, gitignore} multiplicated with {generic, NTFS, HFS} checks.
In the long time, this is unmaintainable in case there are e.g. new
filesystems with specific semantics, blowing up the number of functions
we need to implement.

Replace all functions with a simple `git_path_is_gitfile` function,
which accepts an enum pointing out the filename that is to be checked
against as well as the filesystem normalizations to check for. This
greatly simplifies implementation at the expense of the caller having to
invoke a somewhat longer function call.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Right now, there's quite a lot of different function calls to determine
whether a path component matches a specific name after normalization
from the filesystem. We have a function for each of {gitattributes,
gitmodules, gitignore} multiplicated with {generic, NTFS, HFS} checks.
In the long time, this is unmaintainable in case there are e.g. new
filesystems with specific semantics, blowing up the number of functions
we need to implement.

Replace all functions with a simple `git_path_is_gitfile` function,
which accepts an enum pointing out the filename that is to be checked
against as well as the filesystem normalizations to check for. This
greatly simplifies implementation at the expense of the caller having to
invoke a somewhat longer function call.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: check for a symlinked .gitmodules in fs-agnostic code</title>
<updated>2018-05-23T06:47:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2018-05-23T06:40:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1f570a290aae8bf5a0a5a436e8c66b059b2f0ca1'/>
<id>1f570a290aae8bf5a0a5a436e8c66b059b2f0ca1</id>
<content type='text'>
We still compare case-insensitively to protect more thoroughly as we don't know
what specifics we'll see on the system and it's the behaviour from git.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We still compare case-insensitively to protect more thoroughly as we don't know
what specifics we'll see on the system and it's the behaviour from git.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: reject .gitmodules as a symlink</title>
<updated>2018-05-23T06:47:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2018-05-22T14:13:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a7168b47ee494c52ffe850784be9ad996f80441a'/>
<id>a7168b47ee494c52ffe850784be9ad996f80441a</id>
<content type='text'>
Any part of the library which asks the question can pass in the mode to have it
checked against `.gitmodules` being a symlink.

This is particularly relevant for adding entries to the index from the worktree
and for checking out files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any part of the library which asks the question can pass in the mode to have it
checked against `.gitmodules` being a symlink.

This is particularly relevant for adding entries to the index from the worktree
and for checking out files.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: accept the name length as a parameter</title>
<updated>2018-05-22T13:27:29+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2018-05-22T13:21:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=02c80ad75d3c3d2246f4f36660281d73648d79aa'/>
<id>02c80ad75d3c3d2246f4f36660281d73648d79aa</id>
<content type='text'>
We may take in names from the middle of a string so we want the caller to let us
know how long the path component is that we should be checking.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We may take in names from the middle of a string so we want the caller to let us
know how long the path component is that we should be checking.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: expose dotgit detection functions per filesystem</title>
<updated>2018-05-22T11:58:24+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2018-05-22T11:58:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=490cbaa97b6476d7103b82a26ef2c7c951c8ec5b'/>
<id>490cbaa97b6476d7103b82a26ef2c7c951c8ec5b</id>
<content type='text'>
These will be used by the checkout code to detect them for the particular
filesystem they're on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These will be used by the checkout code to detect them for the particular
filesystem they're on.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: add functions to detect .gitconfig and .gitattributes</title>
<updated>2018-05-18T12:49:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlosmn@github.com</email>
</author>
<published>2018-05-16T13:56:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0aa65f8dbf270d8517703a9a8f63afaf18e0e739'/>
<id>0aa65f8dbf270d8517703a9a8f63afaf18e0e739</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>path: add a function to detect an .gitmodules file</title>
<updated>2018-05-18T12:49:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlosmn@github.com</email>
</author>
<published>2018-05-16T13:42:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9de97ae75d6a27d4eca5c8de90c3577fae726325'/>
<id>9de97ae75d6a27d4eca5c8de90c3577fae726325</id>
<content type='text'>
Given a path component it knows what to pass to the filesystem-specific
functions so we're protected even from trees which try to use the 8.3 naming
rules to get around us matching on the filename exactly.

The logic and test strings come from the equivalent git change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given a path component it knows what to pass to the filesystem-specific
functions so we're protected even from trees which try to use the 8.3 naming
rules to get around us matching on the filename exactly.

The logic and test strings come from the equivalent git change.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: provide a generic function for checking dogit files on NTFS</title>
<updated>2018-05-18T12:49:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlosmn@github.com</email>
</author>
<published>2018-05-16T12:47:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=22973e099e85211470b6bc26c55d7cf9f7934079'/>
<id>22973e099e85211470b6bc26c55d7cf9f7934079</id>
<content type='text'>
It checks against the 8.3 shortname variants, including the one which includes
the checksum as part of its name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It checks against the 8.3 shortname variants, including the one which includes
the checksum as part of its name.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: provide a generic dogit checking function for HFS</title>
<updated>2018-05-18T12:49:08+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlosmn@github.com</email>
</author>
<published>2018-05-16T09:56:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0283fc4697988d1067946e781066da5fc1397175'/>
<id>0283fc4697988d1067946e781066da5fc1397175</id>
<content type='text'>
This lets us check for other kinds of reserved files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lets us check for other kinds of reserved files.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure to always include "common.h" first</title>
<updated>2017-07-03T08:51:48+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-06-30T11:39:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0c7f49dd4316b332f30b4ea72a657bace41e1245'/>
<id>0c7f49dd4316b332f30b4ea72a657bace41e1245</id>
<content type='text'>
Next to including several files, our "common.h" header also declares
various macros which are then used throughout the project. As such, we
have to make sure to always include this file first in all
implementation files. Otherwise, we might encounter problems or even
silent behavioural differences due to macros or defines not being
defined as they should be. So in fact, our header and implementation
files should make sure to always include "common.h" first.

This commit does so by establishing a common include pattern. Header
files inside of "src" will now always include "common.h" as its first
other file, separated by a newline from all the other includes to make
it stand out as special. There are two cases for the implementation
files. If they do have a matching header file, they will always include
this one first, leading to "common.h" being transitively included as
first file. If they do not have a matching header file, they instead
include "common.h" as first file themselves.

This fixes the outlined problems and will become our standard practice
for header and source files inside of the "src/" from now on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Next to including several files, our "common.h" header also declares
various macros which are then used throughout the project. As such, we
have to make sure to always include this file first in all
implementation files. Otherwise, we might encounter problems or even
silent behavioural differences due to macros or defines not being
defined as they should be. So in fact, our header and implementation
files should make sure to always include "common.h" first.

This commit does so by establishing a common include pattern. Header
files inside of "src" will now always include "common.h" as its first
other file, separated by a newline from all the other includes to make
it stand out as special. There are two cases for the implementation
files. If they do have a matching header file, they will always include
this one first, leading to "common.h" being transitively included as
first file. If they do not have a matching header file, they instead
include "common.h" as first file themselves.

This fixes the outlined problems and will become our standard practice
for header and source files inside of the "src/" from now on.
</pre>
</div>
</content>
</entry>
</feed>
