git-annex.git
4 years agoinitremote type=git probe uuid
Joey Hess [Thu, 9 Jun 2022 17:16:50 +0000 (13:16 -0400)]
initremote type=git probe uuid

rather than matching path of an existing remote to find the uuid.

The main benefit of this is that locations not using ssh:// will work
now, including both paths and host:/path

The other benefit is that it's a simpler interface, no need to have an
existing remote with the same url and some other name. Although that
will still work of course.

This does rely on tryGitConfigRead working when given a Git.Repo that is
not a remote. Luckily, it works fine that way.

Also, tryGitConfigRead will auto-init a local repo that has a git-annex
branch. I did not enable auto-init of ssh repos though.

The uuid discovery actually happens twice; initremote discovers it,
and uses it to store the special remote config, but does not set it in the
git remote it creates. So the next run of git-annex does uuid discovery
again, and caches it that time. This could be improved for a tiny
speedup, but I didn't want to complicate things for that in this
commit.

Sponsored-by: Dartmouth College's DANDI project
4 years agobug report
Joey Hess [Thu, 9 Jun 2022 17:16:39 +0000 (13:16 -0400)]
bug report

4 years agoanalysis
Joey Hess [Wed, 8 Jun 2022 19:44:28 +0000 (15:44 -0400)]
analysis

4 years agocomment
Joey Hess [Wed, 8 Jun 2022 16:54:28 +0000 (12:54 -0400)]
comment

4 years agoinitial whining about type=git initremote
yarikoptic [Wed, 8 Jun 2022 15:42:58 +0000 (15:42 +0000)]
initial whining about type=git initremote

4 years agoinitial report on addurls issue
yarikoptic [Wed, 8 Jun 2022 14:05:56 +0000 (14:05 +0000)]
initial report on addurls issue

4 years agoAdded a comment
Atemu [Tue, 7 Jun 2022 12:07:30 +0000 (12:07 +0000)]
Added a comment

4 years agoAdded a comment
yarikoptic [Mon, 6 Jun 2022 17:22:41 +0000 (17:22 +0000)]
Added a comment

4 years agocomment
Joey Hess [Mon, 6 Jun 2022 16:37:40 +0000 (12:37 -0400)]
comment

4 years agoadd debugging around commits to sqlite dbs
Joey Hess [Mon, 6 Jun 2022 16:36:55 +0000 (12:36 -0400)]
add debugging around commits to sqlite dbs

4 years agocomment
Joey Hess [Mon, 6 Jun 2022 16:19:28 +0000 (12:19 -0400)]
comment

4 years agofix MVar deadlock when sqlite commit fails
Joey Hess [Mon, 6 Jun 2022 16:16:55 +0000 (12:16 -0400)]
fix MVar deadlock when sqlite commit fails

The database queue was left empty, which caused subsequent calls to
flushDbQueue to deadlock.

