git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git feature request: mark a commit as minor
@ 2015-10-02 21:38 Felipe Micaroni Lalli
  2015-10-03  6:11 ` Jacob Keller
  2015-10-03 18:12 ` Fredrik Gustafsson
  0 siblings, 2 replies; 7+ messages in thread
From: Felipe Micaroni Lalli @ 2015-10-02 21:38 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

A minor change (also called "cosmetic") usually is a typo fix, doc
improvement, a little code refactoring that don't change the behavior etc.

In Wikipedia we can mark an edition as "minor".

It would be nice to have an argument like "--minor" in git-commit to
mark the commit as minor. Also, filter in git-log (like --hide-minor) to
hide the minor changes. The git-log could be optimized to show minor
commits more discreetly.



Thank you.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git feature request: mark a commit as minor
  2015-10-02 21:38 Git feature request: mark a commit as minor Felipe Micaroni Lalli
@ 2015-10-03  6:11 ` Jacob Keller
  2015-10-03  6:17   ` Mikael Magnusson
  2015-10-03 18:12 ` Fredrik Gustafsson
  1 sibling, 1 reply; 7+ messages in thread
From: Jacob Keller @ 2015-10-03  6:11 UTC (permalink / raw)
  To: Felipe Micaroni Lalli; +Cc: Git List

On Fri, Oct 2, 2015 at 2:38 PM, Felipe Micaroni Lalli
<micaroni@walltime.info> wrote:
> A minor change (also called "cosmetic") usually is a typo fix, doc
> improvement, a little code refactoring that don't change the behavior etc.
>
> In Wikipedia we can mark an edition as "minor".
>
> It would be nice to have an argument like "--minor" in git-commit to
> mark the commit as minor. Also, filter in git-log (like --hide-minor) to
> hide the minor changes. The git-log could be optimized to show minor
> commits more discreetly.
>
>

This should just be part of the commit message log, generally projects
use something like TRIVIAL in the patch subject or similar. You could
also standardize for your project(s) what would be considered a minor
change. The issue is that not everyone considers these changes as
"minor". You should be able to use a combination of the --grep option
in log to search for all commits who don't contain that string in the
right format.

Regards,
Jake

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git feature request: mark a commit as minor
  2015-10-03  6:11 ` Jacob Keller
@ 2015-10-03  6:17   ` Mikael Magnusson
  2015-10-03  6:44     ` Felipe Micaroni Lalli
  0 siblings, 1 reply; 7+ messages in thread
From: Mikael Magnusson @ 2015-10-03  6:17 UTC (permalink / raw)
  To: Jacob Keller; +Cc: Felipe Micaroni Lalli, Git List

On Sat, Oct 3, 2015 at 8:11 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
> On Fri, Oct 2, 2015 at 2:38 PM, Felipe Micaroni Lalli
> <micaroni@walltime.info> wrote:
>> A minor change (also called "cosmetic") usually is a typo fix, doc
>> improvement, a little code refactoring that don't change the behavior etc.
>>
>> In Wikipedia we can mark an edition as "minor".
>>
>> It would be nice to have an argument like "--minor" in git-commit to
>> mark the commit as minor. Also, filter in git-log (like --hide-minor) to
>> hide the minor changes. The git-log could be optimized to show minor
>> commits more discreetly.
>>
>>
>
> This should just be part of the commit message log, generally projects
> use something like TRIVIAL in the patch subject or similar. You could
> also standardize for your project(s) what would be considered a minor
> change. The issue is that not everyone considers these changes as
> "minor". You should be able to use a combination of the --grep option
> in log to search for all commits who don't contain that string in the
> right format.

Could also be a good use for notes, since you might want to add this
markup after the fact.

-- 
Mikael Magnusson

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git feature request: mark a commit as minor
  2015-10-03  6:17   ` Mikael Magnusson
@ 2015-10-03  6:44     ` Felipe Micaroni Lalli
  2015-10-04  6:01       ` Jacob Keller
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Micaroni Lalli @ 2015-10-03  6:44 UTC (permalink / raw)
  To: Mikael Magnusson, Jacob Keller; +Cc: Git List

[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]

Thank you Jacob.

Actually we already use the keyword MINOR for that, exactly as you said.

The suggestion was made because I think it is a common behavior and it
would be nice to be a meta info to standardize this (today each team
adopt a different pattern for that - you used "TRIVIAL" e.g.). Nice
things could be done with this meta-info. It could be totally ignored
(current git operation) or it could be used to filter, to sort, to group
commits, to show the log pretty etc.

> The issue is that not everyone considers these changes as "minor".

I understand this issue, I know it is subjective. But if someone don't
want to make the distinction just don't use the argument --hide-minor
for example.




On 03/10/2015 03:17, Mikael Magnusson wrote:
> On Sat, Oct 3, 2015 at 8:11 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
>> On Fri, Oct 2, 2015 at 2:38 PM, Felipe Micaroni Lalli
>> <micaroni@walltime.info> wrote:
>>> A minor change (also called "cosmetic") usually is a typo fix, doc
>>> improvement, a little code refactoring that don't change the behavior etc.
>>>
>>> In Wikipedia we can mark an edition as "minor".
>>>
>>> It would be nice to have an argument like "--minor" in git-commit to
>>> mark the commit as minor. Also, filter in git-log (like --hide-minor) to
>>> hide the minor changes. The git-log could be optimized to show minor
>>> commits more discreetly.
>>>
>>>
>>
>> This should just be part of the commit message log, generally projects
>> use something like TRIVIAL in the patch subject or similar. You could
>> also standardize for your project(s) what would be considered a minor
>> change. The issue is that not everyone considers these changes as
>> "minor". You should be able to use a combination of the --grep option
>> in log to search for all commits who don't contain that string in the
>> right format.
> 
> Could also be a good use for notes, since you might want to add this
> markup after the fact.
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git feature request: mark a commit as minor
  2015-10-02 21:38 Git feature request: mark a commit as minor Felipe Micaroni Lalli
  2015-10-03  6:11 ` Jacob Keller
