git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG?] bulk checkin does not respect filters

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 24, 2012, 03:42 UTC
Message-ID
<7vr4xk28z0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vvcmw2a3m.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Jeff King <peff@peff.net> writes:
>
>> Thoughts? Was this intentional, or just overlooked?

It is a bit curious that anything filtered even goes to the streaming codepath, given this piece of code in write_entry() in entry.c:

	if (ce_mode_s_ifmt == S_IFREG) {
		struct stream_filter *filter = get_stream_filter(path, ce->sha1);
		if (filter &&
		    !streaming_write_entry(ce, path, filter,
					   state, to_tempfile,
					   &fstat_done, &st))
			goto finish;
	}

and get_stream_filter() in convert.c has an explicit exception for this case at the very beginning:

struct stream_filter *get_stream_filter(const char *path, const unsigned char *sha1)
{
	struct conv_attrs ca;
	enum crlf_action crlf_action;
	struct stream_filter *filter = NULL;
	convert_attrs(&ca, path);
	if (ca.drv && (ca.drv->smudge || ca.drv->clean))
		return filter;

to make sure that it says "No streaming filtering is possible, do not even attempt to call streaming_write_entry()".

Previous: Junio C HamanoNext: Jeff King
Message 3 of 19 in “[BUG?] bulk checkin does not respect filters”
  1. Jeff KingFeb 24, 2012
  2. Junio C HamanoFeb 24, 2012
  3. Junio C HamanoFeb 24, 2012
  4. Jeff KingFeb 24, 2012
  5. Junio C HamanoFeb 24, 2012
  6. Jeff KingFeb 24, 2012
  7. Jeff KingFeb 24, 2012
  8. 1/2 teach convert_to_git a "dry run" modeJeff King, Feb 24, 2012
  9. 2/2 do not stream large files to pack when filters are in useJeff King, Feb 24, 2012
  10. Junio C HamanoFeb 24, 2012
  11. Jeff KingFeb 24, 2012
  12. Jeff KingFeb 24, 2012
  13. Junio C HamanoFeb 24, 2012
  14. Jeff KingFeb 24, 2012
  15. 1/3 teach convert_to_git a "dry run" modeJeff King, Feb 24, 2012
  16. 2/3 teach dry-run convert_to_git not to require a src bufferJeff King, Feb 24, 2012
  17. 3/3 do not stream large files to pack when filters are in useJeff King, Feb 24, 2012
  18. Junio C HamanoFeb 24, 2012
  19. Junio C HamanoFeb 24, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.