chiark / gitweb /
dgit: Non-noop git fetch is not available with --dry-run, so fail
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 21 Jun 2018 00:00:41 +0000 (01:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 21 Jun 2018 00:11:11 +0000 (01:11 +0100)
When fetch or push wants git fetch (other than in a situation where it
happes to be a noop) but --dry-run was specified, we would loop with a
false coplaint about git fetch.  False, because we didn't actually run
git fetch so of course it didn't do anything.

Instead, fail with an explanation.  Closes:#871317.

This does not occur, and we do not fail, if git-fetch would be a
no-op.  We can tell when this is the case, because we use
git-ls-remote too.  This leads to one suggestion for a workaround for
the user, which is to do a not --dry-run fetch first.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>

No differences found