* factor into its own files * remove assumptions about having a given hash type * make tests work if the remote has no hash