Bad host key: When a command fails due to a misconfigured host key, the client now prints an appropriate error message [server key does not match known host key].
Unauthorised: When a command fails due to an unauthorised access attempt (e.g., the SSH key was removed from the user's profile), the client now prints an appropriate message [permission denied]. I considered more specific errors, but it's hard to know exactly what went wrong and it might be better to keep it a bit generic.
Generic download/upload errors: gin download exits with error when the command fails. A bug made it return silently on failure when the cause was not known. Now it will simply print failed, which isn't helpful, but is better than silence. More error conditions need to be covered.
Internal changes
gin download --content internals have changed:
Old: The --content option was forwarded to the git annex sync command.
New: git annex sync is always run without --content and if the option is used, a gin get-content is performed following a successful download.
Reasoning: git annex sync does not support JSON output which I plan on using for all annex commands that support it. Further to this, git annex sync output is harder to parse even in its current state, especially for checking for failures and errors. The new implementation is also cleaner, since it reuses existing code for getting the content and minimises maintenance effort in the future.
New error conditions
gin download
exits with error when the command fails. A bug made it return silently on failure when the cause was not known. Now it will simply print failed, which isn't helpful, but is better than silence. More error conditions need to be covered.Internal changes
gin download --content
internals have changed:--content
option was forwarded to thegit annex sync
command.git annex sync
is always run without--content
and if the option is used, agin get-content
is performed following a successful download.git annex sync
does not support JSON output which I plan on using for all annex commands that support it. Further to this,git annex sync
output is harder to parse even in its current state, especially for checking for failures and errors. The new implementation is also cleaner, since it reuses existing code for getting the content and minimises maintenance effort in the future.