{"thread":{"id":"40476","subject":"Git feature request: mark a commit as minor","startedAt":"2015-10-02T21:38:46Z","lastAt":"2015-10-04T06:01:10Z","messageCount":7,"participants":["Felipe Micaroni Lalli","Jacob Keller","Mikael Magnusson","Fredrik Gustafsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"271039","messageId":"560EF966.3000501@walltime.info","threadId":"40476","inReplyTo":null,"subject":"Git feature request: mark a commit as minor","fromName":"Felipe Micaroni Lalli","fromEmail":"micaroni@walltime.info","sentAt":"2015-10-02T21:38:46Z","receivedAt":"2015-10-02T21:38:46Z","isPatch":false,"sender":{"key":"micaroni@walltime.info","avatar":"https://gravatar.com/avatar/0aba722671d8b093d085caa57ff07b5c15e1c4f23f534ea004cf22851f62791b?d=mp&s=160"},"body":"A minor change (also called \"cosmetic\") usually is a typo fix, doc\nimprovement, a little code refactoring that don't change the behavior etc.\n\nIn Wikipedia we can mark an edition as \"minor\".\n\nIt would be nice to have an argument like \"--minor\" in git-commit to\nmark the commit as minor. Also, filter in git-log (like --hide-minor) to\nhide the minor changes. The git-log could be optimized to show minor\ncommits more discreetly.\n\n\n\nThank you.\n\n"},{"id":"271043","messageId":"CA+P7+xq8Ds3hYjv2x8S4v8+6F3G+ciGreiZxHxDfzzft520ChQ@mail.gmail.com","threadId":"40476","inReplyTo":"560EF966.3000501@walltime.info","subject":"Re: Git feature request: mark a commit as minor","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2015-10-03T06:11:11Z","receivedAt":"2015-10-03T06:11:11Z","isPatch":false,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Fri, Oct 2, 2015 at 2:38 PM, Felipe Micaroni Lalli\n<micaroni@walltime.info> wrote:\n> A minor change (also called \"cosmetic\") usually is a typo fix, doc\n> improvement, a little code refactoring that don't change the behavior etc.\n>\n> In Wikipedia we can mark an edition as \"minor\".\n>\n> It would be nice to have an argument like \"--minor\" in git-commit to\n> mark the commit as minor. Also, filter in git-log (like --hide-minor) to\n> hide the minor changes. The git-log could be optimized to show minor\n> commits more discreetly.\n>\n>\n\nThis should just be part of the commit message log, generally projects\nuse something like TRIVIAL in the patch subject or similar. You could\nalso standardize for your project(s) what would be considered a minor\nchange. The issue is that not everyone considers these changes as\n\"minor\". You should be able to use a combination of the --grep option\nin log to search for all commits who don't contain that string in the\nright format.\n\nRegards,\nJake\n"},{"id":"271044","messageId":"CAHYJk3Qb89YhVJoOpBLYMoNJX5GvVHnJhf41Gdbtypcp+Yq96g@mail.gmail.com","threadId":"40476","inReplyTo":"CA+P7+xq8Ds3hYjv2x8S4v8+6F3G+ciGreiZxHxDfzzft520ChQ@mail.gmail.com","subject":"Re: Git feature request: mark a commit as minor","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2015-10-03T06:17:47Z","receivedAt":"2015-10-03T06:17:47Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"On Sat, Oct 3, 2015 at 8:11 AM, Jacob Keller <jacob.keller@gmail.com> wrote:\n> On Fri, Oct 2, 2015 at 2:38 PM, Felipe Micaroni Lalli\n> <micaroni@walltime.info> wrote:\n>> A minor change (also called \"cosmetic\") usually is a typo fix, doc\n>> improvement, a little code refactoring that don't change the behavior etc.\n>>\n>> In Wikipedia we can mark an edition as \"minor\".\n>>\n>> It would be nice to have an argument like \"--minor\" in git-commit to\n>> mark the commit as minor. Also, filter in git-log (like --hide-minor) to\n>> hide the minor changes. The git-log could be optimized to show minor\n>> commits more discreetly.\n>>\n>>\n>\n> This should just be part of the commit message log, generally projects\n> use something like TRIVIAL in the patch subject or similar. You could\n> also standardize for your project(s) what would be considered a minor\n> change. The issue is that not everyone considers these changes as\n> \"minor\". You should be able to use a combination of the --grep option\n> in log to search for all commits who don't contain that string in the\n> right format.\n\nCould also be a good use for notes, since you might want to add this\nmarkup after the fact.\n\n-- \nMikael Magnusson\n"},{"id":"271045","messageId":"560F794F.2010809@walltime.info","threadId":"40476","inReplyTo":"CAHYJk3Qb89YhVJoOpBLYMoNJX5GvVHnJhf41Gdbtypcp+Yq96g@mail.gmail.com","subject":"Re: Git feature request: mark a commit as minor","fromName":"Felipe Micaroni Lalli","fromEmail":"micaroni@walltime.info","sentAt":"2015-10-03T06:44:31Z","receivedAt":"2015-10-03T06:44:31Z","isPatch":false,"sender":{"key":"micaroni@walltime.info","avatar":"https://gravatar.com/avatar/0aba722671d8b093d085caa57ff07b5c15e1c4f23f534ea004cf22851f62791b?d=mp&s=160"},"body":"Thank you Jacob.\n\nActually we already use the keyword MINOR for that, exactly as you said.\n\nThe suggestion was made because I think it is a common behavior and it\nwould be nice to be a meta info to standardize this (today each team\nadopt a different pattern for that - you used \"TRIVIAL\" e.g.). Nice\nthings could be done with this meta-info. It could be totally ignored\n(current git operation) or it could be used to filter, to sort, to group\ncommits, to show the log pretty etc.\n\n> The issue is that not everyone considers these changes as \"minor\".\n\nI understand this issue, I know it is subjective. But if someone don't\nwant to make the distinction just don't use the argument --hide-minor\nfor example.\n\n\n\n\nOn 03/10/2015 03:17, Mikael Magnusson wrote:\n> On Sat, Oct 3, 2015 at 8:11 AM, Jacob Keller <jacob.keller@gmail.com> wrote:\n>> On Fri, Oct 2, 2015 at 2:38 PM, Felipe Micaroni Lalli\n>> <micaroni@walltime.info> wrote:\n>>> A minor change (also called \"cosmetic\") usually is a typo fix, doc\n>>> improvement, a little code refactoring that don't change the behavior etc.\n>>>\n>>> In Wikipedia we can mark an edition as \"minor\".\n>>>\n>>> It would be nice to have an argument like \"--minor\" in git-commit to\n>>> mark the commit as minor. Also, filter in git-log (like --hide-minor) to\n>>> hide the minor changes. The git-log could be optimized to show minor\n>>> commits more discreetly.\n>>>\n>>>\n>>\n>> This should just be part of the commit message log, generally projects\n>> use something like TRIVIAL in the patch subject or similar. You could\n>> also standardize for your project(s) what would be considered a minor\n>> change. The issue is that not everyone considers these changes as\n>> \"minor\". You should be able to use a combination of the --grep option\n>> in log to search for all commits who don't contain that string in the\n>> right format.\n> \n> Could also be a good use for notes, since you might want to add this\n> markup after the fact.\n> \n\n"},{"id":"271067","messageId":"20151003181222.GA2024@paksenarrion.iveqy.com","threadId":"40476","inReplyTo":"560EF966.3000501@walltime.info","subject":"Re: Git feature request: mark a commit as minor","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2015-10-03T18:12:22Z","receivedAt":"2015-10-03T18:12:22Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Fri, Oct 02, 2015 at 06:38:46PM -0300, Felipe Micaroni Lalli wrote:\n> A minor change (also called \"cosmetic\") usually is a typo fix, doc\n> improvement, a little code refactoring that don't change the behavior etc.\n> \n> In Wikipedia we can mark an edition as \"minor\".\n> \n> It would be nice to have an argument like \"--minor\" in git-commit to\n> mark the commit as minor. Also, filter in git-log (like --hide-minor) to\n> hide the minor changes. The git-log could be optimized to show minor\n> commits more discreetly.\n\nI can see your problem and implement your suggest is a solution that\nwould work. However since this is a common problem, git already has a\nsolution, that is the interactive rebase.\n\nYou can read a discussion about when to use merge and rebase here:\nhttp://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html\n\nThis work method make the \"minor\" commits to go away. There shouldn't be\nany minor, or \"fixup\" commits in your history (of course there's\nexception).\n\nMinor things should be caught in your code review process and then\nfixed, rebased and the merged again.\n\nOr do I miss a usecase here?\n\n-- \nFredrik Gustafsson\n\nphone: +46 733-608274\ne-mail: iveqy@iveqy.com\nwebsite: http://www.iveqy.com\n"},{"id":"271070","messageId":"5610320D.30806@walltime.info","threadId":"40476","inReplyTo":"20151003181222.GA2024@paksenarrion.iveqy.com","subject":"Re: Git feature request: mark a commit as minor","fromName":"Felipe Micaroni Lalli","fromEmail":"micaroni@walltime.info","sentAt":"2015-10-03T19:52:45Z","receivedAt":"2015-10-03T19:52:45Z","isPatch":false,"sender":{"key":"micaroni@walltime.info","avatar":"https://gravatar.com/avatar/0aba722671d8b093d085caa57ff07b5c15e1c4f23f534ea004cf22851f62791b?d=mp&s=160"},"body":"You are right. It could be useful to fix old commits (already pushed)\nbut it could encourage bad practices. Minor changes should be avoided,\nit is an exception, not a rule.\n\nThank you Fredrik.\n\n\nOn 03/10/2015 15:12, Fredrik Gustafsson wrote:\n> On Fri, Oct 02, 2015 at 06:38:46PM -0300, Felipe Micaroni Lalli wrote:\n>> A minor change (also called \"cosmetic\") usually is a typo fix, doc\n>> improvement, a little code refactoring that don't change the behavior etc.\n>>\n>> In Wikipedia we can mark an edition as \"minor\".\n>>\n>> It would be nice to have an argument like \"--minor\" in git-commit to\n>> mark the commit as minor. Also, filter in git-log (like --hide-minor) to\n>> hide the minor changes. The git-log could be optimized to show minor\n>> commits more discreetly.\n> \n> I can see your problem and implement your suggest is a solution that\n> would work. However since this is a common problem, git already has a\n> solution, that is the interactive rebase.\n> \n> You can read a discussion about when to use merge and rebase here:\n> http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html\n> \n> This work method make the \"minor\" commits to go away. There shouldn't be\n> any minor, or \"fixup\" commits in your history (of course there's\n> exception).\n> \n> Minor things should be caught in your code review process and then\n> fixed, rebased and the merged again.\n> \n> Or do I miss a usecase here?\n> \n\n"},{"id":"271078","messageId":"CA+P7+xqS0iLmo2+nLz7PyCTP7CmxjX-VONvB+-HQX9sHEiSwAw@mail.gmail.com","threadId":"40476","inReplyTo":"560F794F.2010809@walltime.info","subject":"Re: Git feature request: mark a commit as minor","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2015-10-04T06:01:10Z","receivedAt":"2015-10-04T06:01:10Z","isPatch":false,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Fri, Oct 2, 2015 at 11:44 PM, Felipe Micaroni Lalli\n<micaroni@walltime.info> wrote:\n> Actually we already use the keyword MINOR for that, exactly as you said.\n>\n> The suggestion was made because I think it is a common behavior and it\n> would be nice to be a meta info to standardize this (today each team\n> adopt a different pattern for that - you used \"TRIVIAL\" e.g.). Nice\n> things could be done with this meta-info. It could be totally ignored\n> (current git operation) or it could be used to filter, to sort, to group\n> commits, to show the log pretty etc.\n>\n>> The issue is that not everyone considers these changes as \"minor\".\n>\n> I understand this issue, I know it is subjective. But if someone don't\n> want to make the distinction just don't use the argument --hide-minor\n> for example.\n>\n>\n\nI think use of git-notes is probably the best way. Not sure how/if you\ncan implement filtering on that, but I don't personally think\nsomething like this belongs in core git.\n\nRegards,\nJake\n"}]}