3 ms·
Wait, what exactly happens in that last one that I shouldn't dare do?
by makeramen 14y ago
Wait, what exactly happens in that last one that I shouldn't dare do?
- aneth4 14y agoI should have written: git branch --set-upstream origin/foo This counter-intuitively creates a LOCAL (!) branch named origin/foo which tracks the current branch. I would expect this to set the upstream of the current branch, given that most commands operate on the current branch unless otherwise specified. Instead it does something completely unexpected and useless.
- ibotty 14y agowhich invalidates part of your point, because --set-upstream is now _deprecated_.
- aneth4 14y agoIt's deprecated in the next release not this one, and it will be around for years to come. People will google and find the old way documented and have to read up on the difference, adding to the cognitivie baggage of git. Regardless, my point is the interface is horrible and this is just adding to the patchwork. Why not add --track semantics or unify these flags?
- cmn 14y ago--set-upstream is deprecated in this release.
- Johngibb 14y agoDeprecated, but not removed yet. It "may be removed in a relatively distant future"
- cmn 14y agoThis is what deprecated means. You can't just remove an API that's existed for years and scripts may depend on without giving them time to adapt. This shows a warning when it's used so it's clear which scripts should be changed.
- cmn 14y agoSo why are you unhappy about this option being deprecated? Have you tried it in this release? It tells you it's deprecated and which options exist. If you do what you show in this command, it tells you how to undo it with the new more sensible option.