Commit graph

12136 commits

Author SHA1 Message Date
Joey Hess
7be8950138
propigateAdjustedCommits in seekExportContent
push: When on an adjusted branch, propagate changes to parent branch before
updating export remotes.

This is a somewhat redundant call to propigateAdjustedCommits, since it
also gets called at pushLocal time. That other one needs to come after
importing from importtree remotes though, and seekExportContent has to come
earlier, so I don't see a way to avoid doing it twice.

Note that git-annex sync also manages to avoid the problem, it's only
git-annex push that had the bug.

Sponsored-by: Leon Schuermann on Patreon
2023-09-11 14:54:26 -04:00
Joey Hess
f3e5fc6d89
comment (and close) 2023-09-11 13:19:55 -04:00
Joey Hess
ec63bab79b
comment 2023-09-11 13:15:56 -04:00
jstritch
bd2e565592 2023-09-10 15:56:21 +00:00
jstritch
826918fb05 Added a comment: git annex pull is also broken 2023-09-09 14:49:35 +00:00
jstritch
c7346c2c47 2023-09-08 15:56:59 +00:00
Joey Hess
ecb9fb3b70
comment 2023-09-07 15:07:41 -04:00
Joey Hess
baf8e4f6ed
Override safe.bareRepository for git remotes
Fix using git remotes that are bare when git is configured
with safe.bareRepository = explicit

Sponsored-by: Dartmouth College's DANDI project
2023-09-07 14:56:26 -04:00
Joey Hess
cbfd214993
set safe.directory when getting config for git-annex-shell or git remotes
Fix more breakage caused by git's fix for CVE-2022-24765, this time
involving a remote (either local or ssh) that is a repository not owned by
the current user.

Sponsored-by: Dartmouth College's DANDI project
2023-09-07 14:40:50 -04:00
yarikoptic
4d165518c3 original report on misleading reasons stated by enableremote for the need of safe.directory case 2023-08-31 15:58:52 +00:00
gitannex@fe613c61745e9d1e7f6df5e24a666828bb5682cc
86c70833a1 Added a comment 2023-08-31 01:56:30 +00:00
gitannex@fe613c61745e9d1e7f6df5e24a666828bb5682cc
578f24b632 2023-08-31 01:44:23 +00:00
gitannex@fe613c61745e9d1e7f6df5e24a666828bb5682cc
2837c63282 2023-08-31 01:40:02 +00:00
gitannex@fe613c61745e9d1e7f6df5e24a666828bb5682cc
e67050b8d3 2023-08-31 01:34:23 +00:00
Joey Hess
70acc8864d
comment 2023-08-28 12:20:49 -04:00
derphysiker
b2887edc96 2023-08-27 07:38:44 +00:00
Joey Hess
88b0bb5793
fix build on windows
thanks to jkniiv
2023-08-18 13:03:47 -04:00
jkniiv
740d7a43be report on a build failure on Windows regarding Utility.Url.Parse 2023-08-17 09:53:39 +00:00
Joey Hess
ea6f5bfc01
done 2023-08-16 16:02:03 -04:00
Joey Hess
9fffa85a9e
comment 2023-08-15 13:21:28 -04:00
Joey Hess
d467c70ef7
change sync content transition plan and fine tune warning
Only display warning when git-annex sync (without --content or
--no-content) is used with repositories that have preferred content
configured.

Sponsored-by: Leon Schuermann on Patreon
2023-08-14 13:51:35 -04:00
aurtzy
d8602aace0 include system that i forgot in report 2023-08-13 19:48:46 +00:00
aurtzy
1c621f24d8 2023-08-11 01:22:30 +00:00
Joey Hess
3f6c762a3d
comment 2023-08-08 13:43:04 -04:00
jkniiv
e9ad2d83f4 Added a comment 2023-08-08 16:38:53 +00:00
Joey Hess
6d83bcff0f
Fix behavior of onlyingroup
Sponsored-by: k0ld on Patreon
2023-08-07 13:05:11 -04:00
jkniiv
b4d1591283 report on --onlyingroup only partially working 2023-08-05 11:15:30 +00:00
Joey Hess
471ea17ae3
comment 2023-07-21 15:33:59 -04:00
Joey Hess
15f5a9b837
remove spam 2023-07-21 15:15:11 -04:00
Joey Hess
f7dc2511f7
comment 2023-07-21 15:14:36 -04:00
Joey Hess
b15366494a
directory: Remove empty hash directories when dropping content
Failure to remove is not treated as a problem, and no permissions
modifications are done, to avoid unexpected states.

