git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Adam Spiers <git@adamspiers.org>
To: git mailing list <git@vger.kernel.org>
Subject: git-log: documenting pathspec usage
Date: Mon, 16 Nov 2020 12:22:30 +0000	[thread overview]
Message-ID: <20201116122230.eyizwe2bmqkmftch@gmail.com> (raw)

Hi all,

I just noticed that git-log.txt has: 

     SYNOPSIS
     --------
     [verse]
     'git log' [<options>] [<revision range>] [[--] <path>...]

and builtin/log.c has: 

     static const char * const builtin_log_usage[] = {
             N_("git log [<options>] [<revision-range>] [[--] <path>...]"),

IIUC, the references to <path> should actually be <pathspec> instead,
as seen with other pathspec-supporting commands such as git add/rm
whose man pages are extra helpful in explicitly calling out how
pathspecs can be used, e.g.:

     OPTIONS
     -------
     <pathspec>...::
             Files to add content from.  Fileglobs (e.g. `*.c`) can
             be given to add all matching files.  Also a
             leading directory name (e.g. `dir` to add `dir/file1`
             and `dir/file2`) can be given to update the index to
             match the current state of the directory as a whole (e.g.
             specifying `dir` will record not just a file `dir/file1`
             modified in the working tree, a file `dir/file2` added to
             the working tree, but also a file `dir/file3` removed from
             the working tree). Note that older versions of Git used
             to ignore removed files; use `--no-all` option if you want
             to add modified or new files but ignore removed ones.
     +
     For more details about the <pathspec> syntax, see the 'pathspec' entry
     in linkgit:gitglossary[7].

Would it be fair to say the git-log usage syntax and man page should
be updated to match?  If so perhaps I can volunteer for that.

Regards,
Adam

             reply	other threads:[~2020-11-16 12:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 12:22 Adam Spiers [this message]
2020-11-16 12:37 ` git-log: documenting pathspec usage Ævar Arnfjörð Bjarmason
2020-11-16 17:46   ` Philippe Blain
2020-11-16 18:55   ` Junio C Hamano

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=20201116122230.eyizwe2bmqkmftch@gmail.com \
    --to=git@adamspiers.org \
    --cc=git@vger.kernel.org \
    /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).