Commit graph

37037 commits

Author SHA1 Message Date
Joey Hess
64e081d585
Merge branch 'master' of ssh://git-annex.branchable.com 2020-05-12 09:56:21 -04:00
Joey Hess
75add873de
fix paste 2020-05-12 09:55:54 -04:00
efraim@78c5af2ab57cf0d7aa23bae3dd0adb700c98217c
f0fc1a3906 Added a comment 2020-05-12 13:16:51 +00:00
Joey Hess
959ae7733a
man pages improvements
Added some examples. Tightened up some language and removed some
unncessary duplicate documentaton.
2020-05-12 09:07:45 -04:00
Chymera
47bd71b096 2020-05-12 07:05:23 +00:00
Joey Hess
2a8fdfc7d8
Display a warning message when asked to operate on a file inside a directory that's a symbolic link to elsewhere
This relicates git's behavior. It adds a few stat calls for the command
line parameters, so there is some minor slowdown, but even with thousands
of parameters it will not be very noticable, and git does the same statting
in similar circumstances.

Note that this does not prevent eg "git annex add symlink"; the symlink
will be added to git as usual. And "git annex find symlink" will silently
list nothing as well. It's only "symlink/foo" or "subdir/symlink/foo" that
triggers the warning.
2020-05-11 15:03:35 -04:00
Joey Hess
39d7e6dd2a
addurl --preserve-filename for other remotes
Finishing work begun in 6952060665

Also, truncate filenames provided by other remotes if they're too long,
when --preserve-filename is not used. That seems to have been omitted
before by accident.
2020-05-11 14:33:27 -04:00
Joey Hess
5f5170b22b
remove SafeFilePath
Move sanitizeFilePath call to where fromSafeFilePath had been.
2020-05-11 14:04:56 -04:00
Joey Hess
cabbc91b18
addurl, importfeed: Allow '-' in filenames, as long as it's not the first character 2020-05-11 13:50:49 -04:00
Joey Hess
57451bd9a1
followup 2020-05-11 13:06:39 -04:00
Joey Hess
3b15145703
fix name of option 2020-05-11 13:05:57 -04:00
Joey Hess
79cc7cba93
response 2020-05-11 12:56:34 -04:00
Joey Hess
568c2b58c2
comments 2020-05-11 12:49:50 -04:00
Joey Hess
0e2e8df8bf
bug 2020-05-11 12:38:40 -04:00
Joey Hess
42cc20c99c
Merge /home/joey/thk_fix_haddock 2020-05-11 11:40:45 -04:00
efraim@78c5af2ab57cf0d7aa23bae3dd0adb700c98217c
84d5f77630 Added a comment 2020-05-11 11:29:34 +00:00
Thomas Koch
8a0480daf3 Fix haddock parse error
I run haddock with `cabal haddock --executables`. It fails with:

    Types/Remote.hs:271:17: error: parse error on input ‘->’

Apparently haddock does not like to find haddock blocks outside of
declarations? In any case, this patch makes these type of errors go
away.

Afterwards, I see errors like these, that need to be investigated as
a next step:

haddock: internal error: internal: extractDecl
CallStack (from HasCallStack):
  error, called at utils/haddock/haddock-api/src/Haddock/Interface/Create.hs:1116:12 in main:Haddock.Interface.Create
2020-05-11 08:40:13 +02:00
yarikoptic
2d8c8868ef Added a comment 2020-05-10 16:30:51 +00:00
yarikoptic
2b125e0dd7 Added a comment 2020-05-09 22:10:44 +00:00
globallyunique@da2274b36ca296fe35912b9fd7387e3a5bd17c7c
f02ec096d4 2020-05-09 19:25:28 +00:00
the13thletter
b8a472ba84 2020-05-08 22:10:29 +00:00
Joey Hess
6952060665
addurl --preserve-filename and a few related changes
* addurl --preserve-filename: New option, uses server-provided filename
  without any sanitization, but with some security checking.

  Not yet implemented for remotes other than the web.

* addurl, importfeed: Avoid adding filenames with leading '.', instead
  it will be replaced with '_'.

  This might be considered a security fix, but a CVE seems unwattanted.
  It was possible for addurl to create a dotfile, which could change
  behavior of some program. It was also possible for a web server to say
  the file name was ".git" or "foo/.git". That would not overrwrite the
  .git directory, but would cause addurl to fail; of course git won't
  add "foo/.git".

sanitizeFilePath is too opinionated to remain in Utility, so moved it.

The changes to mkSafeFilePath are because it used sanitizeFilePath.
In particular:

	isDrive will never succeed, because "c:" gets munged to "c_"
	".." gets sanitized now
	".git" gets sanitized now
	It will never be null, because sanitizeFilePath keeps the length
	the same, and splitDirectories never returns a null path.