Sponsored-by: Luke Shumaker on Patreon
2023-07-21 14:57:29 -04:00
Joey Hess
33ba537728
deal with Amazon S3 breaking change for public=yes
* S3: Amazon S3 buckets created after April 2023 do not support ACLs,
  so public=yes cannot be used with them. Existing buckets configured
  with public=yes will keep working.
* S3: Allow setting publicurl=yes without public=yes, to support
  buckets that are configured with a Bucket Policy that allows public
  access.

Sponsored-by: Joshua Antonishen on Patreon
2023-07-21 13:59:07 -04:00
Joey Hess
ddc7f36d53
comment 2023-07-21 13:01:46 -04:00
hipohaha
214907acef Added a comment: thank 2023-07-21 10:08:15 +00:00
tomdhunt
cdcb30464a 2023-07-19 02:49:48 +00:00
adina.wagner@2a4cac6443aada2bd2a329b8a33f4a7b87cc8eff
4b7362166b 2023-07-18 09:13:47 +00:00
nobodyinperson
bbff6dbb83 bug report 2023-07-17 10:56:08 +00:00
nobodyinperson
64edb19328 Added a comment 2023-07-17 06:12:27 +00:00
ewen
0dc8b03588 Added a comment: unspecified default preferred content = present 2023-07-17 00:50:09 +00:00
alex
f504781127 2023-07-16 06:51:33 +00:00
nobodyinperson
82ec9e5a5b Added a comment 2023-07-15 17:04:38 +00:00
Joey Hess
116b8affe5
comment 2023-07-15 12:28:32 -04:00
agot
4f85a6ac84 2023-07-14 19:14:34 +00:00
Joey Hess
b00200c73c
comment 2023-07-13 20:02:41 -04:00
ewen
1c0b53e838 Added a comment: git mv to temporary name, commit, git mv back, commit, can resolve duplicates 2023-07-13 01:12:34 +00:00
ewen
d1e87c49fc Added a comment 2023-07-13 00:54:35 +00:00
ewen
2469720e1e Added a comment: Plumbing commands vs Porcelain commands 2023-07-13 00:26:20 +00:00
Joey Hess
6a4dfb172d
Merge branch 'master' of ssh://git-annex.branchable.com 2023-07-12 13:55:10 -04:00
Joey Hess
bf496b16a4
comment 2023-07-12 13:54:59 -04:00
jkniiv
749b532e8f Added a comment 2023-07-12 17:30:52 +00:00
Joey Hess
b6314c0207
comment 2023-07-12 13:27:33 -04:00
jkniiv
b6c5b471b0 Added a comment 2023-07-12 16:25:49 +00:00
nobodyinperson
4ed5cfa812 Added a comment 2023-07-12 13:10:26 +00:00
ewen
98f1eb48ea Added a comment: Alternative proposal for better backwards compatibility 2023-07-12 12:48:04 +00:00
nobodyinperson
d030ed8eb9 Added a comment: There is already something like fullsync: git annex assist, suggestion: new metasync command 2023-07-12 11:15:26 +00:00
ewen
0386845605 Added a comment: Preferred content settings not really an alternative 2023-07-12 10:53:41 +00:00
ewen
0838e7a07f Added a comment: History of change 2023-07-12 10:27:43 +00:00
nobodyinperson
e4cb4ec3d2 Added a comment 2023-07-12 09:21:56 +00:00
jkniiv
1b8d5940bd Added a comment 2023-07-12 07:33:16 +00:00
jkniiv
12054cd7e2 Added a comment: I have to agree that this change to sync is annoying 2023-07-12 07:18:54 +00:00
ewen
d733b8ed04 Recommend accepting "list" output encoding of filename as input too 2023-07-12 06:54:05 +00:00
nobodyinperson
c001844dd3 Added a comment 2023-07-12 06:49:48 +00:00
ewen
6ed3ed7e57 Suggest using "git annex fullsync" to trigger a full sync, not changing "git annex sync" behaviour 2023-07-12 04:16:48 +00:00
Joey Hess
240bae38f6
sync: When in an adjusted branch, merge changes from the original branch
This causes changes to the original branch to get merged with a single
sync. Before, it took 2 syncs; the first happened to update the synced/
branch, and the second merged changes from the synced/ branch into the
ajusted branch.

