{"thread":{"id":"50606","subject":"[RFC] pull --set-upstream implementation","startedAt":"2019-02-27T14:05:08Z","lastAt":"2019-02-27T14:05:08Z","messageCount":1,"participants":["BOMPARD CORENTIN p1603631"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"370306","messageId":"1551276325342.31383@etu.univ-lyon1.fr","threadId":"50606","inReplyTo":null,"subject":"[RFC] pull --set-upstream implementation","fromName":"BOMPARD CORENTIN p1603631","fromEmail":"corentin.bompard@etu.univ-lyon1.fr","sentAt":"2019-02-27T14:05:02Z","receivedAt":"2019-02-27T14:05:08Z","isPatch":false,"sender":{"key":"corentin.bompard@etu.univ-lyon1.fr","avatar":"https://avatars.githubusercontent.com/u/23448477?v=4"},"body":"We are currently working on adding \"--set-upstream <remote> <branch>\" to pull, that will work like \"push --set-upstream <remote> <branch>\"\nThe main usage should be \"git pull --set-upstream <remote> <branch>\"\nHowever:\n\n* <branch> could be a refspec like \"refs/heads/*\"\n\n* If there is an error such as invalid URL or unreachable host we don't want to edit the config\n\nIt makes more sense to us to implement the \"--set-upstream\" logic in git fetch which would let us test the remote and manage when called with a refspec. As a side effect: it will add the \"--set-upstream\" argument to fetch. \nEssentialy we see 3 options:\n\n1- add the \"--set-upstream\" argument directly in builtin/pull.c it will make it harder to parse the refspec and test the remote\n\n2- add the \"--set-upstream\" as a visible argument of fetch as fetch --set-upstream could be useful\n\n3- add the \"--set-upstream\" as a hidden argument of fetch\n\nOption 2 seems the best choice to us, any suggestion? \n\nThanks in advance.\nCorentin BOMPARD, Nathan BERBEZIER, Pablo CHABANNE.\n    \n"}]}