All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] rebase: give precise error message
Date: Wed, 29 Nov 2017 15:47:03 +0900	[thread overview]
Message-ID: <xmqqshcx4m54.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1511925118.2486.2.camel@gmail.com> (Kaartic Sivaraam's message of "Wed, 29 Nov 2017 08:41:58 +0530")

Kaartic Sivaraam <kaartic.sivaraam@gmail.com> writes:

>> I do not think the above is a good change in the first place for at
>> least two reasons.  By saying <ref>, the updated text says "not just
>> branches but you can also give tags and remote-tracking branches".
>
> I used <ref> as you could actually use tags, remote-tracking branches
> and even "notes" ...
> ...
> It just works (of course, I couldn't understand what it did)! I didn't
> want to lie to the user. So, I used <ref>. So, should we just update
> the <branch> part of the doc or should we update the code for 'rebase'?
> I'm unsure.

By saying <ref>, you are not covering these cases

	git rebase master HEAD^0
	git rebase master pu^2

where the command gets non refs.

Most of the time, people use a <branch>, and rare cases like these
what a user can give is not restricted to a <ref>, so there is *no*
value in replacing <branch> with <ref>.  If we needed to replace it
with something, replacing <branch> with [<branch> | <commit-ish>] is
not wrong per-se, but I do not think it is an improvement.

As <branch> is merely a kind of <commit-ish>, it may be tempting to
instead replace <branch> with <commit-ish>, but I do not think it is
a good idea, either.  No matter what you write there in the synopsis
(and let's call it X), the description would have to say "when X is
the name of a branch, that branch is checked out, its history gets
rebased, and at the end, the tip of that branch points at the
result.  When X is not a branch but just a commit-ish, the HEAD is
detached at that commit, its history gets rebased and you'll be left
in that state".  Having <branch> in that sentence is clear enough
and any intelligent reader would understand what we mean by that
notation: we are showing there can be various things that can come
on the command line depicted in the SYNOPSIS section at the point
where we have a placeholder called <branch>, and the argument does
not necessarily have to be the name of a branch.



  reply	other threads:[~2017-11-29  6:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 15:25 [PATCH] rebase: rebasing can also be done when HEAD is detached Kaartic Sivaraam
2017-11-22  2:13 ` Junio C Hamano
2017-11-27 17:21   ` [PATCH v2 0/3] rebase: give precise error message Kaartic Sivaraam
2017-11-27 17:21     ` [PATCH v2 1/3] rebase: use a more appropriate variable name Kaartic Sivaraam
2017-11-27 17:21     ` [PATCH v2 2/3] rebase: distinguish user input by quoting it Kaartic Sivaraam
2017-11-27 17:21     ` [PATCH v2 3/3] rebase: rebasing can also be done when HEAD is detached Kaartic Sivaraam
2017-11-28  2:31       ` Junio C Hamano
2017-11-28 16:15         ` Kaartic Sivaraam
2017-12-01  6:09         ` [PATCH v3 " Kaartic Sivaraam
2017-11-28  2:25     ` [PATCH v2 0/3] rebase: give precise error message Junio C Hamano
2017-11-28 14:04       ` Kaartic Sivaraam
2017-11-29  0:10         ` Junio C Hamano
2017-11-29  3:11           ` Kaartic Sivaraam
2017-11-29  6:47             ` Junio C Hamano [this message]
2017-12-16  9:03     ` [PATCH v5 0/3] rebase: give precise error messages Kaartic Sivaraam
2017-12-16  9:03       ` [PATCH v5 1/3] rebase: consistently use branch_name variable Kaartic Sivaraam
2017-12-16  9:03       ` [PATCH v5 2/3] rebase: distinguish user input by quoting it Kaartic Sivaraam
2017-12-16  9:03       ` [PATCH v5 3/3] rebase: rebasing can also be done when HEAD is detached Kaartic Sivaraam

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

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

  git send-email \
    --in-reply-to=xmqqshcx4m54.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kaartic.sivaraam@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.