mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
more pull work
This commit is contained in:
parent
b8cf7f75c0
commit
749a303904
3 changed files with 8 additions and 2 deletions
|
@ -268,5 +268,12 @@ describe('Git Remotes', function() {
|
|||
);
|
||||
});
|
||||
|
||||
it('pulls to the right branch and destination', function() {
|
||||
expectTreeAsync(
|
||||
'git clone; git checkout -b side o/master;git fakeTeamwork;git pull master:o/master',
|
||||
'{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C2","id":"o/master","remoteTrackingBranchID":null},"side":{"target":"C2","id":"side","remoteTrackingBranchID":"o/master"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"}},"HEAD":{"target":"side","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C2","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"}},"HEAD":{"target":"master","id":"HEAD"}}}'
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -228,7 +228,6 @@ var commandConfig = {
|
|||
var firstArg = generalArgs[1];
|
||||
// COPY PASTA validation code from fetch. maybe fix this?
|
||||
if (firstArg && isColonRefspec(firstArg)) {
|
||||
tracking = assertBranchIsRemoteTracking(engine, generalArgs[1]);
|
||||
var refspecParts = firstArg.split(':');
|
||||
source = refspecParts[0];
|
||||
destination = validateBranchNameIfNeeded(
|
||||
|
|
2
todo.txt
2
todo.txt
|
@ -22,7 +22,6 @@ aka fetch + merge, just like expected. ill probably still update o/master just f
|
|||
|
||||
just pass options into fetch, then merge the source.
|
||||
|
||||
4) and then "git pull origin banana:origin/banana" works because it goes into the remote branch and then merges the fetch HEAD with current location
|
||||
|
||||
[ ] FIX the level you came up with
|
||||
|
||||
|
@ -44,6 +43,7 @@ Ideas for cleaning
|
|||
Done things:
|
||||
(I only started this on Dec 17th 2012 to get a better sense of what was done)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[x] and then "git pull origin banana:origin/banana" works because it goes into the remote branch and then merges the fetch HEAD with current location
|
||||
[x] oh boy heres anothere data point. git fetch banana:banana will actually fast-forward banana to what remote has, but not update o/banana. weirdly it doesnt let you do this if you are checked out on banana
|
||||
[x] furthermore, if banana has commits and its not a FF, it will reject the command. wth??
|
||||
[x] test is failing because we create banana when we should only really be creating o/banana
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue