git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-branch.txt: document -f correctly
Date: Tue, 17 Mar 2009 17:46:22 +0100	[thread overview]
Message-ID: <49BFD3DE.4030901@drmicha.warpmail.net> (raw)
In-Reply-To: <7vy6v4qf4o.fsf@gitster.siamese.dyndns.org>

Junio C Hamano venit, vidit, dixit 17.03.2009 17:37:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> 'git branch -f a b' resets a to b when a exists, rather then deleting a.
>> Say so in the documentation.
>>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>> Something like this?
>>
>> BTW, I noticed that 'git-subcmd' is used everywhere in here which does
>> not feel right, but I followed the existing style, leaving a consistent
>> clean-up for a later patch. Also, typesetting is inconsistent:
>> We have <branch> as well as `<branch>` when the text talks about the
>> options. Do we have a style guide or such?
>>
>>  Documentation/git-branch.txt |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
>> index 6103d62..27b73bc 100644
>> --- a/Documentation/git-branch.txt
>> +++ b/Documentation/git-branch.txt
>> @@ -76,8 +76,8 @@ OPTIONS
>>  	based sha1 expressions such as "<branchname>@\{yesterday}".
>>  
>>  -f::
>> -	Force the creation of a new branch even if it means deleting
>> -	a branch that already exists with the same name.
>> +	Reset <branchname> to <startpoint> if <branchname> exists
>> +	already. Without `-f` 'git-branch' refuses to change an existing branch.
> 
> And what happens if the branchname does not exist?

Well, the standard behaviour of "git branch" is described in the
"description", the meaning of the options under "options"...
We could add

	If <branchname> does not exist it is created and '-f' has no effect.

although that seems a bit talkative.

> 
>>  
>>  -m::
>>  	Move/rename a branch and the corresponding reflog.
>> -- 
>> 1.6.2.149.g6462

  reply	other threads:[~2009-03-17 16:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 19:06 undoing something John Dlugosz
2009-03-16 19:14 ` Junio C Hamano
2009-03-16 19:48   ` John Dlugosz
2009-03-16 20:11     ` Junio C Hamano
2009-03-16 20:51       ` Effective Posting John Dlugosz
2009-03-16 21:29         ` René Scharfe
2009-03-16 21:38           ` John Dlugosz
2009-03-16 22:21         ` Jay Soffian
2009-03-16 22:36           ` John Dlugosz
2009-03-16 21:45     ` (unknown), Nanako Shiraishi
2009-03-17  7:09       ` undoing something Junio C Hamano
2009-03-17 14:06         ` [PATCH] git-branch.txt: document -f correctly Michael J Gruber
2009-03-17 16:37           ` Junio C Hamano
2009-03-17 16:46             ` Michael J Gruber [this message]
2009-03-17 15:08         ` undoing something John Dlugosz
  -- strict thread matches above, loose matches on Subject: below --
2009-03-17 16:07 [PATCH] git-branch.txt: document -f correctly John Dlugosz
2009-03-17 16:51 ` git

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49BFD3DE.4030901@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).