Re: [PATCH v15 0/2] checkout: --track=fetch
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
"Harald Nordgren via GitGitGadget" <[email protected]> writes: > Extend checkout --track with a fetch mode to refresh start-point. > Changes in v15: > > * Reword commit message to lead with motivation. I was reviewing the draft of the What's Cooking report and noticed that this topic is among a handful of stalled efforts going nowhere. > + Forking from an existing remote branch without refreshing first often > + has consequences: you start work that has already been done, or you > + build on an old version of the code which causes big conflicts later > + when you pull. The workaround is two commands ("git fetch <remote> > + <branch> && git checkout -b <topic> <remote>/<branch>"), and when > + the fetch is skipped the checkout silently starts from a stale tip. Automatically updating the tip of the remote tracking branch also has consequences. It might be fine for the current branch, but it would also make the other branches that forked from the same place go "stale" and without the user realizing (e.g., "git diff @{u}" while they are checked out would show what the user does not expect). As long as you keep calling this "workaround", I remain skeptical that the merit of this proposal would outweigh its downside. As this topic is about to become more than a month old, let me mark mark the topic to be discarded in my draft of the whats-cooking report.