@ 2015-10-03 18:12 ` Fredrik Gustafsson
  2015-10-03 19:52   ` Felipe Micaroni Lalli
  1 sibling, 1 reply; 7+ messages in thread
From: Fredrik Gustafsson @ 2015-10-03 18:12 UTC (permalink / raw)
  To: Felipe Micaroni Lalli; +Cc: git

On Fri, Oct 02, 2015 at 06:38:46PM -0300, Felipe Micaroni Lalli wrote:
> A minor change (also called "cosmetic") usually is a typo fix, doc
> improvement, a little code refactoring that don't change the behavior etc.
> 
> In Wikipedia we can mark an edition as "minor".
> 
> It would be nice to have an argument like "--minor" in git-commit to
> mark the commit as minor. Also, filter in git-log (like --hide-minor) to
> hide the minor changes. The git-log could be optimized to show minor
> commits more discreetly.

I can see your problem and implement your suggest is a solution that
would work. However since this is a common problem, git already has a
solution, that is the interactive rebase.

You can read a discussion about when to use merge and rebase here:
http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html

This work method make the "minor" commits to go away. There shouldn't be
any minor, or "fixup" commits in your history (of course there's
exception).

Minor things should be caught in your code review process and then
fixed, rebased and the merged again.

Or do I miss a usecase here?

-- 
Fredrik Gustafsson

phone: +46 733-608274
e-mail: iveqy@iveqy.com
website: http://www.iveqy.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git feature request: mark a commit as minor
  2015-10-03 18:12 ` Fredrik Gustafsson
@ 2015-10-03 19:52   ` Felipe Micaroni Lalli
  0 siblings, 0 replies; 7+ messages in thread
From: Felipe Micaroni Lalli @ 2015-10-03 19:52 UTC (permalink / raw)
  To: Fredrik Gustafsson; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]

You are right. It could be useful to fix old commits (already pushed)
but it could encourage bad practices. Minor changes should be avoided,
it is an exception, not a rule.

Thank you Fredrik.


On 03/10/2015 15:12, Fredrik Gustafsson wrote:
> On Fri, Oct 02, 2015 at 06:38:46PM -0300, Felipe Micaroni Lalli wrote:
>> A minor change (also called "cosmetic") usually is a typo fix, doc
>> improvement, a little code refactoring that don't change the behavior etc.
>>
>> In Wikipedia we can mark an edition as "minor".
>>
>> It would be nice to have an argument like "--minor" in git-commit to
>> mark the commit as minor. Also, filter in git-log (like --hide-minor) to
>> hide the minor changes. The git-log could be optimized to show minor
>> commits more discreetly.
> 
> I can see your problem and implement your suggest is a solution that
> would work. However since this is a common problem, git already has a
> solution, that is the interactive rebase.
> 
> You can read a discussion about when to use merge and rebase here:
> http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html
> 
> This work method make the "minor" commits to go away. There shouldn't be
> any minor, or "fixup" commits in your history (of course there's
> exception).
> 
> Minor things should be caught in your code review process and then
> fixed, rebased and the merged again.
> 
> Or do I miss a usecase here?
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Git feature request: mark a commit as minor
  2015-10-03  6:44     ` Felipe Micaroni Lalli
@ 2015-10-04  6:01       ` Jacob Keller
  0 siblings, 0 replies; 7+ messages in thread
From: Jacob Keller @ 2015-10-04  6:01 UTC (permalink / raw)
  To: Felipe Micaroni Lalli; +Cc: Mikael Magnusson, Git List

On Fri, Oct 2, 2015 at 11:44 PM, Felipe Micaroni Lalli
<micaroni@walltime.info> wrote:
> Actually we already use the keyword MINOR for that, exactly as you said.
>
> The suggestion was made because I think it is a common behavior and it
> would be nice to be a meta info to standardize this (today each team
> adopt a different pattern for that - you used "TRIVIAL" e.g.). Nice
> things could be done with this meta-info. It could be totally ignored
> (current git operation) or it could be used to filter, to sort, to group
> commits, to show the log pretty etc.
>
>> The issue is that not everyone considers these changes as "minor".
>
> I understand this issue, I know it is subjective. But if someone don't
> want to make the distinction just don't use the argument --hide-minor
> for example.
>
>

I think use of git-notes is probably the best way. Not sure how/if you
can implement filtering on that, but I don't personally think
something like this belongs in core git.

Regards,
Jake

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-04  6:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 21:38 Git feature request: mark a commit as minor Felipe Micaroni Lalli
2015-10-03  6:11 ` Jacob Keller
2015-10-03  6:17   ` Mikael Magnusson
2015-10-03  6:44     ` Felipe Micaroni Lalli
2015-10-04  6:01       ` Jacob Keller
2015-10-03 18:12 ` Fredrik Gustafsson
2015-10-03 19:52   ` Felipe Micaroni Lalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).