Using mergeToAdjustedBranch when tomerge == origbranch is probably
overkill, but it does work fine.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-07-06 12:42:24 -04:00
Joey Hess
adb09117f1
propigateAdjustedCommits: avoid overwriting diverged original branch
Bug fix: Re-running git-annex adjust or sync when in an adjusted branch
would overwrite the original branch, losing any commits that had been made
to it since the adjusted branch was created.

When git-annex adjust is run in this situation, it will display a warning
about the diverged branches.

When git-annex sync is run in this situation, mergeToAdjustedBranch
will merge the changes from the original branch to the adjusted branch.
So it does not need to display the divergence warning.

Note that for some reason, I'm needing to run sync twice for that to
happen. The first run does not do the merge and the second does. I'm unsure
why and so am not fully done with this bug.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-07-05 17:09:49 -04:00
Joey Hess
a05bc6a314
Fix breakage when git is configured with safe.bareRepository = explicit
Running git config --list inside .git then fails, so better to only
do that when --git-dir was specified explicitly. Otherwise, when the
repository is not bare, run the command inside the working tree.

Also make init detect when the uuid it just set cannot be read and fail
with an error, in case git changes something that breaks this later.

I still don't actually understand why git-annex add/assist -J2 was
affected but -J1 was not. But I did show that it was skipping writing to
the location log, because the uuid was NoUUID.

Sponsored-by: Graham Spencer on Patreon
2023-07-05 14:43:14 -04:00
Joey Hess
321681cd1b
renamed bug 2023-07-05 14:09:21 -04:00
Joey Hess
9d2a7c4bb6
erk 2023-07-05 13:57:28 -04:00
Joey Hess
fe0e0c0523
also affects add 2023-07-05 13:42:52 -04:00
Joey Hess
3c1d18cb3b
assist: With --jobs, parallelize transferring content to/from remotes
Command.Add.seek starts concurrency with CommandStages. And for
Command.Sync, it needs TransferStages. So, to get both types of concurrency
for the two different parts, it either needs to change the type of
concurrency in between, or just call startConcurrency once for each.

It seems safe enough to call startConcurrency twice, because it does shut
down concurrency (mostly) at the end, and eg the old Annex.workers get
emptied.

Sponsored-by: unqueued on Patreon
2023-07-05 12:47:30 -04:00
Joey Hess
c2c2abe6ca
bug 2023-07-05 12:11:48 -04:00
nobodyinperson
583f87fdca 2023-07-04 18:49:01 +00:00
yarikoptic
d735bad076 initial report on annex sync odd behavior loosing my precious commit 2023-06-30 19:39:46 +00:00
Joey Hess
e1fc9e204e
added git-annex satisfy
This ended up having an interface like sync, rather than like get/copy/drop.
That let it be implemented in terms of sync, which took a lot less code.
Also, it lets it handle many of the edge cases that sync does, such as
getting files that are not visible in a --hide-missing branch, and sending
files to exporttree remotes.

As well as being easier to implement, `git-annex satisfy myremote` makes
sense as it satisfies the preferred content settings of the remote.
`git-annex satisfy somefile` does not form a sentence that makes sense. So
while -C can be a little bit annoying, it still makes sense to have this
syntax.

