<feed xmlns='http://www.w3.org/2005/Atom'>
<title>metastore, branch format1-3</title>
<subtitle>File metadata backup/comparison/restoration tool</subtitle>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/'/>
<entry>
<title>Add self to list of contributors.</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-24T09:07:10+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=c8b5820473992d184b12373058891bd3094974ef'/>
<id>c8b5820473992d184b12373058891bd3094974ef</id>
<content type='text'>
(The list is ordered by surname, right?)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(The list is ordered by surname, right?)
</pre>
</div>
</content>
</entry>
<entry>
<title>Use format 1 without mtime in the example hooks</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-24T09:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=dfb72c27037915262f6dcbd1d0017cf4136316da'/>
<id>dfb72c27037915262f6dcbd1d0017cf4136316da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add post-merge git hook.</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-24T08:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=8a77b1abdbee3566eb550855f2162dec3126adc8'/>
<id>8a77b1abdbee3566eb550855f2162dec3126adc8</id>
<content type='text'>
It's the same as the post-checkout hook, doing the same job. I thought
about symlinking instead of copying, but something doesn't sit quite
right about that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's the same as the post-checkout hook, doing the same job. I thought
about symlinking instead of copying, but something doesn't sit quite
right about that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make example hook shell scripts executable</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T15:50:24+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=7e80a15a8ce294d99ad015e672a85727ede76b15'/>
<id>7e80a15a8ce294d99ad015e672a85727ede76b15</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Abort commits during conflicts if differences exist</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T15:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=0ca5825e790fd9ab034dd8ab7511732e1905000c'/>
<id>0ca5825e790fd9ab034dd8ab7511732e1905000c</id>
<content type='text'>
If the user is running `git commit` to resolve a conflict, it's
dangerous to just save the metadata from the filesystem. It's possible
that they just fixed a conflict in the metadata file, but didn't update
the on-disk metadata to match.

(I know it's possible, because I did this!)

Our normal mode of operation, of just saving the metadata during a
commit to match whatever's on-disk, would wipe out their careful
conflict resolution! (On the other hand, just overwriting the on-disk
metadata might not be the best idea either.)

But the point of a conflict is that the changes between two different
branches *can't* be resolved automatically, and requires manual
intervention. Given that situation, asking them to resolve the
difference manually seems to be the most obvious option.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user is running `git commit` to resolve a conflict, it's
dangerous to just save the metadata from the filesystem. It's possible
that they just fixed a conflict in the metadata file, but didn't update
the on-disk metadata to match.

(I know it's possible, because I did this!)

Our normal mode of operation, of just saving the metadata during a
commit to match whatever's on-disk, would wipe out their careful
conflict resolution! (On the other hand, just overwriting the on-disk
metadata might not be the best idea either.)

But the point of a conflict is that the changes between two different
branches *can't* be resolved automatically, and requires manual
intervention. Given that situation, asking them to resolve the
difference manually seems to be the most obvious option.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change "compare" output from MSG_QUIET to MSG_NORMAL.</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T14:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=2e368d6bfdfba4efc651b5cfcd37b075deb79e4d'/>
<id>2e368d6bfdfba4efc651b5cfcd37b075deb79e4d</id>
<content type='text'>
Compare output is... just output. We shouldn't need to pass two "-q"
options to shut it up.

Likening the metastore MSG_* levels to syslog() LOG_* levels, MSG_DEBUG
works like LOG_DEBUG, and the WARNING/ERROR/CRITICAL also have similar
roles. That leaves MSG_NORMAL as the equivalent of LOG_INFO, and
MSG_QUIET as the equivalent of LOG_NOTICE.

LOG_NOTICE is documented as for "normal, but significant, condition"
which tracks what MSG_QUIET is for - things that aren't errors, but that
you want to know about even when you've asked for quiet.

Whereas the output of "compare" is just regular output. Finding a
difference isn't a significant condition - it's exactly what you've
asked it to look for.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compare output is... just output. We shouldn't need to pass two "-q"
options to shut it up.

Likening the metastore MSG_* levels to syslog() LOG_* levels, MSG_DEBUG
works like LOG_DEBUG, and the WARNING/ERROR/CRITICAL also have similar
roles. That leaves MSG_NORMAL as the equivalent of LOG_INFO, and
MSG_QUIET as the equivalent of LOG_NOTICE.

LOG_NOTICE is documented as for "normal, but significant, condition"
which tracks what MSG_QUIET is for - things that aren't errors, but that
you want to know about even when you've asked for quiet.

Whereas the output of "compare" is just regular output. Finding a
difference isn't a significant condition - it's exactly what you've
asked it to look for.
</pre>
</div>
</content>
</entry>
<entry>
<title>Return non-zero exit status if "compare" finds differences</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T14:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=a0902fe51010645f779e4d02cd46f35e488b8bd2'/>
<id>a0902fe51010645f779e4d02cd46f35e488b8bd2</id>
<content type='text'>
This makes `metastore` more useful in scripts, just to check if it found
anything, in the same way as `diff` and `grep`.

Note that POSIX requires that EXIT_SUCCESS is 0, and EXIT_FAILURE is 1,
so I've defined EXIT_DIFFERENCES as 2 which, while different from the
values `diff` and `grep` use (1 for finding something, 2 for errors),
maintains a certain amount of backwards compatibility with previous
versions of metastore.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes `metastore` more useful in scripts, just to check if it found
anything, in the same way as `diff` and `grep`.

Note that POSIX requires that EXIT_SUCCESS is 0, and EXIT_FAILURE is 1,
so I've defined EXIT_DIFFERENCES as 2 which, while different from the
values `diff` and `grep` use (1 for finding something, 2 for errors),
maintains a certain amount of backwards compatibility with previous
versions of metastore.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make "--no-mtime" apply to "dump" action</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-23T14:00:28+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=7c0520451b071e77b4c432ed89fc7559b8c58138'/>
<id>7c0520451b071e77b4c432ed89fc7559b8c58138</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to not save mtime in metadata files</title>
<updated>2022-05-24T09:12:33+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-18T15:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=7292804c1bafd43389defc0d7b4352ada666d626'/>
<id>7292804c1bafd43389defc0d7b4352ada666d626</id>
<content type='text'>
If you're storing metadata in a version control system with multiple
branches, mtime differences are going to produce a whole bunch of
conflicts that you likely don't care about. This allows you to not
save mtime and avoid those.

Note that we use a sentinel value of -1 for the mentry `mtimensec` field
to indicate this in the data, as all values of `mtime` are theoretically
valid, but `mtimensec` must always be between 0 and 999,999,999 in the
real world.

I'm not 100% sure about the mechanism for selecting this feature. The
legacy behaviour for metastore was to save mtimes in the metadata files,
but ignore them for compare/apply by default, with a `--mtime` option to
use the mtime data.

Keeping the legacy behaviour for backwards compatibility, but adding a
`--no-mtime` option to ignore mtimes when saving felt like a reasonable
way of making this happen, but something about it doesn't feel great.

Maybe I just didn't figure out how to make the documentation clear
enough.  ¯\_(ツ)_/¯
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you're storing metadata in a version control system with multiple
branches, mtime differences are going to produce a whole bunch of
conflicts that you likely don't care about. This allows you to not
save mtime and avoid those.

Note that we use a sentinel value of -1 for the mentry `mtimensec` field
to indicate this in the data, as all values of `mtime` are theoretically
valid, but `mtimensec` must always be between 0 and 999,999,999 in the
real world.

I'm not 100% sure about the mechanism for selecting this feature. The
legacy behaviour for metastore was to save mtimes in the metadata files,
but ignore them for compare/apply by default, with a `--mtime` option to
use the mtime data.

Keeping the legacy behaviour for backwards compatibility, but adding a
`--no-mtime` option to ignore mtimes when saving felt like a reasonable
way of making this happen, but something about it doesn't feel great.

Maybe I just didn't figure out how to make the documentation clear
enough.  ¯\_(ツ)_/¯
</pre>
</div>
</content>
</entry>
<entry>
<title>Sort entries in Format 1 files by path, ASCIIbetically.</title>
<updated>2022-05-18T16:19:47+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-05-18T09:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/metastore/commit/?id=ce62a76e4570b6368384b3995c1ba106389df454'/>
<id>ce62a76e4570b6368384b3995c1ba106389df454</id>
<content type='text'>
This ensures that the files are stable, and not subject to the order in
which the OS returns directory entries. This should prevent unnecessary
changes, and therefore unnecessary merge conflicts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures that the files are stable, and not subject to the order in
which the OS returns directory entries. This should prevent unnecessary
changes, and therefore unnecessary merge conflicts.
</pre>
</div>
</content>
</entry>
</feed>
