Your patch makes sense, I have comments about some changes:
-import Control.Applicative( (<$>) )
+import Control.Applicative ( (<$>) )
which you can remove from the patch using "darcs amend --unrecord". And:
hunk ./src/Darcs/UI/Arguments.hs 946
- writeLocaleFile (darcsdir ++ "/prefs/author") $
+ prefsdir <- globalPrefsDir
+ writeLocaleFile (fromMaybe "~" prefsdir </> "author") $
in which the use 'fromMaybe "~"' is incorrect since it would create the
file "~/author" in the case when globalPrefsDir returns Nothing.
As for what to do when globalPrefsDir returns Nothing (an unlikely
situation but we should foresee it in the code), I'm thinking of two
alternatives:
a) make darcs fail
b) make darcs save author in _darcs/prefs/author (as before).
I think b) would be the best, with a warning message when it happens
(look for WARNING: in the source code).
|