more pull work

This commit is contained in:
Peter Cottle 2013-10-22 11:00:33 -07:00
parent b8cf7f75c0
commit 749a303904
3 changed files with 8 additions and 2 deletions

View file

@ -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"}}}'
);
});
}); });

View file

@ -228,7 +228,6 @@ var commandConfig = {
var firstArg = generalArgs[1]; var firstArg = generalArgs[1];
// COPY PASTA validation code from fetch. maybe fix this? // COPY PASTA validation code from fetch. maybe fix this?
if (firstArg && isColonRefspec(firstArg)) { if (firstArg && isColonRefspec(firstArg)) {
tracking = assertBranchIsRemoteTracking(engine, generalArgs[1]);
var refspecParts = firstArg.split(':'); var refspecParts = firstArg.split(':');
source = refspecParts[0]; source = refspecParts[0];
destination = validateBranchNameIfNeeded( destination = validateBranchNameIfNeeded(

View file

@ -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. 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 [ ] FIX the level you came up with
@ -44,6 +43,7 @@ Ideas for cleaning
Done things: Done things:
(I only started this on Dec 17th 2012 to get a better sense of what was done) (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] 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] 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 [x] test is failing because we create banana when we should only really be creating o/banana