Also, on the off chance a web server suggests a filename of "",
ignore that, rather than trying to save to such a filename, which would
fail in some way.
2020-05-08 16:22:55 -04:00
Joey Hess
54599207f7
note 2020-05-08 15:56:15 -04:00
Joey Hess
980de9c910
comment 2020-05-08 13:21:16 -04:00
Joey Hess
de396fac80
comment 2020-05-08 13:16:46 -04:00
ryan.singer@5db89d157f0565db67eac571e2433fa96c187e32
25b6f7ca96 2020-05-07 22:11:04 +00:00
ryan.singer@5db89d157f0565db67eac571e2433fa96c187e32
f88c26c211 2020-05-07 22:09:44 +00:00
ryan.singer@5db89d157f0565db67eac571e2433fa96c187e32
6b49594d91 2020-05-07 22:08:30 +00:00
yarikoptic
a3d196fe39 original complaint about filenames obfuscated by addurl 2020-05-07 21:07:28 +00:00
Joey Hess
69e2e4763e
only check --force at init time, not enable time
git-lfs repos that encrypt the annexed content but not the git repo only
need --force passed to initremote, allow enableremote and autoenable of
such remotes without forcing again.

Needing --force again particularly made autoenable of such a repo not work.
And once such a repo has been set up, it seems a second --force when
enabling it elsewhere has little added value. It does tell the user about
the possibly insecure configuration, but if the git repo has already been
pushed to that remote in the clear, data has already been exposed. The goal
of that --force was not to prevent every situation where such an exposure
can happen -- anyone who sets up a public git repo and pushes to it will
expose things similarly and git-annex is not involved. Instead, the purpose
of the --force is to point out to the user that they're asking for a
configuration where encryption is inconsistently applied.
2020-05-07 15:59:29 -04:00
Joey Hess
1532d67c3e
S3: Support signature=v4
To use S3 Signature Version 4. Some S3 services seem to require v4, while
others may only support v2, which remains the default.

I'm also not sure if v4 works correctly in all cases, there is this
upstream bug report: https://github.com/aristidb/aws/issues/262
I've only tested it against the default S3 endpoint.
2020-05-07 13:18:11 -04:00
Joey Hess
bb88a01910
upgrade: When upgrade fails due to an exception, display it.
37b42e72e7 made it catch exceptions but
thought they were unlikely to be useful to display, which may be right when
a git command fails, but not in the case yoh found.
2020-05-07 12:22:32 -04:00
Joey Hess
5eb101b720
respond and close 2020-05-07 12:10:46 -04:00
yarikoptic
c719998eed initial report on silent fail to upgrade 2020-05-07 15:02:41 +00:00
glasserc
6a9c3a710d Added a comment: Is dead really the solution here? 2020-05-06 20:29:04 +00:00
efraim@78c5af2ab57cf0d7aa23bae3dd0adb700c98217c
1fdcd6d916 2020-05-06 14:17:52 +00:00
Joey Hess
0040d2c129
sync: Avoid an ugly error message when nothing has been committed to master yet and there is a synced master branch to merge from
Now the warning gets displayed, which is better than an arcane git error.

The warning is still kind of ugly, especially when the pull later in the
sync will clear up what it warns about. But, this is an unusual situation
not likely to happen, and if there is no remote to pull from, the warning
message is needed or the sync will seem to succeed despite not merging the
synced master branch.

Would still be better if it could merge the synced master branch in this
situation, making an empty commit to master to do it seems wrong, and
otherwise it would need a whole separate code path, and would bypass using
git merge in favor of say, setting master to the syned branch. Which would
bypass git configs like arguably merge.ff and certianly
merge.verifySignatures. So don't want to do that.
2020-05-05 14:31:37 -04:00
Joey Hess
e3585dc674
remove misplaced comments
an installation page is not a catch-all for random questions, or a
comprehensive link farm for documentation
2020-05-05 13:02:47 -04:00
Joey Hess
681928e828
close 2020-05-05 12:52:23 -04:00
Joey Hess
ebbd8f94e6
response 2020-05-05 12:45:35 -04:00
Joey Hess
93db6bef15
improve docs 2020-05-05 12:39:38 -04:00
Joey Hess
5b5a9aaf92
comment 2020-05-05 12:33:28 -04:00
Joey Hess
f3a776bc5e
response 2020-05-05 12:29:25 -04:00
Joey Hess
2955de6f4c
update 2020-05-05 11:13:10 -04:00
Joey Hess
1fb5a2e804
Revert "update"
This reverts commit f8b9b98ca8.

Broken script due to patreon changes..
2020-05-05 11:09:13 -04:00
Joey Hess
f8b9b98ca8
update 2020-05-05 11:08:46 -04:00
Joey Hess
423dd0e006
Merge branch 'master' of ssh://git-annex.branchable.com 2020-05-04 22:10:16 -04:00
moaxey
4fff42d79a 2020-05-04 21:50:05 +00:00
Joey Hess
2d51dd2e8c
changes required by cabal-version 1.10
Extensions got renamed.

Default-Language is required. I had to put Haskell98 because there are
subtle differences between 98 and 2010 and git-annex has always been
built with the default, which was 98 when there was a default. I don't
know how to establish that git-annex will behave the same under 2010.
2020-05-04 15:49:14 -04:00
Joey Hess
a5830c3f6e
bump cabal-version
hackage now requires 1.10 or newer
2020-05-04 15:45:10 -04:00