git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jaap Eldering <jaap@jaapeldering.nl>
To: git@vger.kernel.org
Subject: bug: git log --follow does not honour --author option
Date: Thu, 13 Jan 2022 12:58:27 +0100	[thread overview]
Message-ID: <d4bf0749-82f4-2d76-c36c-334a8a19abdf@jaapeldering.nl> (raw)

Hi,

I ran into this issue, see the output from git bugreport below. I first found it in version 2.30.2 from Debian Bullseye, but was able reproduce it also with a build from the next branch.

Best,
Jaap


What did you do before the bug happened? (Steps to reproduce your issue)

A minimal working example reproducing the bug:

git init test-log-follow-author
cd test-log-follow-author
echo "Some contents." > foo
git add foo
git commit -m "Initial commit." --author "Myself <myself@example.com>"
git mv foo bar
git commit -m "Let's rename this." --author "Random other person <random@example.com>"
git log --follow --author myself -- bar


What did you expect to happen? (Expected behavior)

I expected the last git log command to show the initial commit made
by myself.


What happened instead? (Actual behavior)

No commits show up.


What's different between what you expected and what actually happened?

The --author option doesn't seem to find commits across renames when
using --follow, except for when searching the author who renamed the
file: these are found, and all commits also show up as expected when
no --author argument is used.


Anything else you want to add:

[System Info]
git version:
git version 2.35.0.rc0.227.g00780c9af4
cpu: x86_64
built from commit: 00780c9af44409a68481c82f63a97bd18bb2593e
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64
compiler info: gnuc: 10.2
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

                 reply	other threads:[~2022-01-13 12:07 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=d4bf0749-82f4-2d76-c36c-334a8a19abdf@jaapeldering.nl \
    --to=jaap@jaapeldering.nl \
    --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).