Sponsored-by: Dartmouth College's Datalad project
4 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 6 Jun 2022 15:55:02 +0000 (11:55 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

4 years agoAdded a comment
yarikoptic [Mon, 6 Jun 2022 14:50:16 +0000 (14:50 +0000)]
Added a comment

4 years agoAdded a comment
yarikoptic [Mon, 6 Jun 2022 14:00:05 +0000 (14:00 +0000)]
Added a comment

4 years agoAdded a comment
aurelia@b44312a63326710de6cea9c43290e5debbd55607 [Mon, 6 Jun 2022 12:38:26 +0000 (12:38 +0000)]
Added a comment

4 years agoupdate
Joey Hess [Sun, 5 Jun 2022 14:37:32 +0000 (10:37 -0400)]
update

4 years agoAdded a comment
Atemu [Sun, 5 Jun 2022 12:55:04 +0000 (12:55 +0000)]
Added a comment

4 years agoadd debugLocks around database operations
Joey Hess [Fri, 3 Jun 2022 18:10:24 +0000 (14:10 -0400)]
add debugLocks around database operations

to track down a blocked indefinitely on MVar that seems to occur after
sqlite throws ErrorBusy but that I have not been able to reproduce when
I made commits synthetically throw ErrorBusy.

Sponsored-by: Dartmouth College's Datalad project
4 years agocomment
Joey Hess [Fri, 3 Jun 2022 18:02:32 +0000 (14:02 -0400)]
comment

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

4 years agoclose
Joey Hess [Fri, 3 Jun 2022 18:00:48 +0000 (14:00 -0400)]
close

4 years agoAdded a comment
yarikoptic [Fri, 3 Jun 2022 16:42:39 +0000 (16:42 +0000)]
Added a comment

4 years ago(no commit message)
war1025@f884a3422ae0f27c6a2eb2335b383c5098f01c92 [Fri, 3 Jun 2022 14:20:09 +0000 (14:20 +0000)]

4 years agoAdded a comment
yarikoptic [Fri, 3 Jun 2022 01:40:17 +0000 (01:40 +0000)]
Added a comment

4 years agoAdded a comment: still reports about invalid option but doesn't fail
yarikoptic [Fri, 3 Jun 2022 01:36:39 +0000 (01:36 +0000)]
Added a comment: still reports about invalid option but doesn't fail

4 years agoAdded a comment: defending BTRFS
yarikoptic [Thu, 2 Jun 2022 18:43:02 +0000 (18:43 +0000)]
Added a comment: defending BTRFS

4 years agoping
Joey Hess [Thu, 2 Jun 2022 16:24:03 +0000 (12:24 -0400)]
ping

4 years agocomment
Joey Hess [Thu, 2 Jun 2022 16:22:07 +0000 (12:22 -0400)]
comment

4 years agoclose as hopefully fixed
Joey Hess [Thu, 2 Jun 2022 16:07:01 +0000 (12:07 -0400)]
close as hopefully fixed

did not have a good way to reproduce this, but I had a good theory about
a cause and fix..

4 years agoclose as already fixed
Joey Hess [Thu, 2 Jun 2022 15:59:26 +0000 (11:59 -0400)]
close as already fixed

4 years agocomment
Joey Hess [Thu, 2 Jun 2022 15:57:24 +0000 (11:57 -0400)]
comment

4 years agoupdate content of .git/info/attributes
Joey Hess [Thu, 2 Jun 2022 15:45:49 +0000 (11:45 -0400)]
update content of .git/info/attributes

This got changed but forgot to update it here.

4 years agoinfo: Added --autoenable option
Joey Hess [Wed, 1 Jun 2022 18:20:38 +0000 (14:20 -0400)]
info: Added --autoenable option

Use cases include using git-annex init --no-autoenable and then going back
and enabling the special remotes that have autoenable configured. As well
as just querying to remember which ones have it enabled.

It lists all special remotes that have autoenable=yes whether currently
enabled or not. And it can be used with --json.

I pondered making this "git-annex info autoenable", but that seemed wrong
because then if the use has a directory named "autoenable", it's unclear
what they are asking for. (Although "git-annex info remote" may be
similarly unclear.) Making it an option does mean that it can't be provided
via --batch though.

Sponsored-by: Dartmouth College's Datalad project
4 years agoinit: Added --no-autoenable option
Joey Hess [Wed, 1 Jun 2022 17:27:49 +0000 (13:27 -0400)]
init: Added --no-autoenable option

Someone may disagree with what repositories are set to autoenable and
it's good to have local overrides.

See https://github.com/datalad/datalad/issues/6634

Sponsored-by: Dartmouth College's Datalad project
4 years agocomment
Joey Hess [Wed, 1 Jun 2022 17:16:56 +0000 (13:16 -0400)]
comment

4 years agoAdded a comment
yarikoptic [Wed, 1 Jun 2022 13:49:05 +0000 (13:49 +0000)]
Added a comment

4 years agoAdded a comment
oliv5 [Wed, 1 Jun 2022 11:16:35 +0000 (11:16 +0000)]
Added a comment

4 years agoremoved
oliv5 [Wed, 1 Jun 2022 11:13:43 +0000 (11:13 +0000)]
removed

4 years agoAdded a comment
oliv5 [Wed, 1 Jun 2022 10:53:22 +0000 (10:53 +0000)]
Added a comment

4 years agoAdded a comment
Lukey [Wed, 1 Jun 2022 05:27:22 +0000 (05:27 +0000)]
Added a comment

4 years ago(no commit message)
web+git-annex@349c5d90cbeb85be6151d508cf84e7b83aa2280e [Wed, 1 Jun 2022 04:34:53 +0000 (04:34 +0000)]

4 years ago(no commit message)
web+git-annex@349c5d90cbeb85be6151d508cf84e7b83aa2280e [Wed, 1 Jun 2022 00:46:53 +0000 (00:46 +0000)]

4 years agoAdded a comment
yarikoptic [Tue, 31 May 2022 19:17:05 +0000 (19:17 +0000)]
Added a comment

4 years agoAdded a comment
yarikoptic [Tue, 31 May 2022 19:07:59 +0000 (19:07 +0000)]
Added a comment

4 years agocomment
Joey Hess [Tue, 31 May 2022 17:32:27 +0000 (13:32 -0400)]
comment

4 years agomoreinfo
Joey Hess [Tue, 31 May 2022 17:12:08 +0000 (13:12 -0400)]
moreinfo

4 years agocomment
Joey Hess [Tue, 31 May 2022 17:11:52 +0000 (13:11 -0400)]
comment

4 years agoenable --as-needed on freebsd
Joey Hess [Tue, 31 May 2022 17:03:39 +0000 (13:03 -0400)]
enable --as-needed on freebsd

based on doc/bugs/FreeBSD_patches.mdwn which indicates it works, though
sadly without anything more than a patch.

If this breaks anything it will be reverted.

4 years agocomment
Joey Hess [Tue, 31 May 2022 16:58:44 +0000 (12:58 -0400)]
comment

4 years agoresponse
Joey Hess [Tue, 31 May 2022 16:55:29 +0000 (12:55 -0400)]
response

4 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 31 May 2022 16:53:39 +0000 (12:53 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

4 years agodebug output of git security check probe
Joey Hess [Tue, 31 May 2022 16:25:11 +0000 (12:25 -0400)]
debug output of git security check probe

This is so, if there's some other failure that triggers it, --debug will
show what went wrong. See https://github.com/datalad/datalad/issues/6708

Sponsored-by: Dartmouth College's Datalad project
4 years agomake path absolute for display
Joey Hess [Tue, 31 May 2022 16:17:27 +0000 (12:17 -0400)]
make path absolute for display

Avoid suggesting the user add "." to safe.directory.

4 years ago(no commit message)
git-starter@0b262dcdff7a8b29fd90d62290a37dda74630e69 [Tue, 31 May 2022 09:39:22 +0000 (09:39 +0000)]

4 years ago(no commit message)
git-starter@0b262dcdff7a8b29fd90d62290a37dda74630e69 [Tue, 31 May 2022 09:38:43 +0000 (09:38 +0000)]

4 years ago(no commit message)
git-starter@0b262dcdff7a8b29fd90d62290a37dda74630e69 [Tue, 31 May 2022 09:32:11 +0000 (09:32 +0000)]

4 years agoAdded a comment
7thyearold@339ab97e59cee5c85e14df94a5059f251a143e65 [Mon, 30 May 2022 09:52:11 +0000 (09:52 +0000)]
Added a comment

4 years ago(no commit message)
7thyearold@339ab97e59cee5c85e14df94a5059f251a143e65 [Mon, 30 May 2022 09:51:11 +0000 (09:51 +0000)]

4 years agoadded question re: exporttree=yes and versioned S3 remotes
Ilya_Shlyakhter [Sun, 29 May 2022 18:07:36 +0000 (18:07 +0000)]
added question re: exporttree=yes and versioned S3 remotes

4 years agoAdded a comment: adb sync problem (after some upgrades)
g@aaed65f19d6c3a2a18c33da828e66c7bb915e65a [Sun, 29 May 2022 09:59:45 +0000 (09:59 +0000)]
Added a comment: adb sync problem (after some upgrades)

4 years agoAdded a comment: another/different? stall
yarikoptic [Thu, 26 May 2022 14:31:33 +0000 (14:31 +0000)]
Added a comment: another/different? stall

4 years agoAdded a comment: What filesystem is this happening on?
yarikoptic [Wed, 25 May 2022 21:09:38 +0000 (21:09 +0000)]
Added a comment: What filesystem is this happening on?

4 years agoadd news item for git-annex 10.20220525
Joey Hess [Wed, 25 May 2022 18:01:42 +0000 (14:01 -0400)]
add news item for git-annex 10.20220525

4 years agoreleasing package git-annex version 10.20220525
Joey Hess [Wed, 25 May 2022 18:01:31 +0000 (14:01 -0400)]
releasing package git-annex version 10.20220525

4 years agofollowup
Joey Hess [Wed, 25 May 2022 17:43:33 +0000 (13:43 -0400)]
followup

4 years agoAdded a comment
Atemu [Wed, 25 May 2022 12:22:58 +0000 (12:22 +0000)]
Added a comment

4 years agoAdded a comment
yarikoptic [Tue, 24 May 2022 21:05:03 +0000 (21:05 +0000)]
Added a comment

4 years agoAdded a comment
yarikoptic [Tue, 24 May 2022 20:35:58 +0000 (20:35 +0000)]
Added a comment

4 years agoAdded a comment
jkniiv [Tue, 24 May 2022 02:46:17 +0000 (02:46 +0000)]
Added a comment

4 years agoAdded a comment
jkniiv [Mon, 23 May 2022 19:41:27 +0000 (19:41 +0000)]
Added a comment

4 years agofix git-annex test -p
Joey Hess [Mon, 23 May 2022 18:12:24 +0000 (14:12 -0400)]
fix git-annex test -p

test: When limiting tests to run with -p, work around tasty limitation by
automatically including dependent tests.

This fixes a reversion because it didn't used to use dependencies and
forced tasty to run the init tests first. That changed when parallelizing
the test suite.

It will sometimes do a little more work than strictly required,
because it adds init tests deps when limited to eg quickcheck tests,
which don't depend on them. But this only adds a few seconds work.

Sponsored-by: Dartmouth College's Datalad project
4 years agorevert windows-specific locking changes that broke tests
Joey Hess [Mon, 23 May 2022 17:04:39 +0000 (13:04 -0400)]
revert windows-specific locking changes that broke tests

This reverts windows-specific parts of 5a98f2d50913682c4ebe0e0c4ce695c450a96091
There were no code paths in common between windows and unix, so this
will return Windows to the old behavior.

The problem that the commit talks about has to do with multiple different
locations where git-annex can store annex object files, but that is not
too relevant to Windows anyway, because on windows the filesystem is always
treated as criplled and/or symlinks are not supported, so it will only
use one object location. It would need to be using a repo populated
in another OS to have the other object location in use probably.
Then a drop and get could possibly lead to a dangling lock file.

And, I was not able to actually reproduce that situation happening
before making that commit, even when I forced a race. So making these
changes on windows was just begging trouble..

I suspect that the change that caused the reversion is in
Annex/Content/Presence.hs. It checks if the content file exists,
and then called modifyContentDirWhenExists, which seems like it would
not fail, but if something deleted the content file at that point,
that call would fail. Which would result in an exception being thrown,
which should not normally happen from a call to inAnnexSafe. That was a
windows-specific change; the unix side did not have an equivilant
change.

Sponsored-by: Dartmouth College's Datalad project
4 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 23 May 2022 16:56:48 +0000 (12:56 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

4 years agofix typo in comment
Joey Hess [Mon, 23 May 2022 16:53:55 +0000 (12:53 -0400)]
fix typo in comment

4 years agosome of the test log output I should've added; formatting
jkniiv [Mon, 23 May 2022 13:58:43 +0000 (13:58 +0000)]
some of the test log output I should've added; formatting

4 years agobug: commit 5a98f2d50 causes two failures to appear in repo tests on Windows
jkniiv [Sun, 22 May 2022 07:52:54 +0000 (07:52 +0000)]
bug: commit 5a98f2d50 causes two failures to appear in repo tests on Windows

4 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 20 May 2022 18:40:31 +0000 (14:40 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

4 years agodeal with git's changes for CVE-2022-24765
Joey Hess [Fri, 20 May 2022 18:18:19 +0000 (14:18 -0400)]
deal with git's changes for CVE-2022-24765

Deal with git's recent changes to fix CVE-2022-24765, which prevent using
git in a repository owned by someone else.

That makes git config --list not list the repo's configs, only global
configs. So annex.uuid and annex.version are not visible to git-annex.
It displayed a message about that, which is not right for this situation.
Detect the situation and display a better message, similar to the one other
git commands display.

Also, git-annex init when run in that situation would overwrite annex.uuid
with a new one, since it couldn't see the old one. Add a check to prevent
it running too in this situation. It may be that this fix has security
implications, if a config set by the malicious user who owns the repo
causes git or git-annex to run code. I don't think any git-annex configs
get run by git-annex init. It may be that some git config of a command
does get run by one of the git commands that git-annex init runs. ("git
status" is the command that prompted the CVE-2022-24765, since
core.fsmonitor can cause it to run a command). Since I don't know how
to exploit this, I'm not treating it as a security fix for now.

Note that passing --git-dir makes git bypass the security check. git-annex
does pass --git-dir to most calls to git, which it does to avoid needing
chdir to the directory containing a git repository when accessing a remote.
So, it's possible that somewhere in git-annex it gets as far as running git
with --git-dir, and git reads some configs that are unsafe (what
CVE-2022-24765 is about). This seems unlikely, it would have to be part of
git-annex that runs in git repositories that have no (visible) annex.uuid,
and git-annex init is the only one that I can think of that then goes on to
run git, as discussed earlier. But I've not fully ruled out there being
others..

The git developers seem mostly worried about "git status" or a similar
command implicitly run by a shell prompt, not an explicit use of git in
such a repository. For example, Ævar Arnfjörð Bjarma wrote:
> * There are other bits of config that also point to executable things,
>   e.g. core.editor, aliases etc, but nothing has been found yet that
>   provides the "at a distance" effect that the core.fsmonitor vector
>   does.
>
>   I.e. a user is unlikely to go to /tmp/some-crap/here and run "git
>   commit", but they (or their shell prompt) might run "git status", and
>   if you have a /tmp/.git ...

Sponsored-by: Jarkko Kniivilä on Patreon
4 years agoAdded a comment
nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9 [Fri, 20 May 2022 18:09:45 +0000 (18:09 +0000)]
Added a comment

4 years agoresponse
Joey Hess [Fri, 20 May 2022 17:17:44 +0000 (13:17 -0400)]
response

4 years agocomment
Joey Hess [Wed, 18 May 2022 21:01:33 +0000 (17:01 -0400)]
comment

4 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 18 May 2022 20:52:33 +0000 (16:52 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

4 years agocomment
Joey Hess [Wed, 18 May 2022 20:49:38 +0000 (16:49 -0400)]
comment

4 years agodatalad metadata
Joey Hess [Wed, 18 May 2022 20:49:27 +0000 (16:49 -0400)]
datalad metadata

4 years agoremove git-annex test runner segfault workarounds
Joey Hess [Wed, 18 May 2022 20:45:27 +0000 (16:45 -0400)]
remove git-annex test runner segfault workarounds

Those segfaults were caused by setEnv, which should have been fixed by
commits 79017c612e16653d00253f6862b925b287102624 and
ebb76f0486030e1e6bae43b5f05d00d63a968681.

Sponsored-by: Dartmouth College's Datalad project
4 years agoavoid setEnv in test framework when tasty is running
Joey Hess [Wed, 18 May 2022 20:41:41 +0000 (16:41 -0400)]
avoid setEnv in test framework when tasty is running

setEnv is not thread safe and could cause a getEnv by another thread to
segfault, or perhaps other had behavior. This is particularly a problem
when using tasty, because tasty runs the test in a thread, and a getEnv
in another thread.

The use of top-level TMVars is ugly, but ok because only 1 test actually
runs at a time per process. Because it has to chdir into the test repo.

The setEnv that remains happens before tasty is running.

Sponsored-by: Dartmouth College's Datalad project
4 years agoavoid setEnv while testing gpg
Joey Hess [Wed, 18 May 2022 19:32:40 +0000 (15:32 -0400)]
avoid setEnv while testing gpg

setEnv is not thread safe and could cause a getEnv by another thread to
segfault, or perhaps other had behavior.

Sponsored-by: Dartmouth College's Datalad project
4 years agoget got stuck
yarikoptic [Wed, 18 May 2022 19:48:07 +0000 (19:48 +0000)]
get got stuck

4 years agoadd comment I made earlier
Joey Hess [Wed, 18 May 2022 18:57:27 +0000 (14:57 -0400)]
add comment I made earlier

4 years agocomment and open a todo
Joey Hess [Wed, 18 May 2022 18:57:14 +0000 (14:57 -0400)]
comment and open a todo

4 years agoinitial report on stuck conflict resolution (adjusted branch)
yarikoptic [Tue, 17 May 2022 12:40:56 +0000 (12:40 +0000)]
initial report on stuck  conflict resolution (adjusted branch)

4 years agoAdded a comment
MatusGoljer1 [Mon, 16 May 2022 23:37:55 +0000 (23:37 +0000)]
Added a comment

4 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 16 May 2022 19:38:22 +0000 (15:38 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

4 years agomake fsck normalize object locations
Joey Hess [Mon, 16 May 2022 19:19:48 +0000 (15:19 -0400)]
make fsck normalize object locations

The purpose of this is to fix situations where the annex object file is
stored in a directory structure other than where annex symlinks point to.

But it will also move object files from the hashdirmixed back to
hashdirlower if the repo configuration makes that the normal location.
It would have been more work to avoid that than to let it do it.

Sponsored-by: Dartmouth College's Datalad project
4 years agofix hardcoding of number of hash directories
Joey Hess [Mon, 16 May 2022 19:08:42 +0000 (15:08 -0400)]
fix hardcoding of number of hash directories

It can be changed to 1 via a tuning, rather than the 2 this assumed. So
it would have tried to rmdir .git/annex/objects in that case, which
would not hurt anything, but is not what it is supposed to do.

Sponsored-by: Dartmouth College's Datalad project
4 years agoavoid creating content directory when locking content
Joey Hess [Mon, 16 May 2022 16:34:56 +0000 (12:34 -0400)]
avoid creating content directory when locking content

If the content directory does not exist, then it does not make sense to
lock the content file, as it also does not exist, and so it's ok for the
lock operation to fail.

This avoids potential races where the content file exists but is then
deleted/renamed, while another process sees that it exists and goes to
lock it, resulting in a dangling lock file in an otherwise empty object
directory.

Also renamed modifyContent to modifyContentDir since it is not only
necessarily used for modifying content files, but also other files in
the content directory.

Sponsored-by: Dartmouth College's Datalad project
4 years agoAdded a comment: How to disable lockdown in bare repos?
nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9 [Sun, 15 May 2022 21:30:50 +0000 (21:30 +0000)]
Added a comment: How to disable lockdown in bare repos?

4 years agoAdded a comment: Using fuse
wzhd [Sat, 14 May 2022 03:10:18 +0000 (03:10 +0000)]
Added a comment: Using fuse

4 years agoAdded a comment: shell helper
yarikoptic [Fri, 13 May 2022 16:51:23 +0000 (16:51 +0000)]
Added a comment: shell helper