git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ralph Corderoy <ralph@inputplus.co.uk>
To: git@vger.kernel.org
Subject: git-log(1) Doesn't Describe -L start,end Fully.
Date: Thu, 11 May 2017 14:45:00 +0100	[thread overview]
Message-ID: <20170511134500.4EA9E20162@orac.inputplus.co.uk> (raw)

Hi,

Arch Linux's git 2.12.2-4's git-log(1) says

    -L <start>,<end>:<file>, -L :<funcname>:<file>
        Trace the evolution of the line range given by "<start>,<end>"
        (or the function name regex <funcname>) within the <file>.  You
        may not give any pathspec limiters.  This is currently limited
        to a walk starting from a single revision, i.e. you may only
        give zero or one positive revision arguments.  You can specify
        this option more than once.

	<start> and <end> can take one of these forms:

	number
            If <start> or <end> is a number, it specifies an absolute
            line number (lines count from 1).

It doesn't say one or both of start and end may be omitted.  Thus `-L
,:foobar.c' is valid with start defaulting to 1 and end to the number of
lines in foobar.c.  

Nor does it explain if 1,42 covering all of foobar.c as it is now swells
to be 1,314 as the commits are walked to larger versions of foobar.c.

This was noticed because I've started with foo.c and bar.c, and each was
`git mv'd to foobar.c in separate commits that were then each merged.
I'm trying to `git log' HEAD's foobar.c and have it walk past the merges
to show be foo.c and bar.c's history.

`git log HEAD -- foobar.c foo.c bar.c' works, but one has to specify all
the old names.  `git log -L ,:foobar.c' works for a simple test case,
but I don't know if changes outside of foobar.c's current 1,42 lines
would always show up.  And also -L triggers patches and --no-patch
doesn't stop that;  bug?  The -L logic seems particular to `git log' so
I can't have git-rev-list(1) do that work to provide the commits and
then log them separately.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

                 reply	other threads:[~2017-05-11 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20170511134500.4EA9E20162@orac.inputplus.co.uk \
    --to=ralph@inputplus.co.uk \
    --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).