File: Syntax_error_in_comit_f29d49d47.mdwn

package info (click to toggle)
git-annex 10.20230126-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 69,344 kB
  • sloc: haskell: 74,654; javascript: 9,103; sh: 1,304; makefile: 203; perl: 136; ansic: 44
file content (31 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
There is a syntax error in commit f29d49d47 that is preventing git-annex from building:

```
Command/Move.hs:214:36: error: parse error on input `->'
    |
214 |                         Right True -> return True
    |                                    ^^
```

The following patch fixes it:

```
diff --git a/Command/Move.hs b/Command/Move.hs
index 584565648..d8c4bc4c9 100644
--- a/Command/Move.hs
+++ b/Command/Move.hs
@@ -210,7 +210,7 @@ fromOk :: Remote -> Key -> Annex Bool
 fromOk src key
 	-- check if the remote contains the key, when it can be done cheaply
 	| Remote.hasKeyCheap src = 
-		Remote.hasKey src key >>= 
+		Remote.hasKey src key >>= \x -> case x of
 			Right True -> return True
 			-- Don't skip getting the key just because the
 			-- remote no longer contains it if the log
```

[[!meta author=jwodder]]
[[!tag projects/datalad]]

> [[fixed|done]] before this was filed, but only pushed later. --[[Joey]]