git-annex.git
3 years agodon't frontload reconcileStaged in git-annex init
Joey Hess [Fri, 18 Nov 2022 17:58:35 +0000 (13:58 -0400)]
don't frontload reconcileStaged in git-annex init

init: Avoid scanning for annexed files, which can be lengthy in a
large repository. Instead that scan is done on demand. This lets git-annex
init be run and some query commands be used in a repository without
waiting.

Note that autoinit already behaved this way, so while this will mean some
commands like git-annex get/unlock/add will do the scan the first time run,
that is not really a significant behavior change.

And, it's really better to have a consistent behavior. The reason for
the inconsistency was a strange bug discussed in
b3c4579c7907147a496bdf2c73b42238d8b239d6. Avoiding reconcileStaged in
init will keep avoiding whatever that was.

Sponsored-by: Dartmouth College's DANDI project
3 years agoqueue more changes to keys db
Joey Hess [Fri, 18 Nov 2022 17:29:34 +0000 (13:29 -0400)]
queue more changes to keys db

Increasing the size of the queue 10x makes git-annex init 7% faster in a
repository with 86000 annexed files.

The memory use goes up, from 70876 kb to 85376 kb.

3 years agoSped up the initial scanning for annexed files by 15%
Joey Hess [Fri, 18 Nov 2022 17:16:57 +0000 (13:16 -0400)]
Sped up the initial scanning for annexed files by 15%

Avoids database querying overhead when the database is newly created.

In the large repository where git-annex init took 24 seconds, this sped it
up to 20.47 seconds, a speedup of around 15%.

Sponsored-by: Dartmouth College's DANDI project
3 years agoupdate changelog
Joey Hess [Fri, 18 Nov 2022 16:58:13 +0000 (12:58 -0400)]
update changelog

3 years agonew metric prefixes give us quettabyte and yottabyte
Joey Hess [Fri, 18 Nov 2022 16:03:12 +0000 (12:03 -0400)]
new metric prefixes give us quettabyte and yottabyte

There does not yet seem to be an update to IEC 80000-13, so no
robibyte or quebibyte yet.

Sponsored-by: k0ld on Patreon
3 years agoprofiling and performance
Joey Hess [Thu, 17 Nov 2022 20:47:51 +0000 (16:47 -0400)]
profiling and performance

3 years agoclose as git-annex already makes reflinks when supported
Joey Hess [Mon, 14 Nov 2022 17:29:27 +0000 (13:29 -0400)]
close as git-annex already makes reflinks when supported

3 years agocomment
Joey Hess [Mon, 14 Nov 2022 17:24:30 +0000 (13:24 -0400)]
comment

3 years agocomment
Joey Hess [Mon, 14 Nov 2022 17:09:10 +0000 (13:09 -0400)]
comment

3 years agodocument that sync --cleanup only deletes branches
Joey Hess [Mon, 14 Nov 2022 17:00:22 +0000 (13:00 -0400)]
document that sync --cleanup only deletes branches

