From: Junio C Hamano Date: Thu, 14 Jul 2016 19:10:20 GMT Subject: Re: Server-side preventing some files from being overwritten Message-ID: In-Reply-To: Thorsten Glaser writes: > On Thu, 14 Jul 2016, Junio C Hamano wrote: > >> Can't this become simpler, e.g. >> >> if ! git diff-tree --quiet "$old" "$new" -- "$subdir" > > Thought about diff-tree, but additions are permitted, diff-tree -r --diff-filter=a "$old" "$new" -- "$subdir" or something like that? > and diffing the actual file content has overhead too. It is why exactly "diff-tree" is desired here, as you do not have to diff actual file at all.