Commit graph

36858 commits

Author SHA1 Message Date
Joey Hess
957a87b437
fix absolute filenames fed into --batch and git-annex info 2020-04-15 16:04:05 -04:00
Joey Hess
a14168a321
reproduced 2020-04-15 15:06:53 -04:00
Joey Hess
503abb6d54
remove warning about git gc for annex.alwayscommit=false
I doubt that warning has ever been right, but I'm sure it is not right
now.

For there to be a risk of git gc deleting objects that are in the annex
index, journal files would have to be staged into it, and deleted, but
the index not committed to the git-annex branch. And AFAICS, there is no
code path where that actually happens. I considered adding one recently,
but didn't.

The way it actually works is, as long as the user has annex.alwayscommit=false
the data lives in the journal, where it's safe from git gc. Then when
git-annex is run w/o that config, the journal is staged into the index,
which is immediately committed to the branch. There's no window where
git gc could delete the objects, because git gc only deletes objects
after some time (2 weeks by default).

Now, if git-annex gets suspended at just the wrong time, or interrupted,
then yes, it's possible. But doesn't matter whether that config was ever
set or not. And many uses of git-annex also recover from that situation
by committing to the git-annex branch.
2020-04-15 14:25:33 -04:00
Joey Hess
ddadc0c1aa
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-15 14:20:06 -04:00
Joey Hess
891e9a81eb
close bug that was apparently fixed satisfactorally 2020-04-15 14:17:21 -04:00
Joey Hess
a2fed82267
close 2020-04-15 14:15:41 -04:00
Joey Hess
7ef030b576
close old bug since git-annex no longer uses rsync like it used to 2020-04-15 14:08:48 -04:00
kyle
1a040e0c0a Added a comment 2020-04-15 18:02:29 +00:00
Joey Hess
f85ca7dc80
fix all remaining -Wincomplete-uni-patterns warnings
A couple of these were probably actual bugs in edge cases. Most of the
changes I'm fine with. The fact that aeson's object returns sometihng
that we know will be an Object, but the type checker does not know is
kind of annoying.
2020-04-15 13:55:08 -04:00
Joey Hess
43a9808292
disable journal read optimisation when alwayscommit=false
The journal read optimisation in aeca7c220 later got fixed in eedd73b84
to stage and commit any files that were left in the journal by a
previous git-annex run. That's necessary for the optimisation to work
correctly. But it also meant that alwayscommit=false started committing
the previous git-annex processes journalled changes, which defeated the
purpose of the config setting entirely.

So, disable the optimisation when alwayscommit=false, leaving the
files in the journal and not committing them. See my comments on the bug
report for why this seemed the best approach.

Also fixes a problem when annex.merge-annex-branches=false and there
are changes in the journal. That config indirectly prevents committing
the journal. (Which seems a bit odd given its name, but it always has..)
So, when there were changes in the journal, perhaps left there due to
alwayscommit=false being set before, the optimisation would prevent
git-annex from reading the journal files, and it would operate with out
of date information.
2020-04-15 13:24:33 -04:00
Joey Hess
0e4c92503e
fix warning
I don't think the NoConfigValue case ever actually occurs here.
2020-04-15 13:04:00 -04:00
Joey Hess
9f17242f29
comment 2020-04-15 12:48:55 -04:00
Joey Hess
8ac44498d6
comment 2020-04-15 12:43:22 -04:00
Joey Hess
1aa7082c9a
better response 2020-04-15 12:17:57 -04:00
Joey Hess
b241f579c0
hm 2020-04-15 12:14:39 -04:00
Joey Hess
f4d5ec1457
correction 2020-04-15 12:12:11 -04:00
Joey Hess
520ddf1c75
comment 2020-04-15 12:10:51 -04:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
95b505c22f 2020-04-15 13:06:14 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
98c1047a29 removed 2020-04-15 13:00:12 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
c510e83001 Added a comment: Problems with Assistant and Android 2020-04-15 12:59:44 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
98fac2be0e 2020-04-15 12:59:04 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
61ba4d6387 2020-04-15 12:09:08 +00:00
kyle
b11931a4aa bug: alwayscommit=false creating commits 2020-04-14 22:43:34 +00:00
erewhon
92c1d0863b Added a comment 2020-04-14 21:45:35 +00:00
erewhon
5d1495ee0f removed 2020-04-14 21:30:38 +00:00
erewhon
40a3545149 Added a comment 2020-04-14 21:20:51 +00:00
erewhon
a9f7770cde removed 2020-04-14 21:19:46 +00:00
erewhon
6add91fefd Added a comment 2020-04-14 21:18:23 +00:00
Joey Hess
ba6f46c113
--auto doc wording
try to make more clear that --auto is not --all
2020-04-13 16:12:48 -04:00
Joey Hess
09d202ab88
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-13 16:08:21 -04:00
Joey Hess
bcc0ec5b99
fix runtime crash on incomplete pattern match in lambda
This was very susprising to me that it was not caught by -Wall, so I
enabled -Wincomplete-uni-patterns to catch such things. It found a
second one just lines above, but no others anywhere.
2020-04-13 16:03:21 -04:00
kyle
b60f29f17b Added a comment 2020-04-13 18:58:50 +00:00
Joey Hess
c22c07bbed
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-13 14:32:46 -04:00
Joey Hess
e57aebf6ad
comment 2020-04-13 14:07:23 -04:00
Joey Hess
5a62e8132d
When parsing git configs, support all the documented ways to write true and false, including "yes", "on", "1", etc.
This change does impact git-annex config
eg "git annex config --set annex.addunlocked on"
will store "on" and new git-annex will understand that value, while
old git-annex will error:
git-annex: bad annex.addunlocked configuration in git annex config:
Parse failure: near "on"
That seems acceptable.