3 years agocomment
Joey Hess [Mon, 14 Nov 2022 16:59:57 +0000 (12:59 -0400)]
comment

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 14 Nov 2022 16:04:51 +0000 (12:04 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agorevert change to use lts-19.32
Joey Hess [Mon, 14 Nov 2022 15:56:55 +0000 (11:56 -0400)]
revert change to use lts-19.32

This reverts commit 15dd7fe84b2aa13531c80adb00efa82469724845.

aws 0.23 is not used any longer, so read-only S3 import won't be
supported yet when building with stack.

That commit broke the build on windows, because the new version of Win32 that
was included (because the old one does not work with this lts version)
needs a version of filepath that is newer than the one bundled with the
ghc in that lts version. It is not possible to override that to a newer
filepath.

Seems that the only solution to get aws 0.23 will be to wait for a ghc that
contains filepath 1.4.100.0. No ghc yet contains it. (Backporting the Win32
fix to a point release version that does not include this bleeding edge
filepath would also resolve it, but seems unlikely to happen.)

Sponsored-by: Jarkko Kniivilä on Patreon
3 years agoadd macos reflink to comment
Lena Wildervanck [Sun, 13 Nov 2022 19:20:03 +0000 (20:20 +0100)]
add macos reflink to comment

3 years agoAdded a comment
lena.wildervanck@4b6aac156870f72a36b090e210e4747f702b69cb [Sun, 13 Nov 2022 19:03:49 +0000 (19:03 +0000)]
Added a comment

3 years ago(no commit message)
lena.wildervanck@4b6aac156870f72a36b090e210e4747f702b69cb [Sun, 13 Nov 2022 15:42:14 +0000 (15:42 +0000)]

3 years agoAdded a comment
pat [Sat, 12 Nov 2022 02:50:07 +0000 (02:50 +0000)]
Added a comment

3 years ago(no commit message)
pat [Sat, 12 Nov 2022 02:14:44 +0000 (02:14 +0000)]

3 years ago(no commit message)
pat [Fri, 11 Nov 2022 22:46:11 +0000 (22:46 +0000)]

3 years agoAdded a comment
amindfv@97236fbaab6048ce6805b2737b27dd7f1cd51da4 [Thu, 10 Nov 2022 21:29:33 +0000 (21:29 +0000)]
Added a comment

3 years ago(no commit message)
amindfv@97236fbaab6048ce6805b2737b27dd7f1cd51da4 [Thu, 10 Nov 2022 08:50:41 +0000 (08:50 +0000)]

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 9 Nov 2022 20:29:16 +0000 (16:29 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoexport: fix multi-file delete bug
Joey Hess [Wed, 9 Nov 2022 20:24:37 +0000 (16:24 -0400)]
export: fix multi-file delete bug

export: Fix a bug that left a file on a special remote when two files with
the same content were both deleted in the exported tree.

Case of the wrong data structure leading to the wrong result.
The DiffMap now contains all the old filenames, and all the new filenames.

Note that, when 2 files with the same content are both renamed,
it only renames the first, but deletes and re-exports the second.
Improving that is possible, but it would need to use a different temporary
filename. Anyway, that is an unusual case, and there are known to be other
unusual cases where export does not rename with maximum efficiency, IIRC.
(Or maybe this is the case that I remember?)

Sponsored-by: Dartmouth College's OpenNeuro project
3 years agoAdded a comment
nell@7201fe78ade251118ef3441f4e509b37cd836503 [Wed, 9 Nov 2022 19:51:20 +0000 (19:51 +0000)]
Added a comment

3 years agoanalysis
Joey Hess [Wed, 9 Nov 2022 19:46:14 +0000 (15:46 -0400)]
analysis

3 years agofix build warning
Joey Hess [Wed, 9 Nov 2022 19:33:46 +0000 (15:33 -0400)]
fix build warning

3 years agocomment and retitle
Joey Hess [Wed, 9 Nov 2022 19:18:28 +0000 (15:18 -0400)]
comment and retitle

3 years agocomment
Joey Hess [Wed, 9 Nov 2022 19:14:28 +0000 (15:14 -0400)]
comment

3 years agoclose
Joey Hess [Wed, 9 Nov 2022 18:32:14 +0000 (14:32 -0400)]
close

3 years agostack.yaml: Updated to lts-19.32
Joey Hess [Wed, 9 Nov 2022 18:29:00 +0000 (14:29 -0400)]
stack.yaml: Updated to lts-19.32

This allows building with aws-0.23

Win32-2.13.4.0 contains a function that is not in lts-19.32 yet. Adding
it to stack.yaml does not seem to cause problems when building on linux.

3 years agorevert change to use aws 0.23 in stack.yaml files
Joey Hess [Wed, 9 Nov 2022 17:53:24 +0000 (13:53 -0400)]
revert change to use aws 0.23 in stack.yaml files

broke the build

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 9 Nov 2022 17:31:16 +0000 (13:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoremove dangling where clause
Joey Hess [Wed, 9 Nov 2022 17:25:05 +0000 (13:25 -0400)]
remove dangling where clause

3 years agoreplace guessed win32 version with actual version 2.13.4.0
Joey Hess [Wed, 9 Nov 2022 17:08:27 +0000 (13:08 -0400)]
replace guessed win32 version with actual version 2.13.4.0

3 years agoAdding S3 special remote export bug report
nell@7201fe78ade251118ef3441f4e509b37cd836503 [Tue, 8 Nov 2022 22:37:14 +0000 (22:37 +0000)]
Adding S3 special remote export bug report

3 years agoreport on troubles with aws-0.23 and stack builds
jkniiv [Tue, 8 Nov 2022 11:36:21 +0000 (11:36 +0000)]
report on troubles with aws-0.23 and stack builds

3 years agoavoid splitting repo tests into too small parts around -J16
Joey Hess [Mon, 7 Nov 2022 18:44:51 +0000 (14:44 -0400)]
avoid splitting repo tests into too small parts around -J16

The initTests have to be run once per part, and a point of diminishing
returns can be reached where more work is being done to set up for 1 or
2 tests than to run them.

This is better than a hard cap of -J8 or so, because it lets other
things than these particular tests still be parallelized at -J16.

Sponsored-by: Dartmouth College's Datalad project
3 years agocoment
Joey Hess [Mon, 7 Nov 2022 18:28:55 +0000 (14:28 -0400)]
coment

3 years agofollowup
Joey Hess [Mon, 7 Nov 2022 16:26:04 +0000 (12:26 -0400)]
followup

3 years agoinitial report on stalling test
yarikoptic [Mon, 7 Nov 2022 14:31:55 +0000 (14:31 +0000)]
initial report on stalling test

3 years ago(no commit message)
xloem [Mon, 7 Nov 2022 10:33:22 +0000 (10:33 +0000)]

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 4 Nov 2022 20:21:20 +0000 (16:21 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agodone
Joey Hess [Fri, 4 Nov 2022 20:20:51 +0000 (16:20 -0400)]
done

3 years agocomplete support for S3 signature=anonymous
Joey Hess [Fri, 4 Nov 2022 19:42:43 +0000 (15:42 -0400)]
complete support for S3 signature=anonymous

aws-0.23 has been released.

When built with an older aws, initremote will error out when run
with signature=anonymous. And when a remote has been initialized with
that by a version of git-annex that does support it, older versions will
fail when the remote is accessed, with a useful error message.

Sponsored-by: Dartmouth College's DANDI project
3 years agorevert demo changes to stack.yaml
Joey Hess [Fri, 4 Nov 2022 19:11:53 +0000 (15:11 -0400)]
revert demo changes to stack.yaml

done to test aws before releasing it

3 years agoMerge branch 'master' into anons3
Joey Hess [Fri, 4 Nov 2022 19:08:29 +0000 (15:08 -0400)]
Merge branch 'master' into anons3

3 years agoAdded a comment
yarikoptic [Fri, 4 Nov 2022 12:41:47 +0000 (12:41 +0000)]
Added a comment

3 years agofix build of helper program
Joey Hess [Thu, 3 Nov 2022 18:11:49 +0000 (14:11 -0400)]
fix build of helper program

broken by ba7ecbc6a9c3763e8152e4f46522d14a4ee2b59d

Sponsored-by: Svenne Krap on Patreon
3 years agoadd news item for git-annex 10.20221103
Joey Hess [Thu, 3 Nov 2022 18:08:29 +0000 (14:08 -0400)]
add news item for git-annex 10.20221103

3 years agoreleasing package git-annex version 10.20221103
Joey Hess [Thu, 3 Nov 2022 18:07:53 +0000 (14:07 -0400)]
releasing package git-annex version 10.20221103

3 years agocomment, update tip
Joey Hess [Mon, 31 Oct 2022 16:16:36 +0000 (12:16 -0400)]
comment, update tip

3 years agoAdded a comment: ipfs
xloem [Mon, 31 Oct 2022 13:36:51 +0000 (13:36 +0000)]
Added a comment: ipfs

3 years agoAdded a comment: This guide fails with "fatal: refusing to merge unrelated histories"
Stefan [Sat, 29 Oct 2022 10:28:19 +0000 (10:28 +0000)]
Added a comment: This guide fails with "fatal: refusing to merge unrelated histories"

3 years agofix build warning
Joey Hess [Thu, 27 Oct 2022 14:21:24 +0000 (10:21 -0400)]
fix build warning

3 years agoMake git-annex enable-tor work when using the linux standalone build
Joey Hess [Wed, 26 Oct 2022 19:44:06 +0000 (15:44 -0400)]
Make git-annex enable-tor work when using the linux standalone build

Clean the standalone environment before running the su command
to run "sh". Otherwise, PATH leaked through, causing it to run
git-annex.linux/bin/sh, but GIT_ANNEX_DIR was not set,
which caused that script to not work:

[2022-10-26 15:07:02.145466106] (Utility.Process) process [938146] call: pkexec ["sh","-c","cd '/home/joey/tmp/git-annex.linux/r' && '/home/joey/tmp/git-annex.linux/git-annex' 'enable-tor' '1000'"]
/home/joey/tmp/git-annex.linux/bin/sh: 4: exec: /exe/sh: not found

Changed programPath to not use GIT_ANNEX_PROGRAMPATH,
but instead run the scripts at the top of GIT_ANNEX_DIR.
That works both when the standalone environment is set up, and when it's
not.

Sponsored-by: Kevin Mueller on Patreon
3 years agocomment
Joey Hess [Wed, 26 Oct 2022 18:54:38 +0000 (14:54 -0400)]
comment

3 years agouse lookupKeyStaged in --batch code paths
Joey Hess [Wed, 26 Oct 2022 18:23:06 +0000 (14:23 -0400)]
use lookupKeyStaged in --batch code paths

Make --batch mode handle unstaged annexed files consistently whether the
file is unlocked or not. Before this, a unstaged locked file
would have the symlink on disk examined and operated on in --batch mode,
while an unstaged unlocked file would be skipped.

Note that, when not in batch mode, unstaged files are skipped over too.
That is actually somewhat new behavior; as late as 7.20191114 a
command like `git-annex whereis .` would operate on unstaged locked
files and skip over unstaged unlocked files. That changed during
optimisation of CmdLine.Seek with apparently little fanfare or notice.

Turns out that rmurl still behaved that way when given an unstaged file
on the command line. It was changed to use lookupKeyStaged to
handle its --batch mode. That also affected its non-batch mode, but
since that's just catching up to the change earlier made to most
other commands, I have not mentioed that in the changelog.

It may be that other uses of lookupKey should also change to
lookupKeyStaged. But it may also be that would slow down some things,
or lead to unwanted behavior changes, so I've kept the changes minimal
for now.

An example of a place where the use of lookupKey is better than
lookupKeyStaged is in Command.AddUrl, where it looks to see if the file
already exists, and adds the url to the file when so. It does not matter
there whether the file is staged or not (when it's locked). The use of
lookupKey in Command.Unused likewise seems good (and faster).

Sponsored-by: Nicholas Golder-Manning on Patreon
3 years agoremove whenAnnexed and ifAnnexed
Joey Hess [Wed, 26 Oct 2022 17:58:20 +0000 (13:58 -0400)]
remove whenAnnexed and ifAnnexed

In preparation for adding a new variation on lookupKey.

Sponsored-by: Max Thoursie on Patreon
3 years agocomment
Joey Hess [Wed, 26 Oct 2022 16:58:10 +0000 (12:58 -0400)]
comment

3 years ago(no commit message)
jwodder [Tue, 25 Oct 2022 16:18:09 +0000 (16:18 +0000)]

3 years ago(no commit message)
gyurmo.gyuri@8d622eb91a0312fcb7e63e4f47a6e191c417a0c8 [Sun, 23 Oct 2022 08:30:57 +0000 (08:30 +0000)]

3 years agoAdded a comment
AlexPraga [Sat, 22 Oct 2022 15:12:26 +0000 (15:12 +0000)]
Added a comment

3 years agoimprove sqlite retrying behavior
Joey Hess [Tue, 18 Oct 2022 19:47:20 +0000 (15:47 -0400)]
improve sqlite retrying behavior

Avoid hanging when a suspended git-annex process is keeping a sqlite
database locked.

Sponsored-by: Dartmouth College's Datalad project
3 years agoMore robust handling of ErrorBusy when writing to sqlite databases
Joey Hess [Mon, 17 Oct 2022 19:56:19 +0000 (15:56 -0400)]
More robust handling of ErrorBusy when writing to sqlite databases

While ErrorBusy and other exceptions were caught and the write retried for
up to 10 seconds, it was still possible for git-annex to eventually
give up and error out without writing to the database. Now it will retry
as long as necessary.

This does mean that, if one git-annex process is suspended just as sqlite
has locked the database for writing, another git-annex that tries to write
it it might get stuck retrying forever. But, that could already happen when
opening the sqlite database, which retries forever on ErrorBusy. This is an
area where git-annex is known to not behave well, there's a todo about the
general case of it.

Sponsored-by: Dartmouth College's Datalad project
3 years agoupdate comment, probably not a sqlite bug
Joey Hess [Mon, 17 Oct 2022 19:08:54 +0000 (15:08 -0400)]
update comment, probably not a sqlite bug

Sqlite's page documenting WAL mode changed in Oct 2016 to mention ways
that queries could fail with SQLITE_BUSY.

http://web.archive.org/web/20161009044054/http://www.sqlite.org:80/wal.html

Probably not cooincidentally, I emailed sqlite-users about such a
situation in Feb 2015.
https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg90580.html

Noone ever replied to me, but at least now I understand why it does that.
Since it's documented now, it's no longer a bug.

3 years agocomment
Joey Hess [Mon, 17 Oct 2022 16:37:57 +0000 (12:37 -0400)]
comment

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 14 Oct 2022 19:14:11 +0000 (15:14 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years ago(no commit message)
AlexPraga [Fri, 14 Oct 2022 09:32:44 +0000 (09:32 +0000)]

3 years ago(no commit message)
AlexPraga [Fri, 14 Oct 2022 09:28:38 +0000 (09:28 +0000)]

3 years agoUpdate WSL1 tips
asakurareiko@f3d908c71c009580228b264f63f21c7274df7476 [Thu, 13 Oct 2022 15:29:12 +0000 (15:29 +0000)]
Update WSL1 tips

3 years agotest v10
Joey Hess [Wed, 12 Oct 2022 20:13:30 +0000 (16:13 -0400)]
test v10

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 12 Oct 2022 19:54:12 +0000 (15:54 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoupdate and open a todo about something I'm pondering
Joey Hess [Wed, 12 Oct 2022 19:53:56 +0000 (15:53 -0400)]
update and open a todo about something I'm pondering

3 years agoavoid uncessary keys db writes; doubled speed!
Joey Hess [Wed, 12 Oct 2022 19:21:19 +0000 (15:21 -0400)]
avoid uncessary keys db writes; doubled speed!

When running eg git-annex get, for each file it has to read from and
write to the keys database. But it's reading exclusively from one table,
and writing to a different table. So, it is not necessary to flush the
write to the database before reading. This avoids writing the database
once per file, instead it will buffer 1000 changes before writing.

Benchmarking getting 1000 small files from a local origin,
git-annex get now takes 13.62s, down from 22.41s!
git-annex drop now takes 9.07s, down from 18.63s!
Wowowowowowowow!

(It would perhaps have been better if there were separate databases for
the two tables. At least it would have avoided this complexity. Ah well,
this is better than splitting the table in a annex.version upgrade.)

Sponsored-by: Dartmouth College's Datalad project
3 years agoavoid flushing keys db queue after each Annex action
Joey Hess [Wed, 12 Oct 2022 17:50:46 +0000 (13:50 -0400)]
avoid flushing keys db queue after each Annex action

The flush was only done Annex.run' to make sure that the queue was flushed
before git-annex exits. But, doing it there means that as soon as one
change gets queued, it gets flushed soon after, which contributes to
excessive writes to the database, slowing git-annex down.
(This does not yet speed git-annex up, but it is a stepping stone to
doing so.)

Database queues do not autoflush when garbage collected, so have to
be flushed explicitly. I don't think it's possible to make them
autoflush (except perhaps if git-annex sqitched to using ResourceT..).
The comment in Database.Keys.closeDb used to be accurate, since the
automatic flushing did mean that all writes reached the database even
when closeDb was not called. But now, closeDb or flushDb needs to be
called before stopping using an Annex state. So, removed that comment.

In Remote.Git, change to using quiesce everywhere that it used to use
stopCoProcesses. This means that uses on onLocal in there are just as
slow as before. I considered only calling closeDb on the local git remotes
when git-annex exits. But, the reason that Remote.Git calls stopCoProcesses
in each onLocal is so as not to leave git processes running that have files
open on the remote repo, when it's on removable media. So, it seemed to make
sense to also closeDb after each one, since sqlite may also keep files
open. Although that has not seemed to cause problems with removable
media so far. It was also just easier to quiesce in each onLocal than
once at the end. This does likely leave performance on the floor, so
could be revisited.

In Annex.Content.saveState, there was no reason to close the db,
flushing it is enough.

The rest of the changes are from auditing for Annex.new, and making
sure that quiesce is called, after any action that might possibly need
it.

After that audit, I'm pretty sure that the change to Annex.run' is
safe. The only concern might be that this does let more changes get
queued for write to the db, and if git-annex is interrupted, those will be
lost. But interrupting git-annex can obviously already prevent it from
writing the most recent change to the db, so it must recover from such
lost data... right?

Sponsored-by: Dartmouth College's Datalad project
3 years agoAdded a comment
benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3 [Wed, 12 Oct 2022 06:12:17 +0000 (06:12 +0000)]
Added a comment

3 years agoupdate
Joey Hess [Tue, 11 Oct 2022 19:02:40 +0000 (15:02 -0400)]
update

3 years agoall keys are still present on versioned remote after import of a tree
Joey Hess [Tue, 11 Oct 2022 17:04:33 +0000 (13:04 -0400)]
all keys are still present on versioned remote after import of a tree

When importing from versioned remotes, fix tracking of the content of
deleted files.

Only S3 supports versioning so far, so only it was affected.

But, the draft import/export interface for external remotes also seemed to
need a change, so that versionedExport could be set.

3 years ago(no commit message)
benjamin.poldrack@d09ccff6d42dd20277610b59867cf7462927b8e3 [Tue, 11 Oct 2022 09:12:00 +0000 (09:12 +0000)]

3 years agoS3: pass fileprefix into getBucket calls
Joey Hess [Mon, 10 Oct 2022 21:37:26 +0000 (17:37 -0400)]
S3: pass fileprefix into getBucket calls

S3: Speed up importing from a large bucket when fileprefix= is set by only
asking for files under the prefix.

getBucket still returns the files with the prefix included, so the rest of
the fileprefix stripping still works unchanged.

Sponsored-by: Dartmouth College's DANDI project
3 years agoS3: Support signature=anonymous to access a S3 bucket anonymously
Joey Hess [Mon, 10 Oct 2022 20:52:18 +0000 (16:52 -0400)]
S3: Support signature=anonymous to access a S3 bucket anonymously

This can be used, for example, with importtree=yes to import from a public
bucket.

This needs a patch that has not yet landed in the aws library, and will
need to be adjusted to support compiling with old versions of the library,
so is not yet suitable for merging.
See https://github.com/aristidb/aws/pull/281

The stack.yaml changes are provided to show how to build against the aws
fork and will need to be reverted as well.

Sponsored-by: Dartmouth College's DANDI project
3 years agofuture proof AWS.Credentials generation
Joey Hess [Mon, 10 Oct 2022 20:31:08 +0000 (16:31 -0400)]
future proof AWS.Credentials generation

Avoid breaking when a field is added to the constructor.

Sponsored-by: Dartmouth College's DANDI project
3 years agotake lock in checkLogFile and calcLogFile
Joey Hess [Fri, 7 Oct 2022 17:19:17 +0000 (13:19 -0400)]
take lock in checkLogFile and calcLogFile

move: Fix openFile crash with -J

This does make them a bit slower, although usually the log file is not
very big, so even when it's being rewritten, they will not block for
long taking the lock. Still, little slowdowns may add up when moving a lot
file files.

A less expensive fix would be to use something lower level than openFile
that does not check if the file is already open for write by another
thread. But GHC does not seem to provide anything convenient; even mkFD
checks for a writing thread.

fullLines is no longer necessary since these functions no longer will
read the file while it's being written.

Sponsored-by: Dartmouth College's DANDI project
3 years agofix typo
Joey Hess [Fri, 7 Oct 2022 16:30:07 +0000 (12:30 -0400)]
fix typo

3 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 7 Oct 2022 16:29:32 +0000 (12:29 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

3 years agoAdded a comment
jkniiv [Thu, 6 Oct 2022 16:04:41 +0000 (16:04 +0000)]
Added a comment

3 years agoAdded a comment
yarikoptic [Thu, 6 Oct 2022 12:50:01 +0000 (12:50 +0000)]
Added a comment

3 years agoremoved
yarikoptic [Thu, 6 Oct 2022 12:47:48 +0000 (12:47 +0000)]
removed

3 years agoAdded a comment
yarikoptic [Thu, 6 Oct 2022 12:47:17 +0000 (12:47 +0000)]
Added a comment

3 years agoAdded a comment
jkniiv [Thu, 6 Oct 2022 06:21:40 +0000 (06:21 +0000)]
Added a comment

3 years ago(no commit message)
yarikoptic [Thu, 6 Oct 2022 01:37:24 +0000 (01:37 +0000)]

3 years agoinitial report on locking issue on move
yarikoptic [Wed, 5 Oct 2022 21:25:00 +0000 (21:25 +0000)]
initial report on locking issue on move

3 years agoupdate
Joey Hess [Wed, 5 Oct 2022 17:01:12 +0000 (13:01 -0400)]
update

3 years agoAdded a comment
jules@a6ba859eba6f59bd980f294741b1ad9b7624552a [Tue, 4 Oct 2022 17:59:54 +0000 (17:59 +0000)]
Added a comment

3 years agocomments
Joey Hess [Tue, 4 Oct 2022 17:36:38 +0000 (13:36 -0400)]
comments

3 years agoadd missing whitespace in warning message
Joey Hess [Tue, 4 Oct 2022 17:30:22 +0000 (13:30 -0400)]
add missing whitespace in warning message

3 years agocomment
Joey Hess [Tue, 4 Oct 2022 17:06:55 +0000 (13:06 -0400)]
comment

3 years agoimprove usage
Joey Hess [Mon, 3 Oct 2022 17:49:42 +0000 (13:49 -0400)]
improve usage

These commands operate on not only remotes, but any way a repository can
be specified, including "here" etc.

Sponsored-by: Graham Spencer on Patreon
3 years agoavoid combining multiple words provided to trust/untrust/dead
Joey Hess [Mon, 3 Oct 2022 17:48:40 +0000 (13:48 -0400)]
avoid combining multiple words provided to trust/untrust/dead

* trust, untrust, semitrust, dead: Fix behavior when provided with
  multiple repositories to operate on.
* trust, untrust, semitrust, dead: When provided with no parameters,
  do not operate on a repository that has an empty name.

The man page and usage already indicated that multiple repos could be
provided to these commands, but they actually used unwords to combine
everything into string, and found a repo matching that string. This was
especially bad when no parameters resulted in the empty string and some
repo happened to have an empty description.

This does change the behavior, and it's possible someone relied on the
current behavior to eg, trust a repo by name with the name not quoted into
a single parameter. But fixing the empty string bug and matching the
documentation are worth breaking that usage.

Note that git-annex init/reinit do still unwords multiple parameters when
provided to them. That is inconsistent behavior, but it certianly seems
possible that something does run git-annex init with an unquoted
description, and I don't think it's worth breaking that just to make it more
consistent with these other commands.

Sponsored-by: Boyd Stephen Smith Jr. on Patreon
3 years agoimprove wording
Joey Hess [Mon, 3 Oct 2022 17:32:55 +0000 (13:32 -0400)]
improve wording

This is to improve this case:

joey@darkstar:~/tmp/yyyy>git-annex trust
git-annex: no remote specified

The command does not need to be run with a remote, any repository name
will do, including eg "here".

Sponsored-by: Brock Spratlen on Patreon