Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Sun, 9 Nov 2008 18:56:26 +0000 (10:56 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Nov 2008 18:56:26 +0000 (10:56 -0800)
* maint:
  Documentation: bisect: change a few instances of "git-cmd" to "git cmd"
  Documentation: rev-list: change a few instances of "git-cmd" to "git cmd"
  checkout: Don't crash when switching away from an invalid branch.

1  2 
Documentation/rev-list-options.txt
builtin-checkout.c

Simple merge
index 57b94d282931187a0cb6394d4df707237038a7eb,05eee4ecc71d7a20d9faf59c849d3c693ae4cc8d..06904c3bd3595b4c8cbc6c66d3a1b9c364381bd6
@@@ -491,11 -358,12 +491,11 @@@ static void update_refs_for_switch(stru
                setup_branch_path(new);
        }
  
 -      strbuf_init(&msg, 0);
        old_desc = old->name;
-       if (!old_desc)
+       if (!old_desc && old->commit)
                old_desc = sha1_to_hex(old->commit->object.sha1);
        strbuf_addf(&msg, "checkout: moving from %s to %s",
-                   old_desc, new->name);
+                   old_desc ? old_desc : "(invalid)", new->name);
  
        if (new->path) {
                create_symref("HEAD", new->path, msg.buf);