Re: [PATCH v2 2/2] grep: stop looking at random places for .gitattributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 10/10/2012 15:59, schrieb Nguyễn Thái Ngọc Duy:
> This patch passes real paths down to grep_source_load_driver(). Except
> grepping a blob, all other cases should have right paths down to

... grepping a blob or tree object...

> grep_source_load_driver(). In other words, .gitattributes are still
> respected.
...
> +test_expect_success 'grep --cached respects binary diff attribute (2)' '
> +	git add .gitattributes &&
> +	rm .gitattributes &&
> +	git grep --cached text t >actual &&
> +	test_cmp expect actual &&
> +	git checkout .gitattributes &&
> +	git rm --cached .gitattributes
> +'

This should perhaps be test_when_finished "git rm --cached .gitattributes".

> +
> +test_expect_success 'grep tree respects binary diff attribute' '

I was confused by the word "tree" here. Isn't "pathspec" more correct?

> +	git commit -m new &&
> +	echo "Binary file HEAD:t matches" >expect &&
> +	git grep text HEAD -- t >actual &&
> +	test_cmp expect actual &&
> +	git reset HEAD^
> +'

And in yet another test, should

	git grep text HEAD:t

/not/ respect the binary attribute?

At any rate, I don't observe the warnings anymore with this series.

Thanks,
-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]