Note that, while I initially thought this would also satisfy numcopies, it
does not. Arguably it ought to. But, sync does not send files in order to
satisfy numcopies, it only sends files to satisfy preferred content. And
it's important that this transfer the same files as sync does, because
it will probably be used in a workflow where the user sometimes syncs and
sometimes satisfies, and does not expect satisfy to do things that sync
would not do.

(Also opened a new bug that also affects sync et all, not only this command.)

Sponsored-by: Nicholas Golder-Manning on Patreon
2023-06-29 15:34:53 -04:00
pat
63e116768c 2023-06-29 04:45:15 +00:00
Joey Hess
19570263c0
reopen on second thought 2023-06-22 13:48:48 -04:00
Joey Hess
6c84aabe63
document annex.thin risk to locked files pointing at same content 2023-06-21 15:39:15 -04:00
Joey Hess
928b2a4839
create journal directory in withJournalHandle
Fixes a crash by git-annex repair when .git/annex/journal/ does not exist.

Normally the journal directory is created before withJournalHandle gets
run, but git-annex repair can be run in a situation where it does not
exist.
2023-06-21 15:23:59 -04:00
Joey Hess
aa8be9850a
close old bug report 2023-06-21 14:51:17 -04:00
Joey Hess
e59a0b8ce7
apparently fixed 2023-06-21 14:45:36 -04:00
Joey Hess
618ef04f86
closing some old bugs 2023-06-21 14:42:36 -04:00
Joey Hess
65227798b2
close 2023-06-21 14:39:51 -04:00
Joey Hess
55d02d383c
comment 2023-06-21 14:36:54 -04:00
Joey Hess
b4c945a8ae
close 2023-06-21 14:32:01 -04:00
Joey Hess
8f5382daa1
close (for real this time) 2023-06-21 14:27:33 -04:00
Joey Hess
4cd44583b9
moreinfo 2023-06-21 14:23:57 -04:00
Joey Hess
fb6098a523
moreinfo 2023-06-21 14:21:34 -04:00
Joey Hess
9925543039
moreinfo 2023-06-21 14:11:38 -04:00
Joey Hess
02b56f1d9d
comment 2023-06-21 14:10:34 -04:00
Joey Hess
ffd737e2be
update 2023-06-21 13:59:13 -04:00
Joey Hess
6d31f35f42
close 2023-06-21 13:56:10 -04:00
Joey Hess
69c3918d85
tag moreinfo 2023-06-21 13:50:13 -04:00
Joey Hess
217a6abb19
assistant: Fix a crash when a small file is deleted immediately after being created
git add will fail if the file got deleted in the meantime. And since it was
queued, there was a window until the queue flushed where a deletion of the
file would cause a crash.

Instead, reuse Command.Add.addFile, which sha1 hashes the file itself
immediately, and then queues the index update. Ignore exceptions that will
happen if the file got deleted already.

Sponsored-by: k0ld on Patreon
2023-06-19 12:44:56 -04:00
Lukey
4a42e7d11e removed 2023-06-16 20:04:05 +00:00
Lukey
aaa4ba0261 removed 2023-06-16 19:59:28 +00:00
Lukey
3b4254153b removed 2023-06-16 19:59:09 +00:00
Joey Hess
12fa697ca5
Merge branch 'master' of ssh://git-annex.branchable.com 2023-06-15 10:08:16 -04:00
Joey Hess
114a2d7504
Fix display when run with -J1
Commit b6642dde8a broke it by enabling
non-concurrent display mode while leaving concurrency set in the config
and having already started concurrency earlier.

