Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

docs: edit and reorganize Git Commit Guidelines #3093

Merged
merged 1 commit into from Apr 6, 2016
Merged

docs: edit and reorganize Git Commit Guidelines #3093

merged 1 commit into from Apr 6, 2016

Conversation

ghost
Copy link

@ghost ghost commented Apr 2, 2016

Reorganize the Git Commit Guidelines title hierarchy.
Various content edits in the Git Commit Guidelines section:

  • Remove the footer section and merge its contents with the body
  • Add revert to the list of possible header types
  • Change the maximum line length for header and body
  • Add instructions about the body's elements order

Addresses #3089

### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Header
The header must be a short (50 characters or less) summary.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

Should be up to 72 chars.

request conform to commit message format, but since it can't be configured to
have an optional `(<scope>)`, it will claim that messages without it are wrong,
while they're perfectly fine.
**Header** and **body** are mandatory . The **scope** of the header is optional.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the body actually mandatory?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

@zetok
Copy link
Contributor

zetok commented Apr 6, 2016

Well, aside from that last small thing PR looks ~ready.

I wonder about formatting of .md files though – i.e. I think that it's preferable to have line breaks at least < 100 chars for .md, with <80 chars being preferable. With no to little line breaks working with diffs of markdown files at some point becomes really bothersome.

@ghost
Copy link
Author

ghost commented Apr 6, 2016

~ready

When a nice commit featuring all fields is pushed, it could be linked as example.

have line breaks at least < 100 chars for .md, with <80 chars being preferable

Yes, fewer columns are better. I ignored it for now because there's no standard in the repo. I can edit all .mds to 80 chars in a different PR.

@ghost ghost closed this Apr 6, 2016
@ghost ghost deleted the patch-1 branch April 6, 2016 10:37
@ghost ghost restored the patch-1 branch April 6, 2016 10:38
@ghost ghost reopened this Apr 6, 2016
reference GitHub issues that this commit **Closes**.
The body contains (in order of appearance) a detailed **description** of the committed changes, references GitHub issues that the commit **closes** and any **breaking changes**. The **description** is mandatory, **closes** and **breaking changes** are optional.

GitHub issues that the commit **closes** should start with the word `Closes` or `Fixes`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, not really, gh doesn't care – it would work either way. What doesn't work with closes or fixes is clog tool.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this is not clear enough? Is right below the paragraph describing the parts of the commit message body, thus it should follow that it refers to the commit message and not the GH issue message. Lines addressing could be appended if you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this is not clear enough?

I think that it's wrong to claim that GH requires capital letters, since this is not the case.

Also, now that I look at it, whole sentence is kinda ambiguous, and confusing even when considering the sentence before.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ambiguous, and confusing

Must be, because "claim that GH requires capital letters" is not what I meant.

Reorganize the Git Commit Guidelines title hierarchy.
Various content edits in the Git Commit Guidelines section:
- Remove the footer section and merge its contents with the body
- Add revert to the list of possible header types
- Change the maximum line length for header and body
- Add instructions about the body's elements order
@ghost
Copy link
Author

ghost commented Apr 6, 2016

Another thing: Scope could have a better description/examples. From this file alone I wouldn't know what a good scope is supposed to be.

The subject contains succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end

A properly formed git commit subject line should always be able to complete the following sentence:

> If applied, this commit will ___your subject line here___
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it supposed to look like that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I copied the text from here and adapted the format. In that context, a quote looks ad hoc for me. Like quoting the committer's brain.

@zetok zetok self-assigned this Apr 6, 2016
@zetok zetok merged commit f5c0991 into qTox:master Apr 6, 2016
zetok added a commit that referenced this pull request Apr 6, 2016
kehugter (1):
      docs: edit and reorganize Git Commit Guidelines
@ghost ghost deleted the patch-1 branch April 8, 2016 07:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant