On Sat, Oct 07, 2017 at 16:41:29 +0100, Daniel Silverstone wrote:
From: Phillip Smyth <phillip.smyth(a)codethink.co.uk>
Thanks for doing this Phillip.
Added ED25519 support.
config.lua:
Changed the manual keytype check into a function call from util.lua
usercommand:
Changed the manual keytype check into a function call from util.lua
util.lua:
Added a keycheck function that returns true if an invalid keytype is detected
library.yarn:
Added implementation of createsshkey which uses ED25519 as a parameter
02-commands-sshkey.yarn:
Modified the "ssh key basics" Scenario to create a second key of type
ED25519 and test it
So normally we'd prefer to see a set of commits, each doing the single thing,
otherwise each line in each file is annotated with the other stuff. So a
commit sequence of:
1. the update for util.lua
2. the change for config.lua and usercommand.lua
3. the change for the test.
We can re-jig this commit during merge if it's otherwise okay; or you can
update your branch with a fixed set of commits.
lib/gitano/sssc | 8 ++++++++
lib/gitano/sssc.pub | 1 +
The presence of these files worries me.
testing/.library.yarn.swp | Bin 0 -> 16384
bytes
This is a vim temporary file and shouldn't be in the commit.
testing/keys/testinstance@newkey_Ed25519 | 7 +++++++
testing/keys/testinstance(a)newkey_Ed25519.pub | 1 +
Does this need a capital letter? In general I try and avoid capital letters in
filenames excepting things like README, COPYING, etc.
diff --git a/lib/gitano/config.lua b/lib/gitano/config.lua
- return nil, i18n.expand("ERROR_BAD_KEY_TYPE",
- {keytype=keytype, filename=filename})
+ return nil, i18n.expand("ERROR_BAD_KEY_TYPE",
+ {keytype=keytype, filename=filename})
You seem to have squiffed the indents here slightly.
diff --git a/lib/gitano/usercommand.lua b/lib/gitano/usercommand.lua
- log.error("Unknown key type", keytype)
+ log.error("Unknown key type", keytype)
I'm not entirely sure why this line pair is even here :(
diff --git a/lib/gitano/util.lua b/lib/gitano/util.lua
-}
+ ssh_type_is_invalid = ssh_type_is_invalid,
+}
+
This looks iffy too. whitespace trailing on the close brace.
diff --git a/testing/02-commands-sshkey.yarn
b/testing/02-commands-sshkey.yarn
- GIVEN testinstance has keys called newkey
+ GIVEN testinstance has keys called newkey
Trailing whitespace here.
+ AND testinstance has keys called edkey of type Ed25519
This is a good statement form, thank you.
FINALLY the instance is torn down
+
Extra whitespace introduced here.
diff --git a/testing/library.yarn b/testing/library.yarn
- IMPLEMENTS GIVEN ([a-z][a-z0-9]*) has keys called ([a-z][a-z0-9]*)
+ IMPLEMENTS GIVEN ([a-z][a-z0-9]*) has keys called ([a-z][a-z0-9]*)
What happened here?
+ IMPLEMENTS GIVEN ([a-z][a-z0-9]*) has keys called
([a-z][a-z0-9]*) of type ([a-z][a-z0-9]*)?
+ $GTT createsshkey "$MATCH_1" "$MATCH_2" "$MATCH_3"
+
+
Looks good, though maybe implementable as an optional parameter to the previous
implements? Not a showstopper like this. Other implementations only have one
blank line between, though again, not a showstopper.
Over-all a good first patch, there's lots of promise in this, but I can't
accept it as-is because of the issues hilighted. In general we try to make our
diffs as small as possible, only affecting the minimum number of lines.
If you don't have time to do that, then I'm prepared to update your patch
myself, but if you want the practice then I'll leave you to it.
As a hint, if you have colouring turned on, then in 'git diff' it'll show you
trailing whitespace hilighted in bright red. Also it's a good idea to look at
'git status' and 'git diff' to see what changes you're actually making
so that
you can review things before you submit them. Once you're ready for a
re-review if you do choose to do this yourself, just give me a shout.
Thanks again,
Daniel.
--
Daniel Silverstone
http://www.digital-scurf.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69