From: Junio C Hamano Date: Thu, 19 Apr 2007 08:08:28 GMT Subject: Re: [PATCH 0/2] Custom low-level merge driver support. Message-ID: <7v1wig9477.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070419075229.GA27208@admingilde.org> Martin Waitz writes: > or different attributes for other file types: > > [attr] *@ merge=ours # for symlinks > [attr] */ merge=submodule # for dirlinks We already have much more general mechanism to model this on for merges. Look at how git-merge-one-file is invoked. It gets the mode bits which tells what kind of object the path is, for all three (i.e. ancestor, ours, and theirs). So a single, perhaps not so low-level, merge driver can take the same set of attributes merge-one-file makes use of, not just the current set of %O/%A/%B temporary files, and make intelligent decision to override what is hardcoded in merge-recursive if it wants to. We do not need to pollute the gitattribute mechanism for this application; it can and should stay about path*name*s.