{"thread":{"id":"3944","subject":"Re: [PATCH] Libify diff-files.","startedAt":"2006-04-22T10:52:00Z","lastAt":"2006-04-22T10:52:00Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19006","messageId":"7vfyk5khm7.fsf@assigned-by-dhcp.cox.net","threadId":"3944","inReplyTo":"7vbqutlxwq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Libify diff-files.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-04-22T10:52:00Z","receivedAt":"2006-04-22T10:52:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I noticed that there are two flags related to missing working\ntree files in diff-files and diff-index.  The former takes -q\nto mean \"do not report lossage of working tree files\", and the\nlatter uses -m to mean \"when not using --cached, pretend that\nmissing working tree files are actually present and match the\nindex\".\n\nBeing able to pretend missing working tree files are unchanged\nwas originally done to help merging in a separate temporary\narea, and it is useful, but I wish we used the same flag.  I\nstarted wondering if we can unify them to '-q', since '-m'\nmeans \"do not ignore merges\" in diff-tree context (including\nlog and whatchanged).\n\nNOTE. -q is different from specifying --diff-filter=ACMRTU;\nwhile the former does not even feed the filepair to diffcore,\nthe latter tells the diffcore to filter deletion out in the\noutput phase.  The distinction makes huge difference when the\nrename/copy detection, especially without --find-copies-harder,\nis involved.\n\nNow, as far as I can tell, nobody uses \"diff-files -q\".  Cogito\nuses \"diff-index -m\" quite a bit, but I suspect large part of it\nis remnant from the days it did a merge in a separate directory,\nand/or a cut-and-paste error from neighbouring \"diff-tree -m -r\".\n\nA cursory look suggests some could even be bugs.  For example,\ncg-patch has\n\n\tdiff-tree -m -r \"$commitparent\" \"$commitid\"\n\n(where -m does not have any effect) which is immediately\nfollowed by a\n\n\tdiff-index -m -r HEAD\n\nwhere -m may or may not be intended.\n"}]}