git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Magnus Bäck" <magnus.back@sonyericsson.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Magnus Bäck" <magnus.back@sonyericsson.com>,
	Abscissa <bus_nabble_git@semitwist.com>,
	git@vger.kernel.org, "Jakub Narebski" <jnareb@gmail.com>,
	"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
Subject: Re: Checkout tag?
Date: Sun, 22 Jan 2012 18:33:52 +0100	[thread overview]
Message-ID: <20120122173352.GA1068@jpl.local> (raw)
In-Reply-To: <20120122170800.GA29215@burratino>

On Sunday, January 22, 2012 at 18:08 CET,
     Jonathan Nieder <jrnieder@gmail.com> wrote:

> Magnus Bäck wrote:
> 
> > Looking at an up to date Git 1.7.9-rc2 man page, it still seems
> > slightly inconsistent with itself. The synopsis at the top says
> >
> >       git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...]
> >
> > while the text in the DESCRIPTION section says
> >
> >       git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>...
> 
> Hmm, my copy says:
> 
> 	SYNOPSIS
> 
> 	git checkout [-q] [-f] [-m] [<branch>]
> 	git checkout [-q] [-f] [-m] [--detach] [<commit>]
> 	git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
> 	git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
> 	git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...]

Perhaps I wasn't clear -- I didn't mean that the synopsis *only* listed
the form in my original quote above.

> 	DESCRIPTION
> 
> 	... overview ...
> 
> 	git checkout [<branch>], git checkout -b|-B <new_branch> [<start point>],
> 	git checkout [--detach] [<commit>]
> 
> 		This form switches branches by updating the index, working
> 		tree, and HEAD...
> 
> 	git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>...
> 
> 		When <paths> or --patch are given, git checkout does not
> 		switch branches. It updates the named paths...
> 
> So in the synopsis it lists five forms, and in the description section
> it lists two forms, the first of which has three variants.
> 
> It's not immediately obvious to me which inconsistency you are
> pointing to as a source of confusion.  Could you elaborate,
> preferably with suggested wording for a fix?

I simply meant that

   git checkout [-p|--patch] [<tree-ish>] [--] [<paths>...]
   git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>...

aren't identical even though I assume they describe the exact same
scenario. The first command synopsis makes it clear that paths are
optional while the second indicates that at least one path must be
specified (unless "..." means "zero, one, or more occurences").
Also, "paths" != "pathspec".

> If you can do so in the form of a patch, all the better. ;-)

Sure, but it won't be during the coming week. Not that the patch is
terribly difficult to prepare but because I need legal approval to
submit it, and it's not clear I'll have time to deal with all that
during my last week at work.

-- 
Magnus Bäck                   Opinions are my own and do not necessarily
SW Configuration Manager      represent the ones of my employer, etc.
Sony Ericsson

  reply	other threads:[~2012-01-22 17:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-22 10:05 Checkout tag? Abscissa
2012-01-22 10:11 ` Magnus Bäck
2012-01-22 10:25   ` Abscissa
2012-01-22 11:31     ` Magnus Bäck
2012-01-22 17:08       ` Jonathan Nieder
2012-01-22 17:33         ` Magnus Bäck [this message]
2012-01-22 10:26   ` Abscissa
2012-01-22 10:26   ` Abscissa
2012-01-22 10:27   ` Abscissa
2012-01-22 10:27   ` Abscissa
2012-01-22 10:28   ` Abscissa
2012-01-22 10:28   ` Abscissa
2012-01-22 10:29   ` Abscissa
2012-01-22 11:30   ` Jakub Narebski
2012-01-22 10:18 ` Nguyen Thai Ngoc Duy
2012-01-22 10:29   ` Abscissa
2012-01-22 10:34     ` Abscissa

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=20120122173352.GA1068@jpl.local \
    --to=magnus.back@sonyericsson.com \
    --cc=bus_nabble_git@semitwist.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@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.
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).