Artur Skawina wrote: > + git checkout -f -b branch-g90bc1a6 askern/release > fatal: git checkout: branch branch-g90bc1a6 already exists This bisects to commit 352eadc40024b141e1295693654ec20cc123844f Author: Daniel Barkalow <barkalow@xxxxxxxxxxxx> Date: Sun Sep 21 14:36:06 2008 -0400 Check early that a new branch is new and valid If you fail to update refs to change branches in checkout, your index and working tree are left already updated. We don't have an easy way to undo this, but at least we can check things that would make the creation of a new branch fail. These checks were in the shell version, and were lost in the C conversion. The messages are from the shell version, and should probably be made nicer. [jc: added test to t7201] Signed-off-by: Daniel Barkalow <barkalow@xxxxxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> Not sure this is a bug though. If we allow branch names that are ambiguous to rev-parse, what do they resolve to? E.g., in the presence of only 'master', 'master-g01234567' is defined to be the same as 01234567. What is it if you also have a *branch* called 'master-g01234567'? -- Thomas Rast trast@{inf,student}.ethz.ch -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html