Commit graph

43591 commits

Author SHA1 Message Date
Joey Hess
703014d989
beat my head against this bug for a couple hours 2023-05-01 17:05:51 -04:00
Joey Hess
d98a7f0afc
comment 2023-05-01 13:09:47 -04:00
Joey Hess
57c1b4f5e5
initremote: Avoid creating a remote that is not encrypted when gpg is broken
checksize was applied lazily, so the exception didn't happen until the
remote was set up.

Sponsored-by: k0ld on Patreon
2023-05-01 13:00:05 -04:00
Joey Hess
23719bc91b
comment 2023-05-01 12:30:25 -04:00
Joey Hess
a4c9d649ad
Merge branch 'master' of ssh://git-annex.branchable.com 2023-05-01 12:29:31 -04:00
Joey Hess
e0dde88797
fix reversion in display of fatal exceptions
fdac66ae10 lost the "git-annex:" prefix,
which broke datalad's parsing of an error message (ugh)

Also, don't use warningIO because it displays a blank line to stdout,
which is also a behavior change from before, and does not seem
necessary.

Sponsored-by: Brock Spratlen on Patreon
2023-05-01 12:25:14 -04:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
59f0ea3aeb Added a comment 2023-05-01 16:10:00 +00:00
Joey Hess
0bf983d3ab
fixed related issue 2023-05-01 12:07:20 -04:00
Joey Hess
1beca851ff
back compat fix for info --json on unknown item
This was changed in a0e6fa18eb in a way
that broke datalad, which expected to see a "file" field in the --json.

See 45ddd4b12f
2023-05-01 12:05:21 -04:00
Joey Hess
66fe3b0908
comment 2023-05-01 11:57:49 -04:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
7cb870e008 Added a comment: output 2023-05-01 12:58:46 +00:00
nobodyinperson
def1eee573 Added a comment 2023-05-01 12:26:10 +00:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
c8176f899b 2023-05-01 12:05:34 +00:00
nobodyinperson
52c0fc97e3 Added a comment: git-annex relaying syncs across remotes 2023-05-01 08:50:10 +00:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
0ef32b50fe Added a comment: What is the underlying reason for needing a two-way SSH connection 2023-05-01 08:34:46 +00:00
nobodyinperson
7301308be6 Added a comment 2023-04-29 14:46:46 +00:00
tom@b87e4336a0d0785eb7d5853e390835a18797402f
1b9324ab65 2023-04-29 14:34:27 +00:00
nobodyinperson
a24a4cfbcd 2023-04-28 07:56:18 +00:00
Joey Hess
aff37fc208
avoid annexFileMode special case
This makes annexFileMode be just an application of setAnnexPerm',
which avoids having 2 functions that do different versions of the same
thing.

Fixes some buggy behavior for some combinations of core.sharedRepository
and umask.

Sponsored-by: Jack Hill on Patreon
2023-04-27 15:58:37 -04:00
Joey Hess
67f8268b3f
Support core.sharedRepository=0xxx at long last
Sponsored-by: Brett Eisenberg on Patreon
2023-04-26 17:03:29 -04:00
Joey Hess
0aa98aa09b
fix perms for core.sharedRepository
These two missed setting it.

It rarely matters that the journal gets the right perm. But, when using
annex.alwayscommit=false, someone else may come along later and want
to append to the journal file.

It probably never matters what the sentinal perms are, but for
completeness..

Sponsored-by: Luke Shumaker on Patreon
2023-04-26 16:29:11 -04:00
Joey Hess
f971b199ed
fix init .git/annex/ perms for core.sharedRepository
init: Bug fix: Create .git/annex/ and .git/annex/fsckdb/ directories with
permissions configured by core.sharedRepository.

The fsckfb being created happens to create .git/annex/ and it was not using
createAnnexDirectory. Probably a reversion partly, but maybe the database
directory was always created not honoring core.sharedRepository?

Sponsored-by: Noam Kremen on Patreon
2023-04-26 16:14:21 -04:00
Joey Hess
7af75a59be
Warn about unsupported core.sharedRepository=0xxx when set
This spams the user with a lot of messages, but it seems like busywork to
avoid that and only warn once, since this warning will go away when it gets
implemented.

Also fix parsing of the octal value.

Sponsored-by: Kevin Mueller on Patreon
2023-04-26 13:25:29 -04:00
Joey Hess
4881bc5a53
rename errorid to message-id 2023-04-26 12:53:30 -04:00
yarikoptic
b43da83a67 Added a comment 2023-04-26 16:38:27 +00:00
yarikoptic
5a24daf500 Added a comment 2023-04-26 14:34:32 +00:00
Joey Hess
4d6c918eff
avoid quoting spaces in git-annex find output to terminal
That's too much quoting, the user expects the filename to be copy and
pasteable. It would be ok to slash-escape space ('\ ')
which is what gnu find does, but it doesn't seem necessary either.

${escaped_file} has always quoted spaces though, so keep on doing it
there.

Sponsored-by: Nicholas Golder-Manning on Patreon
2023-04-26 00:18:30 -04:00
Joey Hess
4358545a3e
note 2023-04-25 19:36:23 -04:00
Joey Hess
96cb6d2157
close and followup 2023-04-25 19:32:51 -04:00
Joey Hess
be36e208c2
json object for FileNotFound
When a nonexistant file is passed to a command and  --json-error-messages
is enabled, output a JSON object indicating the problem.

(But git ls-files --error-unmatch still displays errors about such files in
some situations.)

I don't like the duplication of the name of the command introduced by this,
but I can't see a great way around it. One way would be to pass the Command
instead.

When json is not enabled, the stderr is unchanged. This is necessary
because some commands like find have custom output. So dislaying
"find foo not found" would be wrong. So had to complicate things with
toplevelFileProblem having different output with and without json.

When not using --json-error-messages but still using --json, it displays
the error to stderr, but does display a json object without the error. It
does have an errorid though. Unsure how useful that behavior is.

Sponsored-by: Dartmouth College's Datalad project
2023-04-25 19:26:20 -04:00
Joey Hess
91ba0cc7fd
Revert "--json-exceptions"
This reverts commit a325524454.

Turns out this was predicated on an incorrect belief that json output
didn't already sometimes lack the "key" field. Since json output already
can when `giveup` was used, it seems unncessary to add a whole new
option for this.
2023-04-25 17:37:34 -04:00
Joey Hess
7c514d717b
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-25 17:08:52 -04:00
Joey Hess
a325524454
--json-exceptions
Added a --json-exceptions option, which makes some exceptions be output in json.

The distinction is that --json-error-messages is for messages relating
to a particular ActionItem, while --json-exceptions is for messages that
are not, eg ones for a file that does not exist.

It's unfortunate that we need two switches with such a fine distinction
between them, but I'm worried about maintaining backwards compatability
in the json output, to avoid breaking anything that parses it, and this was
the way to make sure I didn't.

toplevelWarning is generally used for the latter kind of message. And
the other calls to toplevelWarning could be converted to showException. The
only possible gotcha is that if toplevelWarning is ever called after
starting acting on a file, it will add to the --json-error-messages of the
json displayed for that file and converting to showException would be a
behavior change. That seems unlikely, but I didn't convery everything to
avoid needing to satisfy myself it was not a concern.

Sponsored-by: Dartmouth College's Datalad project
2023-04-25 17:05:33 -04:00
yarikoptic
38e9b0989e Added a comment 2023-04-25 18:45:58 +00:00
Joey Hess
a474c9c63b
upcase JSON 2023-04-25 14:35:18 -04:00
yarikoptic
def90e6fb0 Added a comment 2023-04-25 18:31:20 +00:00
Joey Hess
6b77c02be9
comment 2023-04-25 14:30:27 -04:00
Joey Hess
97d10f2f44
update 2023-04-25 13:49:19 -04:00
Joey Hess
cd05cfc035
comment 2023-04-25 13:19:28 -04:00
Joey Hess
26953ad3a6
comment 2023-04-25 13:18:01 -04:00
Joey Hess
00b29d17ad
update docs to account for exporttree 2023-04-25 12:15:14 -04:00
dud225@35a1ee469f82f3a7eb1f2dce4ad453f5e47bdfd3
722bb79dbf Added a comment: File visibility 2023-04-25 05:09:49 +00:00
BillyIII
38825e089d removed 2023-04-24 23:22:08 +00:00
BillyIII
c62ca36bf5 Added a comment 2023-04-24 23:18:48 +00:00
yarikoptic
5bc8052d9c Added a comment 2023-04-24 21:25:09 +00:00
Joey Hess
a127949e65
comment 2023-04-24 16:05:35 -04:00
yarikoptic
57ad9d8da4 Added a comment 2023-04-24 19:23:22 +00:00
Joey Hess
b002199366
comment 2023-04-24 11:53:14 -04:00
nobodyinperson
6b58846d93 2023-04-24 15:07:28 +00:00
aurtzy
51df5cb26e 2023-04-24 03:25:41 +00:00