From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tay Ray Chuan Subject: [PATCH v2 3/3] builtin/checkout: learn -B Date: Thu, 24 Jun 2010 03:29:00 +0800 Message-ID: <1277321340-4000-4-git-send-email-rctay89@gmail.com> References: <1277140782-4064-1-git-send-email-rctay89@gmail.com> <1277321340-4000-1-git-send-email-rctay89@gmail.com> <1277321340-4000-2-git-send-email-rctay89@gmail.com> <1277321340-4000-3-git-send-email-rctay89@gmail.com> Cc: Junio C Hamano , Jeff King , Clemens Buchacher , Michel Lespinasse , Erick Mattos To: Git Mailing List X-From: git-owner@vger.kernel.org Wed Jun 23 21:29:35 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ORVdY-0001e5-LO for gcvg-git-2@lo.gmane.org; Wed, 23 Jun 2010 21:29:28 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753533Ab0FWT3Z (ORCPT ); Wed, 23 Jun 2010 15:29:25 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:61250 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753522Ab0FWT3X (ORCPT ); Wed, 23 Jun 2010 15:29:23 -0400 Received: by mail-px0-f174.google.com with SMTP id 7so408429pxi.19 for ; Wed, 23 Jun 2010 12:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=P9dFysxCbAvmi0VAz8czI0+xdjci4mWwrLJirZi+6Y0=; b=OkV8Y5FrUO1J6kQplcSTfqKxdQX5nqq2/TsWPksz6ZrHGodfPQNd6VFEkEzW1wyXOd 91sktDSi4+6zB1XRqxUD0548bCl1t8wLnYfUdUjDz3qWnA9cNaRZlRMUToFnVhzKBpRV 3p5oOgLgp6J6U7Z3Lw6K4pgTKhSiWAi8Yefj0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=JXFCbkbZpSoM7NZ3X8zi7fDUP61ZrIWmg6V3yFtlIz6Il5FKJ2D64ps+mo08jqc1U8 VgN0j2AvWKZpI+jJX8PBZIi0m6cBFEWdHED42n1kZmjXULFggGc1DWWO+vm7q7pRo4eA yKcT39UympSxuhO6mW5iVRlkEp28TIY1zYKxM= Received: by 10.143.27.12 with SMTP id e12mr7758214wfj.87.1277321363632; Wed, 23 Jun 2010 12:29:23 -0700 (PDT) Received: from localhost.localdomain (cm156.zeta152.maxonline.com.sg [116.87.152.156]) by mx.google.com with ESMTPS id p1sm570577rvq.0.2010.06.23.12.29.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 23 Jun 2010 12:29:22 -0700 (PDT) X-Mailer: git-send-email 1.7.1.513.g06a69 In-Reply-To: <1277321340-4000-3-git-send-email-rctay89@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Internally, --track and --orphan still use the 'safe' -b, not -B. Signed-off-by: Tay Ray Chuan --- Junio, I didn't wait for your reply to my suggestion about using "git reset" instead, as I hope to put this out for review before I creep to bed - I'll put it in the next iteration, if need be. Documentation/git-checkout.txt | 21 ++++++++++++++++- builtin/checkout.c | 29 +++++++++++++++++++++---- t/t2018-checkout-branch.sh | 45 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 7 deletions(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 261dd90..97c5144 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -9,7 +9,7 @@ SYNOPSIS -------- [verse] 'git checkout' [-q] [-f] [-m] [] -'git checkout' [-q] [-f] [-m] [[-b|--orphan] ] [] +'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] ] [] 'git checkout' [-f|--ours|--theirs|-m|--conflict=