Re: proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Joey Hess
Junio C Hamano wrote: > > Secondly, and harder to get around, the filename passed to the clean > > filter is not necessarily a path to the actual existing file that is > > being cleaned. > > Either one of us is confused. I was talking about updating the > current "clean" implementation without

Re: proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Joey Hess
Junio C Hamano wrote: > The smudge happens to be the last to run, so it is quite true that > it can say "Hey Git, I've written it out already". > > I didn't check all codepaths to ensure that we won't need the > smudged result in core at all, but I am guessing you did so before > making this

Re: proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Junio C Hamano
Joey Hess writes: > Junio C Hamano wrote: >> This side, I do not think we even need a new variant. We can just >> update the code to interact with "clean" so that it the writer to >> the pipe ignores SIGPIPE, detects EPIPE on write(2), says "ah, the >> other end does not need

Re: proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Joey Hess
Junio C Hamano wrote: > This side, I do not think we even need a new variant. We can just > update the code to interact with "clean" so that it the writer to > the pipe ignores SIGPIPE, detects EPIPE on write(2), says "ah, the > other end does not need the full input to produce its output". The

Re: proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Junio C Hamano
Joey Hess writes: > The clean filter has to consume the whole file content on stdin; > not reading it all will make git think the clean filter failed. > But, git-annex often doesn't need to read the whole content of a > work-tree file in order to clean it. This side, I do not

Re: proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Junio C Hamano
Joey Hess writes: > I'm using smudge/clean filters in git-annex now, and it's not been an > entirely smooth fit between the interface and what git-annex wants > to do. > > The clean filter has to consume the whole file content on stdin; > not reading it all will make git think

proposal for extending smudge/clean filters with raw file access

2016-05-12 Thread Joey Hess
I'm using smudge/clean filters in git-annex now, and it's not been an entirely smooth fit between the interface and what git-annex wants to do. The clean filter has to consume the whole file content on stdin; not reading it all will make git think the clean filter failed. But, git-annex often