Browse Source
A non-bare clone command with null remote produces a NullPointerException when trying to produce a refspec to fetch against. In a bare repository, a null remote name is accepted by mistake, producing a configuration with items like 'remote.url' instead of 'remote.<remote>.url'. This was never meant to work. Instead, let's make setRemote(null) undo any previous setRemote calls and re-set the remote name to DEFAULT_REMOTE, imitating C git clone's --no-origin option. While we're here, add some tests for setRemote working normally. Change-Id: I76f502da5e677df501d3ef387e7f61f42a7ca238 Signed-off-by: Jonathan Nieder <jrn@google.com>stable-4.1
Jonathan Nieder
10 years ago
2 changed files with 65 additions and 1 deletions
Loading…
Reference in new issue