git-annex.git
5 years agodevblog
Joey Hess [Thu, 27 May 2021 16:45:06 +0000 (12:45 -0400)]
devblog

5 years agoAdded annex.adviceNoSshCaching config.
Joey Hess [Thu, 27 May 2021 16:37:39 +0000 (12:37 -0400)]
Added annex.adviceNoSshCaching config.

Sponsored-by: Brock Spratlen on Patreon
5 years agocomment
Joey Hess [Thu, 27 May 2021 16:23:57 +0000 (12:23 -0400)]
comment

5 years agocomment and reject todo
Joey Hess [Thu, 27 May 2021 16:19:35 +0000 (12:19 -0400)]
comment and reject todo

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 27 May 2021 16:14:29 +0000 (12:14 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agocomment
Joey Hess [Thu, 27 May 2021 16:13:49 +0000 (12:13 -0400)]
comment

5 years agoAdded a comment
Atemu [Wed, 26 May 2021 07:11:20 +0000 (07:11 +0000)]
Added a comment

5 years agocomments
Joey Hess [Tue, 25 May 2021 20:37:32 +0000 (16:37 -0400)]
comments

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 25 May 2021 17:10:34 +0000 (13:10 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoNew matching options --excludesamecontent and --includesamecontent
Joey Hess [Tue, 25 May 2021 17:05:42 +0000 (13:05 -0400)]
New matching options --excludesamecontent and --includesamecontent

The normalisation of filenames turns out to be the tricky part here,
because the associated files coming out of the keys db may look like
"./foo/bar" or "../bar". For the former to match a glob like "foo/*",
it needs to be normalised.

Note that, on windows, normalise "./foo/bar" = "foo\\bar"
which a glob like "foo/*" won't match. So the glob is matched a second
time, on the toInternalGitPath, so allowing the user to provide a glob
with the slashes in either direction. However, this still won't support
some wacky edge cases like the user providing a glob of "foo/bar\\*"

Sponsored-by: Dartmouth College's Datalad project
5 years agoAdded a comment
Lukey [Tue, 25 May 2021 16:48:26 +0000 (16:48 +0000)]
Added a comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 25 May 2021 15:45:02 +0000 (11:45 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoMerge branch 'trackassociated'
Joey Hess [Tue, 25 May 2021 15:43:52 +0000 (11:43 -0400)]
Merge branch 'trackassociated'

5 years agocomments
Joey Hess [Tue, 25 May 2021 15:43:46 +0000 (11:43 -0400)]
comments

5 years agoprevent dropping required content of other file using same content
Joey Hess [Tue, 25 May 2021 14:57:06 +0000 (10:57 -0400)]
prevent dropping required content of other file using same content

When two files have the same content, and a required content expression
matches one but not the other, dropping the latter file will fail as it
would also remove the content of the required file.

This will slow down drop (w/o --auto), dropunused, mirror, and move, by one
keys db lookup per file. But I did include an optimisation to avoid a
double db lookup in the drop --auto / sync --content case. I suspect that
dropunused could also use PreferredContentChecked True, but haven't
entirely thought it through and it's rarely used with enough files for the
optimisation to matter.

Sponsored-by: Dartmouth College's Datalad project
5 years ago(no commit message)
Atemu [Tue, 25 May 2021 14:51:21 +0000 (14:51 +0000)]

5 years agoimprove changelog
Joey Hess [Tue, 25 May 2021 14:08:29 +0000 (10:08 -0400)]
improve changelog

5 years agorequired content update
Joey Hess [Tue, 25 May 2021 14:04:29 +0000 (10:04 -0400)]
required content update

5 years agoupdate
Joey Hess [Tue, 25 May 2021 13:58:46 +0000 (09:58 -0400)]
update

5 years agoAdded a comment: is there some way to remove a file I've commited?
datamanager [Tue, 25 May 2021 13:10:35 +0000 (13:10 +0000)]
Added a comment: is there some way to remove a file I've commited?

5 years agoAdded a comment
Atemu [Tue, 25 May 2021 11:00:39 +0000 (11:00 +0000)]
Added a comment

5 years agocomment
Joey Hess [Mon, 24 May 2021 20:43:06 +0000 (16:43 -0400)]
comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 24 May 2021 20:31:58 +0000 (16:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoupdate
Joey Hess [Mon, 24 May 2021 20:31:14 +0000 (16:31 -0400)]
update

5 years agoMerge branch 'master' into trackassociated
Joey Hess [Mon, 24 May 2021 20:27:24 +0000 (16:27 -0400)]
Merge branch 'master' into trackassociated

5 years agoupdate
Joey Hess [Mon, 24 May 2021 20:27:07 +0000 (16:27 -0400)]
update

5 years agoMerge branch 'master' into trackassociated
Joey Hess [Mon, 24 May 2021 20:24:53 +0000 (16:24 -0400)]
Merge branch 'master' into trackassociated

5 years agofix deadlock
Joey Hess [Mon, 24 May 2021 19:31:06 +0000 (15:31 -0400)]
fix deadlock

git-annex test hung, at varying points depending
on when git decided to run the smudge clean filter.

Recent changes to reconcileStaged caused a deadlock, when git write-tree
for some reason decides to run the smudge clean filter. Which tries
to open the keys db, and blocks waiting for the lock file that its
grandparent has locked.

I don't know why git write-tree does that. It's supposed to only write a
tree from the index which needs no smudge/clean filtering.

I've verified that, in a situation where git write-tree runs the clean
filter, disabling the filter results in a tree being written that
contains the annex link, not eg, the worktree file content. So it seems
safe to disable the clean filter, but also this seems likely to be
working around a bug in git because it seems it is running the clean
filter in a situation where the object has already been cleaned.

Sponsored-by: Dartmouth College's Datalad project
5 years agoclearer language
Joey Hess [Mon, 24 May 2021 18:54:51 +0000 (14:54 -0400)]
clearer language

5 years agofix case where keys db was not initialized in time
Joey Hess [Mon, 24 May 2021 18:46:59 +0000 (14:46 -0400)]
fix case where keys db was not initialized in time

When the keys db is opened for read, and did not exist yet, it used to
skip creating it, and return mempty values. But that prevents
reconcileStaged from populating associated files information in time for
the read. This fixes the one remaining case I know of where
the fix in a56b151f9009590c97da8dbf66c1b138455657cb didn't work.

Note that, when there is a permissions error, it still avoids creating
the db and returns mempty for all queries. This does mean that
reconcileStaged does not run and so it may want to drop files that it
should not. However, presumably a permissions error on the keys database
also means that the user does not have permission to delete annex
objects, so they won't be able to drop the files anyway.

Sponsored-by: Dartmouth College's Datalad project
5 years agofix longstanding indeterminite preferred content for duplicated file problem
Joey Hess [Mon, 24 May 2021 18:02:50 +0000 (14:02 -0400)]
fix longstanding indeterminite preferred content for duplicated file problem

* drop: When two files have the same content, and a preferred content
  expression matches one but not the other, do not drop the file.
* sync --content, assistant: Fix an edge case where a file that is not
  preferred content did not get dropped.

The sync --content edge case is that handleDropsFrom loaded associated files
and used them without verifying that the information from the database was
not stale.

It seemed best to avoid changing --want-drop's behavior, this way when
debugging a preferred content expression with it, the files matched will
still reflect the expression. So added a note to the --want-drop documentation,
to make clear it may not behave identically to git-annex drop --auto.

While it would be possible to introspect the preferred content
expression to see if it matches on filenames, and only look up the
associated files when it does, it's generally fairly rare for 2 files to
have the same content, and the database lookup is already avoided when
there's only 1 file, so I did not implement that further optimisation.

Note that there are still some situations where the associated files
database does not get locked files recorded in it, which will prevent
this fix from working.

Sponsored-by: Dartmouth College's Datalad project
5 years agoremove warning about combining options
Joey Hess [Mon, 24 May 2021 17:53:28 +0000 (13:53 -0400)]
remove warning about combining options

the option parser no longer allows combining --want-get/--want-drop with
options like --all

5 years agonote about a wart
Joey Hess [Mon, 24 May 2021 16:05:35 +0000 (12:05 -0400)]
note about a wart

All code that uses associated files already deals with this problem,
which used to be worse. Unfortunately I was not able to entirely
eliminate it, although it happens in fewer cases now.

5 years agoupdate
Joey Hess [Mon, 24 May 2021 15:59:01 +0000 (11:59 -0400)]
update

5 years agorefactoring
Joey Hess [Mon, 24 May 2021 15:38:22 +0000 (11:38 -0400)]
refactoring

5 years agofixed reconcileStaged crash when index is locked or in conflict
Joey Hess [Mon, 24 May 2021 15:33:23 +0000 (11:33 -0400)]
fixed reconcileStaged crash when index is locked or in conflict

Eg, when git commit runs the smudge filter.

Commit 428c91606b434512d1986622e751c795edf4df44 introduced the crash,
as write-tree fails in those situations. Now it will work, and git-annex
always gets up-to-date information even in those situations. It does
need to do a bit more work, each time git-annex is run with the index
locked. Although if the index is unmodified from the last time
write-tree succeeded, that work is avoided.

5 years agoMerge branch 'master' into trackassociated
Joey Hess [Mon, 24 May 2021 14:24:53 +0000 (10:24 -0400)]
Merge branch 'master' into trackassociated

5 years agoAdded a comment
parhuzamos [Mon, 24 May 2021 09:33:50 +0000 (09:33 +0000)]
Added a comment

5 years agoAdded a comment: defining preferred content state
Ilya_Shlyakhter [Sun, 23 May 2021 20:39:23 +0000 (20:39 +0000)]
Added a comment: defining preferred content state

5 years ago(no commit message)
alt [Sun, 23 May 2021 03:07:50 +0000 (03:07 +0000)]

5 years agoOn second thought, simpler not to mention the version.
falsifian [Sun, 23 May 2021 01:12:33 +0000 (01:12 +0000)]
On second thought, simpler not to mention the version.

5 years agogit-annex is available for OpenBSD 6.9.
falsifian [Sun, 23 May 2021 01:11:56 +0000 (01:11 +0000)]
git-annex is available for OpenBSD 6.9.

5 years agoAdded a comment
Atemu [Sat, 22 May 2021 17:31:01 +0000 (17:31 +0000)]
Added a comment

5 years agoAdded a comment
Lukey [Sat, 22 May 2021 17:19:19 +0000 (17:19 +0000)]
Added a comment

5 years agoAdded a comment
Atemu [Sat, 22 May 2021 17:02:07 +0000 (17:02 +0000)]
Added a comment

5 years agoAdded a comment
Atemu [Sat, 22 May 2021 10:20:35 +0000 (10:20 +0000)]
Added a comment

5 years agoAdded a comment
Atemu [Sat, 22 May 2021 09:55:31 +0000 (09:55 +0000)]
Added a comment

5 years agoAdded a comment
strmd [Sat, 22 May 2021 05:16:45 +0000 (05:16 +0000)]
Added a comment

5 years agocomment
Joey Hess [Fri, 21 May 2021 20:44:44 +0000 (16:44 -0400)]
comment

5 years agoinclude locked files in the keys database associated files
Joey Hess [Fri, 21 May 2021 19:47:37 +0000 (15:47 -0400)]
include locked files in the keys database associated files

Before only unlocked files were included.

The initial scan now scans for locked as well as unlocked files. This
does mean it gets a little bit slower, although I optimised it as well
as I think it can be.

reconcileStaged changed to diff from the current index to the tree of
the previous index. This lets it handle deletions as well, removing
associated files for both locked and unlocked files, which did not
always happen before.

On upgrade, there will be no recorded previous tree, so it will diff
from the empty tree to current index, and so will fully populate the
associated files, as well as removing any stale associated files
that were present due to them not being removed before.

reconcileStaged now does a bit more work. Most of the time, this will
just be due to running more often, after some change is made to the
index, and since there will be few changes since the last time, it will
not be a noticable overhead. What may turn out to be a noticable
slowdown is after changing to a branch, it has to go through the diff
from the previous index to the new one, and if there are lots of
changes, that could take a long time. Also, after adding a lot of files,
or deleting a lot of files, or moving a large subdirectory, etc.

Command.Lock used removeAssociatedFile, but now that's wrong because a
newly locked file still needs to have its associated file tracked.

Command.Rekey used removeAssociatedFile when the file was unlocked.
It could remove it also when it's locked, but it is not really
necessary, because it changes the index, and so the next time git-annex
run and accesses the keys db, reconcileStaged will run and update it.

There are probably several other places that use addAssociatedFile and
don't need to any more for similar reasons. But there's no harm in
keeping them, and it probably is a good idea to, if only to support
mixing this with older versions of git-annex.

However, mixing this and older versions does risk reconcileStaged not
running, if the older version already ran it on a given index state. So
it's not a good idea to mix versions. This problem could be dealt with
by changing the name of the gitAnnexKeysDbIndexCache, but that would
leave the old file dangling, or it would need to keep trying to remove
it.

5 years agocomplications
Joey Hess [Fri, 21 May 2021 18:18:38 +0000 (14:18 -0400)]
complications

5 years agoplan for these
Joey Hess [Fri, 21 May 2021 17:50:26 +0000 (13:50 -0400)]
plan for these

5 years agocomment
Joey Hess [Fri, 21 May 2021 16:39:35 +0000 (12:39 -0400)]
comment

5 years agocomment
Joey Hess [Fri, 21 May 2021 16:26:00 +0000 (12:26 -0400)]
comment

5 years agocomment
Joey Hess [Fri, 21 May 2021 16:07:21 +0000 (12:07 -0400)]
comment

5 years agocomment
Joey Hess [Fri, 21 May 2021 15:48:57 +0000 (11:48 -0400)]
comment

5 years agocomment
Joey Hess [Fri, 21 May 2021 15:31:38 +0000 (11:31 -0400)]
comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 21 May 2021 15:28:17 +0000 (11:28 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoreopen per comment
Joey Hess [Fri, 21 May 2021 15:27:13 +0000 (11:27 -0400)]
reopen per comment

5 years agotodo
Joey Hess [Thu, 20 May 2021 15:18:46 +0000 (11:18 -0400)]
todo

5 years agoAdded a comment
Nick_P [Thu, 20 May 2021 10:43:14 +0000 (10:43 +0000)]
Added a comment

5 years agoAdded a comment
Atemu [Wed, 19 May 2021 17:13:45 +0000 (17:13 +0000)]
Added a comment

5 years agoAdded a comment
Nick_P [Wed, 19 May 2021 16:59:21 +0000 (16:59 +0000)]
Added a comment

5 years agoAdded a comment
Atemu [Wed, 19 May 2021 16:54:19 +0000 (16:54 +0000)]
Added a comment

5 years agofix by improving docs
Joey Hess [Wed, 19 May 2021 15:13:53 +0000 (11:13 -0400)]
fix by improving docs

5 years agocomment
Joey Hess [Wed, 19 May 2021 15:07:02 +0000 (11:07 -0400)]
comment

5 years agocomment
Joey Hess [Wed, 19 May 2021 14:55:35 +0000 (10:55 -0400)]
comment

5 years agoAdded a comment
Nick_P [Wed, 19 May 2021 14:35:43 +0000 (14:35 +0000)]
Added a comment

5 years agoAdded a comment
Nick_P [Wed, 19 May 2021 14:29:23 +0000 (14:29 +0000)]
Added a comment

5 years agoAdded a comment
strmd [Wed, 19 May 2021 07:00:58 +0000 (07:00 +0000)]
Added a comment

5 years ago(no commit message)
strmd [Wed, 19 May 2021 06:56:34 +0000 (06:56 +0000)]

5 years agoAdded a comment
strmd [Wed, 19 May 2021 06:33:03 +0000 (06:33 +0000)]
Added a comment

5 years ago(no commit message)
Nick_P [Tue, 18 May 2021 17:35:33 +0000 (17:35 +0000)]

5 years agoremoved
Atemu [Tue, 18 May 2021 17:16:12 +0000 (17:16 +0000)]
removed

5 years agoAdded a comment
Atemu [Tue, 18 May 2021 16:23:09 +0000 (16:23 +0000)]
Added a comment

5 years agoForgot the assistant needed for repro
Atemu [Tue, 18 May 2021 16:16:56 +0000 (16:16 +0000)]
Forgot the assistant needed for repro

5 years agotodo for extra logging when content changed
yarikoptic [Tue, 18 May 2021 14:05:18 +0000 (14:05 +0000)]
todo for extra logging when content changed

5 years agoAdded a comment
Atemu [Tue, 18 May 2021 09:13:32 +0000 (09:13 +0000)]
Added a comment

5 years agoupdate for filter-branch
Joey Hess [Mon, 17 May 2021 19:03:47 +0000 (15:03 -0400)]
update for filter-branch

5 years agofilter-branch: New command, useful to produce a filtered version of the git-annex...
Joey Hess [Mon, 17 May 2021 18:16:46 +0000 (14:16 -0400)]
filter-branch: New command, useful to produce a filtered version of the git-annex branch, eg when splitting a repository

5 years agoMerge branch 'filter-branch'
Joey Hess [Mon, 17 May 2021 18:16:13 +0000 (14:16 -0400)]
Merge branch 'filter-branch'

5 years agodecided not to include export/import trees
Joey Hess [Mon, 17 May 2021 18:12:15 +0000 (14:12 -0400)]
decided not to include export/import trees

They're only needed to cover a gc edge case, and it's better someone
gets caught by that edge case than that someone who does not know about
them ends up with a filtered git-annex branch that contains such a tree
when some of the files listed in it are ones they wanted to *remove*
from the repository.

5 years agoinclude info for sameas repos
Joey Hess [Mon, 17 May 2021 18:04:14 +0000 (14:04 -0400)]
include info for sameas repos

It's not currently possible to exclude a sameas repo using its
annex-config-uuid. (Remote.nameToUUID rejects them).
Since there's no real documented way to learn those, this seems ok, at
least for now. Also it avoids the problem of someone excluding the
parent but including the sameas, which would probably make the sameas
repo not usable when using the filtered branch.

5 years agofilter-branch working aside from some edge cases
Joey Hess [Mon, 17 May 2021 17:24:58 +0000 (13:24 -0400)]
filter-branch working aside from some edge cases

Added a note to man page about what happens to information that is
recorded in the private journal. Since it uses Branch.get, that
information will be copied when options allow. It seemed better to allow
it and document it than not allow it, since the options allow excluding
repositories and so can be used to exclude private repos if desired.

5 years agoadd createMessage
Joey Hess [Mon, 17 May 2021 17:07:47 +0000 (13:07 -0400)]
add createMessage

init: When annex.commitmessage is set, use that message for the commit
that creates the git-annex branch.

This will be used by filter-branch too, and it seems to make sense to let
annex.commitmessage affect it.

5 years agoimplemented filter-branch for key info
Joey Hess [Mon, 17 May 2021 15:06:47 +0000 (11:06 -0400)]
implemented filter-branch for key info

Not tested yet but should work.

Noted a possible optimisation, which should probably be added, to
speed it up in cases where there is no uuid filtering being done.
It would need Annex.Branch to add a function like getRef that uses
catFileDetails, so the sha is also returned. The difficulty would be
making it support the precached file content; if it didn't it would
probably not be any faster and could even be slower. So probably the
precaching would need to be changed to also cache the sha.

5 years agoAdded a comment: update
https://esgf-node.llnl.gov/esgf-idp/openid/tom_clune [Mon, 17 May 2021 14:53:19 +0000 (14:53 +0000)]
Added a comment: update

5 years agoconvert formatLsTree to ByteString for speed
Joey Hess [Mon, 17 May 2021 14:46:24 +0000 (10:46 -0400)]
convert formatLsTree to ByteString for speed

5 years agoAdded a comment: I Am.
jrayguinn@616789b2aec6c923cd9897c86987f05581df3601 [Mon, 17 May 2021 09:42:32 +0000 (09:42 +0000)]
Added a comment: I Am.

5 years agoAdded a comment: I Am.
jrayguinn@616789b2aec6c923cd9897c86987f05581df3601 [Mon, 17 May 2021 09:42:12 +0000 (09:42 +0000)]
Added a comment: I Am.

5 years agoAdded a comment
Atemu [Sun, 16 May 2021 11:37:25 +0000 (11:37 +0000)]
Added a comment

5 years ago(no commit message)
Atemu [Sun, 16 May 2021 11:30:38 +0000 (11:30 +0000)]

5 years ago(no commit message)
Atemu [Sun, 16 May 2021 11:05:15 +0000 (11:05 +0000)]

5 years agoAdded a comment
Atemu [Sun, 16 May 2021 10:27:47 +0000 (10:27 +0000)]
Added a comment

5 years agoMerge branch 'master' into filter-branch
Joey Hess [Fri, 14 May 2021 18:17:31 +0000 (14:17 -0400)]
Merge branch 'master' into filter-branch

5 years agodon't implicitly include all when exclude options are used
Joey Hess [Fri, 14 May 2021 18:14:46 +0000 (14:14 -0400)]
don't implicitly include all when exclude options are used

This is less erorr-prone, and easier for the user to reason about; it
preserves the man page's promise that only explicitly included
information will be copied.

5 years agoskeleton of filter-branch command, with option parser
Joey Hess [Fri, 14 May 2021 14:59:48 +0000 (10:59 -0400)]
skeleton of filter-branch command, with option parser

5 years agobranch
Joey Hess [Thu, 13 May 2021 20:18:35 +0000 (16:18 -0400)]
branch

5 years agogit-annex-filter-branch man page
Joey Hess [Thu, 13 May 2021 20:17:45 +0000 (16:17 -0400)]
git-annex-filter-branch man page

5 years agonew name for command
Joey Hess [Thu, 13 May 2021 20:07:30 +0000 (16:07 -0400)]
new name for command