{"thread":{"id":"39058","subject":"inexact rename detection warning on \"git log -p\"","startedAt":"2015-04-13T10:47:15Z","lastAt":"2015-04-13T15:11:33Z","messageCount":2,"participants":["Matthew Walster","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"259285","messageId":"loom.20150413T121644-743@post.gmane.org","threadId":"39058","inReplyTo":null,"subject":"inexact rename detection warning on \"git log -p\"","fromName":"Matthew Walster","fromEmail":"matthew@walster.org","sentAt":"2015-04-13T10:47:15Z","receivedAt":"2015-04-13T10:47:15Z","isPatch":false,"sender":{"key":"matthew@walster.org","avatar":null},"body":"Out of idle curiosity, I cloned \ngit://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and chose \nto generate some statistics:\n\n$ find -not -iname '.git' | wc\n  52154   52154 1820305\n\nThat's a few files...\n\n$ git log | wc\n8359290 37279781 334525133\n\nHmmm, well that's not too useful, let's see how many commits there are:\n\n$ git log | grep ^commit | wc\n 507296 1014592 24350208\n\nand merges:\n\n$ git log | grep ^Merge: | wc\n  36019  111146  854397\n\nI wonder what the total size of all changes are:\n\n$ git log --patch | wc\nwarning: inexact rename detection was skipped due to too many files.\nwarning: you may want to set your diff.renameLimit variable to at least 779 \nand retry the command.\n93295818 366207219 3072072294\n\nMy bug report is in reference to the warning: It's not clear whether this \nwarning just \"warns\" the user (hence the warning rather than an error) or \nwhether it actually had an fault and didn't complete the operation \nsuccessfully. It's also not clear whether the detection was aborted halfway \nthrough, or whether the work it has so far done has been discarded and is \ntherefore idempotent if I *lowered* the renameLimit value (as opposed to \nraising it to fix the warning).\n\nCould the wording be changed to indicate that the operation continued \nwithout the rename detection? My preferred wording would be:\n\nwarning: inexact rename detection was skipped due to too many files.\nwarning: you may want to set your diff.renameLimit variable to at least 779 \nand retry the command.\nwarning: continuing processing without inexact rename detection\n\nI'm a native English speaker and even I found the wording a little confusing \n-- although people used to gcc will know warning is informational and error \nis abortive, not all git users are aware of the distinction.\n\nAdditionally, is the renameLimit something that could potentially be \nsomething dynamic (i.e. it inspects how much free RAM is available and \nincreases the buffer if appropriate) or is that a conscious decision not to \ngive the process \"free reign\"?\n\nCheers,\n\n\nMatthew Walster\n"},{"id":"259295","messageId":"552BDCA5.3020505@drmicha.warpmail.net","threadId":"39058","inReplyTo":"loom.20150413T121644-743@post.gmane.org","subject":"Re: inexact rename detection warning on \"git log -p\"","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-04-13T15:11:33Z","receivedAt":"2015-04-13T15:11:33Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Matthew Walster venit, vidit, dixit 13.04.2015 12:47:\n> Out of idle curiosity, I cloned \n> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and chose \n> to generate some statistics:\n> \n> $ find -not -iname '.git' | wc\n>   52154   52154 1820305\n\ngit ls-files | wc -l\n\n> That's a few files...\n> \n> $ git log | wc\n> 8359290 37279781 334525133\n\n??\n\n> Hmmm, well that's not too useful, let's see how many commits there are:\n> \n> $ git log | grep ^commit | wc\n>  507296 1014592 24350208\n\ngit rev-list --count HEAD\n\n> and merges:\n> \n> $ git log | grep ^Merge: | wc\n>   36019  111146  854397\n\ngit rev-list --count --merges HEAD\n\nI wonder why people are so found of wc.\n\n> I wonder what the total size of all changes are:\n> \n> $ git log --patch | wc\n\nThat counts quite a bit more than just patch lines: Boiler plate, log\nmessages, diff headers.\n\n> warning: inexact rename detection was skipped due to too many files.\n> warning: you may want to set your diff.renameLimit variable to at least 779 \n> and retry the command.\n> 93295818 366207219 3072072294\n> \n> My bug report is in reference to the warning: It's not clear whether this \n> warning just \"warns\" the user (hence the warning rather than an error) or \n> whether it actually had an fault and didn't complete the operation \n> successfully. It's also not clear whether the detection was aborted halfway \n> through, or whether the work it has so far done has been discarded and is \n> therefore idempotent if I *lowered* the renameLimit value (as opposed to \n> raising it to fix the warning).\n> \n> Could the wording be changed to indicate that the operation continued \n> without the rename detection? My preferred wording would be:\n> \n> warning: inexact rename detection was skipped due to too many files.\n> warning: you may want to set your diff.renameLimit variable to at least 779 \n> and retry the command.\n> warning: continuing processing without inexact rename detection\n> \n> I'm a native English speaker and even I found the wording a little confusing \n> -- although people used to gcc will know warning is informational and error \n> is abortive, not all git users are aware of the distinction.\n\n\"was skipped\" and \"without foo\" sound pretty similar to me. But what's\nworse: \"continue processing without foo\" creates the impression that all\nfurther processing is done without \"foo\", which is a bit misleading: in\nfact, foo was skipped for at least one diff. So I think the original is\ncloser to the truth.\n\n> Additionally, is the renameLimit something that could potentially be \n> something dynamic (i.e. it inspects how much free RAM is available and \n> increases the buffer if appropriate) or is that a conscious decision not to \n> give the process \"free reign\"?\n\nI think it's more about time than memory. Note that this is quadratic in\nthe number of files.\n\nIf you want to take a shot at an automatic setting: grepping for\n\"rename_limit\" (especially \"needed_rename_limit\" and\n\"diff_rename_limit_default\") will give you some pointers.\n\nMichael\n"}]}