git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Joel Kaasinen <joel.kaasinen@gmail.com>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: Bug report: git grep seems to use the wrong .gitattributes when invoked in a subdirectory
Date: Thu, 23 May 2013 17:49:35 +0200	[thread overview]
Message-ID: <519E3A8F.9070600@lsrfire.ath.cx> (raw)
In-Reply-To: <CAK=EYX51G57borL_Hy2XzqJVML4wmAgOCBPwFLa+miDDY30O7Q@mail.gmail.com>

Am 23.05.2013 14:44, schrieb Joel Kaasinen:
> [pseudo:~/tmp]% git --version
> git version 1.7.10.4
> [pseudo:~/tmp]% git init git-test
> Initialized empty Git repository in/home/opqdonut/tmp/git-test/.git/
> [pseudo:~/tmp]% cd git-test
> [pseudo:~/tmp/git-test:master()]% mkdir -p a/data
> [pseudo:~/tmp/git-test:master()]% mkdir data
> [pseudo:~/tmp/git-test:master()]% echo '* binary' > data/.gitattributes
> [pseudo:~/tmp/git-test:master()]% echo foo > a/data/foo
> [pseudo:~/tmp/git-test:master()]% git add -A
> [pseudo:~/tmp/git-test:master()]% git commit -m "foo"
> [master (root-commit) 20fafbb] foo
>   2 files changed, 1 insertion(+)
>   create mode 100644 a/data/foo
>   create mode 100644 data/.gitattributes
> [pseudo:~/tmp/git-test:master()]% git grep foo
> a/data/foo:foo
> [pseudo:~/tmp/git-test:master()]% cd a
> [pseudo:~/tmp/git-test/a:master()]% git grep foo
> Binary file data/foo matches

Just checked, with git 1.8.2.3 the last command shows a matching line.

The issue has probably been fixed by 55c6168 (grep: stop looking at 
random places for .gitattributes).  The lowest release with that patch 
is git 1.8.0.1.

René

      reply	other threads:[~2013-05-23 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 12:44 Bug report: git grep seems to use the wrong .gitattributes when invoked in a subdirectory Joel Kaasinen
2013-05-23 15:49 ` René Scharfe [this message]

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=519E3A8F.9070600@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=git@vger.kernel.org \
    --cc=joel.kaasinen@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.
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 NNTP newsgroup(s).