author | Junio C Hamano <gitster@pobox.com> | |
Sun, 9 Nov 2008 18:56:26 +0000 (10:56 -0800) | ||
committer | Junio 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.
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 | patch | | diff1 | | diff2 | | blob | history |
builtin-checkout.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/rev-list-options.txt
Simple merge
diff --cc builtin-checkout.c
index 57b94d282931187a0cb6394d4df707237038a7eb,05eee4ecc71d7a20d9faf59c849d3c693ae4cc8d..06904c3bd3595b4c8cbc6c66d3a1b9c364381bd6
--- 1/builtin-checkout.c
--- 2/builtin-checkout.c
+++ b/builtin-checkout.c
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);