(I don't actually know if that commit was a good idea.)

Sponsored-By: Brett Eisenberg on Patreon
2023-06-15 10:07:54 -04:00
Joey Hess
772d7fa82d
bug 2023-06-15 09:39:56 -04:00
stephenriley
4fdc2113d5 Added a comment 2023-06-15 02:57:35 +00:00
stephenriley
393441a561 Added a comment 2023-06-15 02:57:26 +00:00
jacksondm33@cf6e91518a0fa6a05945d5d4e03ae770f6383615
276c964a9f 2023-06-14 22:06:10 +00:00
Joey Hess
38153ad340
assistant: Add dotfiles to git by default, unless annex.dotfiles is configured
Tthe same as git-annex add does.

Sponsored-by: Luke Shumaker on Patreon
2023-06-12 13:25:04 -04:00
Joey Hess
357291c13c
comment 2023-06-12 13:06:04 -04:00
jgoerzen
56d6b622d7 Added a comment 2023-06-11 02:18:23 +00:00
jacksondm33@cf6e91518a0fa6a05945d5d4e03ae770f6383615
37a9982d86 2023-06-10 16:03:12 +00:00
Joey Hess
c33c226abd
fixed 2023-06-09 16:13:52 -04:00
Joey Hess
a0ab425c95
add ContentIndentifiersCidRemoteKeyIndex
Optimise database to further speed up importing large trees from special
remotes.

See comment for details of why the other index didn't help cid queries.

It would probably be better to manually create an index on only cid, rather
than adding a second uniqueness constraint that is a larger index. But
persitent does not support creating indexes, and an attempt to manually add
it to the migration failed.

Sponsored-by: Nicholas Golder-Manning on Patreon
2023-06-09 15:12:33 -04:00
Joey Hess
532b227086
update exportdb tree in getImportableContents
This avoids bottlenecking on git check-ignore in a particular situation.
Also, there may have been a correctness issue with it not having updated it.
When the exportdb is already up-to-date, this is not expensive. And the
exportdb is updated elsewhere, so usually it is up-to-date.

Sponsored-by: Joshua Antonishen on Patreon
2023-06-08 18:36:24 -04:00
Joey Hess
5934e7d402
Merge branch 'master' of ssh://git-annex.branchable.com 2023-06-08 16:54:05 -04:00
yarikoptic
96a6946a14 stalling report 2023-06-08 15:46:29 +00:00
Joey Hess
7888702955
update 2023-06-07 11:32:53 -04:00
Joey Hess
5bc37c2de2
comment 2023-06-06 15:17:09 -04:00
Joey Hess
d63af3f52e
comment 2023-06-06 14:45:48 -04:00
Joey Hess
3c15e0f7a0
cache negative lookups of global numcopies and mincopies
Speeds up eg git-annex sync --content by up to 50%. When it does not need
to transfer or drop anything, it now noops a lot more quickly.

I didn't see anything else in sync --content noop loop that could really
be sped up. It has to cat git objects to keys, stat object files, etc.

Sponsored-by: unqueued on Patreon
2023-06-06 14:43:25 -04:00
Mowgli
6c60e1d715 Added a comment 2023-06-05 20:35:19 +00:00
Mowgli
c0b2eb3914 Added a comment: comment igendwas 2023-06-05 20:33:42 +00:00
jgoerzen
432e7cd9f3 Added a comment 2023-06-05 19:32:29 +00:00
Joey Hess
1f0f774ab7
close this release blocker 2023-06-05 15:10:52 -04:00
Joey Hess
07db8e234a
comment and wontfix 2023-06-05 14:40:25 -04:00
Joey Hess
528882a6df
comment 2023-06-05 14:08:12 -04:00
jgoerzen
2c2a84caac Added a comment 2023-06-02 21:44:54 +00:00
Joey Hess
b43fb4923f
comment 2023-06-02 13:11:24 -04:00
Joey Hess
b8750bcb17
Merge branch 'master' of ssh://git-annex.branchable.com 2023-06-02 12:14:03 -04:00
Joey Hess
b40b368857
comment 2023-06-02 12:13:50 -04:00
jgoerzen
5dcbf7d41e Added a comment 2023-06-02 03:25:27 +00:00
Joey Hess
7178db5e06
Merge branch 'master' of ssh://git-annex.branchable.com 2023-06-01 18:43:29 -04:00
Joey Hess
2e92cef13f
comment 2023-06-01 18:43:17 -04:00
jgoerzen
53eeca40ae Added a comment 2023-06-01 21:26:23 +00:00
Joey Hess
594110a6af
comment 2023-06-01 14:21:55 -04:00
Joey Hess
029b08f54b
Merge branch 'master' of ssh://git-annex.branchable.com 2023-05-31 16:34:03 -04:00
Joey Hess
f6aa097a39
avoid import writing to cidsdb initially
Speed up importing trees from special remotes somewhat by avoiding
redundant writes to sqlite database.

Before, import would write to both the git-annex branch and also to the
sqlite database. But then the next time it was run, needsUpdateFromLog
would see the branch had changed, so run updateFromLog, which would make
the same writes to the sqlite database a second time.

Now import writes only to the git-annex branch. The next time it's run,
needsUpdateFromLog sees that the branch has changed and so calls
updateFromLog, which updates the sqlite database.

Why defer the write to the sqlite database like this? It seems that it
could write to the database as it goes, and at the end call
recordAnnexBranchTree to indicate that the information in the git-annex
branch has all been written to the cidsdb. That would avoid the second
import doing extra work.

But, there could be other processes running at the same time, and one of
them may update the git-annex branch, eg merging a remote git-annex branch
into it. Any cids logs on that merged git-annex branch would not be
reflected in the cidsdb yet. If the import then called
recordAnnexBranchTree, the cidsdb would never get updated with that merged
information.

I don't think there's a good way to prevent, or to detect that situation.
So, it can't call recordAnnexBranchTree at the end. So it might as well
wait until the next run and do updateFromLog then. It could instead do
updateFromLog at the end, but it's going to check needsUpdateFromLog
at the beginning anyway.

Note that the database writes were queued, so there is already a cidmap
that is used to remember changes that the current process has made.
So, omitting database writes can't change the behavior of the current
process.

Also note that thirdpartypopulatedimport uses recordcidkeyindb, which
reflects what it already did. That code path does not use the cidmap,
but does not need to query it either. It might be possible to make that
code path also only update the git-annex branch and not the db, but I
haven't checked.

Sponsored-by: Noam Kremen on Patreon
2023-05-30 17:05:28 -04:00
jgoerzen
f47e7abd57 Added a comment 2023-05-30 20:58:21 +00:00
Joey Hess
5070087a63
repair: Fix handling of git ref names on Windows
Sponsored-by: Kevin Mueller on Patreon
2023-05-30 16:09:13 -04:00
Joey Hess
aaeae746f0
comment and a neat idea 2023-05-30 15:42:34 -04:00
Joey Hess
5da7f703b0
comment 2023-05-30 14:30:39 -04:00
jgoerzen
e1fa970010 2023-05-30 12:23:28 +00:00
jgoerzen
4547a467b1 2023-05-30 00:37:10 +00:00
jgoerzen
da99a12f21 2023-05-30 00:35:54 +00:00
Mowgli
5fe8ae8f87 Added a comment: Use locales for that porpose 2023-05-29 22:42:13 +00:00
matthew.cieslak@100d765b497d71318a302445df55bbab4b78f4d5
8dfc5dc16e 2023-05-25 13:44:52 +00:00
Joey Hess
f1cdb79ca4
assist: honor gitignore
Sponsored-by: Graham Spencer on Patreon
2023-05-24 14:04:09 -04:00
nobodyinperson
0b9b85f009 2023-05-24 14:59:40 +00:00
Joey Hess
c64436518f
comment 2023-05-23 12:00:01 -04:00
Joey Hess
b46126cd87
comment 2023-05-23 11:45:17 -04:00
Mowgli
b7788c718b 2023-05-23 13:10:45 +00:00
yarikoptic
2616f7f0d3 Added a comment 2023-05-19 19:22:04 +00:00
Joey Hess
0f89d221bd
version: Avoid error message when entire output is not read
Sponsored-by: Dartmouth College's Datalad project
2023-05-19 15:00:57 -04:00
yarikoptic
b76a44511b Added a comment 2023-05-19 18:49:48 +00:00
yarikoptic
b22d49b7f1 Added a comment 2023-05-19 18:49:29 +00:00