diff options
author | Andrew Thompson <andrew@hijacked.us> | 2013-09-23 15:13:26 -0400 |
---|---|---|
committer | Andrew Thompson <andrew@hijacked.us> | 2013-09-23 15:13:26 -0400 |
commit | f46e7b2e5c389ab8489121a3ab23159750dd1661 (patch) | |
tree | 1fb07adc77cfbe7280b5318764f1ed28662a0fa7 /inttest/code_path_no_recurse/deps/foodep/src | |
parent | 0977d58361d54c170cf45254d7b53e1cd03024e7 (diff) |
Change how update-deps updates a git branch
Previously, update-deps on a dep tagged as {branch, ...} would do the
following:
git fetch
git checkout -q origin/<branch>
If you were already on that branch, the repo would end up in detached
head state. This is kind of annoying if you're doing local development.
This patch changes the behaviour to be
git fetch
git checkout -q <branch>
git pull --ff-only --no-rebase -q <branch>
The intent of this is to move the branch's HEAD forward to match
upstream without destroying any local commits or changes, and without
accidentally causing merges or rebases. It will fail if the operation
can not be performed without losing history, merging or rebasing.
The previous behaviour has been around a very long time:
https://github.com/rebar/rebar/commit/064195dc5a90f5b0cc3ae92e8373671b0043033f#L0R308
It also exactly mirrors the download_source case, which is not really
true. With git tags and SHAs, one can assume that they don't change, but
branches move all the time.
Diffstat (limited to 'inttest/code_path_no_recurse/deps/foodep/src')
0 files changed, 0 insertions, 0 deletions