Not special remote configs that are only documented as =true or =false
however. Having git-annex support other values for those would break
backwards compatability when used with old versions of git-annex. And
older versions ignore invalid special remote configs.. That would not
be a good combination.
2020-04-13 14:05:30 -04:00
Joey Hess
9cb69dbb76
support boolean git configs that are represented by the name of the setting with no value
Eg"core.bare" is the same as "core.bare = true".

Note that git treats "core.bare =" the same as "core.bare = false", so the
code had to become more complicated in order to treat the absense of a
value differently than an empty value. Ugh.
2020-04-13 13:35:22 -04:00
Joey Hess
ca9c6c5f60
Fix a potential failure to parse git config
Git has an obnoxious special case in git config, a line "foo" is the same
as "foo = true". That means there is no way to examine the output of
git config and tell if it was run with --null or not, since a "foo"
in the first line could be such a boolean, or could be followed by its
value on the next line if --null were used.

So, rather than trying to do such a detection, track the style of config
at all the points where it's generated.
2020-04-13 13:05:41 -04:00
Joey Hess
fbd78cff64
improve documentation 2020-04-13 12:33:35 -04:00
bjornw@6a7d7d0413efc7ed3bb44922586f040bb768b71c
e96d3b5776 2020-04-13 16:30:33 +00:00
4omecha@fff0ca6fa5307d92706e5ee6812d8db8f8067df0
25ac0ef160 Best way to restore objects with correct names w/o git log present? 2020-04-13 09:19:23 +00:00
4omecha@fff0ca6fa5307d92706e5ee6812d8db8f8067df0
16f2ccfc7c bad edit
This reverts commit ce664ebc7b
2020-04-13 09:16:39 +00:00
4omecha@fff0ca6fa5307d92706e5ee6812d8db8f8067df0
ce664ebc7b Best way to restore objects with correct names w/o git log present? 2020-04-13 09:13:51 +00:00
Ilya_Shlyakhter
995d327784 Added a comment 2020-04-13 00:53:59 +00:00
erewhon
4714d2cc5e 2020-04-12 19:28:38 +00:00
erewhon
f6e0345b07 2020-04-12 19:10:35 +00:00
Joey Hess
eedd73b846
fix reversion caused by earlier optimisation to git-annex branch reads
aeca7c2207 was predicated on the
assumption that updateTo would stage any journal files, but in one case
it did not actually do so. The test suite happened to expose the bug.
2020-04-10 15:25:22 -04:00
Joey Hess
df587ff068
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-10 14:46:59 -04:00
Joey Hess
86426036a0
optimise catfile interface with ByteString and Attoparsec
Around 3% total speedup.

Profiling git annex find --not --in web, it's now bytestring end-to-end,
and there is only a little added overhead in eg accessing the Annex
state MVar (3%). The rest of the runtime is spent reading symlinks, and
in attoparsec.

This feels like the end of the optimisation road, without a major change
like caching information for faster queries.
2020-04-10 14:18:52 -04:00
Joey Hess
2caf579718
cache annex index filename for 1.5% speedup to queries 2020-04-10 13:37:04 -04:00
christoph@62dc589e980f444024ff1a9808022914e056f386
893239ed8f rename bugs/fsck_lies_about_checksum__63__.mdwn to bugs/fsck_tells___39__ok__39___also_if_no_file_present.mdwn 2020-04-10 12:06:52 +00:00