Skip to content
Snippets Groups Projects
Commit 1c9ac8cf authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

pull: do not invent or imply a "default" when none exists

As far as I can tell, this was previously used to "detect" an initial
clone. Unfortunately, that logic is incorrect: like Mercurial, hg-git
should consider pulling into an empty repository distinct from
cloning.

As an apparent aside, it also kind-of-sort-of handled the case where
you pulled from a local Git repository into a location that happened
to be default.

To fix this, we do two things:

1) Expand relative local paths before comparing them to other paths.
2) Detect clone from the source of the default `default` path.

The end result is:

1) You can pull from e.g. `../repo` to update remotes, with an
   equivalent path specified in the configuration
2) Pulls from entirely foreign remotes are no longer saved.
3) We always activate the desired bookmarks on clone.

Although the two changes might seem unrelated, their effect is
combined, and either alone would break the tests.
parent ed22a015
No related branches found
No related tags found
1 merge request!124Adjust initial clone and push behaviour
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment