{"thread":{"id":"24923","subject":"RFH: is the current file available to a custom merge driver?","startedAt":"2010-08-31T18:52:19Z","lastAt":"2010-08-31T19:07:40Z","messageCount":3,"participants":["Eric Raible","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"149478","messageId":"4C7D4F63.2060307@nextest.com","threadId":"24923","inReplyTo":null,"subject":"RFH: is the current file available to a custom merge driver?","fromName":"Eric Raible","fromEmail":"raible@nextest.com","sentAt":"2010-08-31T18:52:19Z","receivedAt":"2010-08-31T18:52:19Z","isPatch":false,"sender":{"key":"raible@nextest.com","avatar":null},"body":"[Note: this is a resend - the initial attempt got no responses]\n\nHello All -\n\nIn writing a custom merge driver to support $dayjob\nrequirements I've failed to find a simple way of getting\nthe current file name that the driver is supposed to\nbe merging.\n\nI of course have the \"ancestor\", \"ours\", and \"theirs\"\ntemporary files, but for Ui purposes I'd like to know\nthe filename as well.\n\nAs a workaround, I'm grepping for the git-hash-object\nof %A (aka \"ours) from the output of \"git ls-tree -r HEAD\".\n\nI've examined the environment, and saw nothing relevant.\n\"git-ls-files -u\" isn't useful, since the items aren't\nunmerged yet.\n\nCan anyone offer hints/help/tips?\n\nThanks - Eric\n\ngit version 1.7.0.2.msysgit.0\n"},{"id":"149479","messageId":"20100831185708.GS2315@burratino","threadId":"24923","inReplyTo":"4C7D4F63.2060307@nextest.com","subject":"Re: RFH: is the current file available to a custom merge driver?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-31T18:57:08Z","receivedAt":"2010-08-31T18:57:08Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Eric,\n\nEric Raible wrote:\n\n> In writing a custom merge driver to support $dayjob\n> requirements I've failed to find a simple way of getting\n> the current file name that the driver is supposed to\n> be merging.\n> \n> I of course have the \"ancestor\", \"ours\", and \"theirs\"\n> temporary files, but for Ui purposes I'd like to know\n> the filename as well.\n\nIt's not available.  You can try modifying ll-merge.c to\nexpose it if you have an idea about how that should work.\n"},{"id":"149480","messageId":"4C7D52FC.8000701@nextest.com","threadId":"24923","inReplyTo":"20100831185708.GS2315@burratino","subject":"Re: RFH: is the current file available to a custom merge driver?","fromName":"Eric Raible","fromEmail":"raible@nextest.com","sentAt":"2010-08-31T19:07:40Z","receivedAt":"2010-08-31T19:07:40Z","isPatch":false,"sender":{"key":"raible@nextest.com","avatar":null},"body":"On 8/31/2010 11:57 AM, Jonathan Nieder wrote:\n> Hi Eric,\n> \n> Eric Raible wrote:\n> \n>> In writing a custom merge driver to support $dayjob\n>> requirements I've failed to find a simple way of getting\n>> the current file name that the driver is supposed to\n>> be merging.\n>>\n>> I of course have the \"ancestor\", \"ours\", and \"theirs\"\n>> temporary files, but for Ui purposes I'd like to know\n>> the filename as well.\n> \n> It's not available.  You can try modifying ll-merge.c to\n> expose it if you have an idea about how that should work.\n> .\n\nThanks Jonathan for the (very!) quick response, but since\ntime is short I think I'll stick with my current technique\n(grepping $(git ls-tree -r HEAD) for $(git hash-object %A))\n"}]}