Closed (fixed)
Project:
Documentation
Component:
Correction/Clarification
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Feb 2011 at 23:59 UTC
Updated:
3 Jan 2014 at 02:58 UTC
Jump to comment: Most recent
Comments
Comment #1
rfayThis affects:
* Git documentation
* Normal how-to documentation
* Most of all: Everybody's brain that is trained to do it the old way. We'll have to point this out to the world.
Comment #2
webchickI think this is ok. There's a sound technical reason for making the switch. It's *definitely* going to take some community re-training to get them to break this habit. I think a mention of this on the Git instructions page is a very good idea, linking off to further details in the handbook.
Comment #3
Josh The Geek commentedI use git commit -m '#1234 by abc: def', which works.
Dries uses '- Patch ...', which is unaffected.
Thank you rfay for noticing this!
Comment #4
Josh The Geek commentedComment #5
marvil07 commentedBasically we need to remove the second sentence on this paragraph
from the current official documentation at Commit messages - providing history and credit, since the full template now is
[issue category] #[issue number] by [comma-separated usernames]: [Short summary of the change].which will work, but yeah communicate it would be the hard task
Comment #6
webchickRandy Fay made a nice screencast at http://screencast-o-matic.com/watch/cXnIh1IFx which outlines why this is so bad.
Comment #7
webchickWell, given "[issue category] #[issue number] by [comma-separated usernames]: [Short summary of the change]." has been documented since November 2009 as a best practice (and implicitly "approved" by at least 4-5 people who've edited that page since), that definitely seems the way to go.
Comment #8
sunUgh. I silently (or not so silently?) "accepted" that alternative syntax, but made sure to explain to people why the first/current without prefix is much better: It implicitly makes sure that your commit message is a proper sentence and makes sense for humans.
That is, because the alternative syntax suggests to have a "bug|feature|task" prefix at the start of the line, but no "Fixed|Added|Changed" at the beginning of the actual sentence/message. Therefore, people most often feel "ok" with just taking over the issue title as is, not even thinking a millisecond about a proper, human-readable and understandable commit message (and changelog entry, since that's identical when following best practices).
Is there a reason why this happens? It feels odd and scary that git is destroying data. If this is not a configuration option, then what else do we have to prevent?
Comment #9
webchickThe reason it happens is Git's comment syntax is "lines that start with #". Because the commit messages start with #, it therefore thinks they're comments, and removes them from the overall squashed commit message. See #6.
I'm not aware of any config options around this, else I'm sure we wouldn't be having this discussion. :) I tried googling, but it's astoundingly hard to find keywords that result in anything remotely useful for this, since you of course can't google for "#" and "hash" is something else entirely in Git.
Comment #10
dwwDoes this break historical commit messages, or just new ones via git commit?
Comment #11
damien tournoud commentedOnly the new commits should be affected by this. Starting a line with a pound is only a nuisance in interactive commit message edit, which should only happen for new commits / rebasing anyway.
Comment #12
Josh The Geek commentedgti ci -m is not affected by this.
Comment #13
webchickThis is done. We changed it to "Issue #xxx by..." for simplicity. Documented in the Git handbook.
Comment #14
sunWTF? Why was the entire page duplicated? (existing) http://drupal.org/node/52287 vs. (git) http://drupal.org/node/1061754
Lots of links throughout d.o are pointing to the existing one, so we better merge the required changes into the original page.
Comment #15
webchickBecause the docs are still in flux; we've been focused on getting the migration actuallt done. But if you or anyone else wants to take care of merging them and moving 52287 to the right place, that'd be lovely.
Comment #16
webchickBtw, there's an entire collection of docs issues that still need to be fixed now that we're post-migration: http://drupal.org/project/issues/search/documentation?text=&assigned=&su...
Comment #17
claar commentedI ran across this today since #363367: Co-maintaining projects links to [#52287] -- should we temporarily redirect 52287 to [#1061754]?
Comment #18
Josh The Geek commented52887 = 403 access denied. so, fixed.
Comment #19
sunerr, what? The existing pages need to be updated, not unpublished. These URLs are linked to from everywhere.
The new duplicate pages need to be unpublished instead.
Comment #20
dwwI agree it's unfortunate to be just unpublishing the old pages. At least we should be adding redirects whenever conceivably possible. Usually it's pretty obvious which new page to be using. That said, I'm fine leaving the old CVS-specific nids as the history of revisions for the CVS way, and just start clean with the new nodes and new nids for the Git way. We just have to ensure all the old links and aliases still work.
In terms of the content of the new pages, sorry I didn't suggest this sooner, but I just came up with it today while I was happily doing Git commits on a plane. ;)
Instead of:
Issue #1234 by xxxHow about this?
#1234: "Mark all as read" in forums. by xxxWe're already used to referring to issues like that (or we should be), and it's less duplication when scanning logs, and less wasted horizontal space for the all-important summary line.
I don't think it's necessarily too late to change this. We're still in a transition period trying out all sorts of approaches to all sorts of things, so the "best practices" are still being discovered. I'll probably just adopt this practice for myself, (along with trying to properly credit authorship for people who contribute patches, even if it does take a tiny bit of extra work on my part and it's not the documented recommendation). But this one seems like something we could all just get behind, and is even less work than the currently documented suggestion.
Thoughts? ;)
Thanks,
-Derek
Comment #21
danmuzyka commentedI'm working on cleaning up the organization of the Git handbook, as described in the issue Proposed reorganization of Git handbook. Having found this issue thread, however, I'm wondering if it makes sense to merge portions of the Git handbook with the larger Contributing Code handbook, so that the new Git documentation isn't buried so deep in the book hierarchy. Perhaps this approach was the plan all along and I just became aware of it.
Once I've had a chance to review more of the Contributing Code handbook I'll work on a proposed outline, which I will post on the Proposed reorganization issue thread.
Thoughts?
Comment #22
Josh The Geek commentedOn both pages, I updated the info about grn. on http://drupal.org/node/52287 , I commented with a link to the new page.
Comment #23
claar commented+1 for dww's suggested #1234: "Mark all as read" in forums. by xxx format in #20.
Comment #24
rfayJust one note about #20 (using
[#xxxx]: I've been using that for some time on my contributed modules, and it's ugly when it gets expanded.For example, see http://drupal.org/node/908514, where you end up with something like this, and the redundant information is reduntantized too much:
It all depends on what filters are in play...
Comment #25
Josh The Geek commentedTotal -1 to #20
If you use the release note scripts, you get a link to the issue page, and then you can word the message better than the issue title. I agree with rfay.
Comment #26
dww@rfay: That's just release notes. It'd be an easy patch to http://drupal.org/project/grn to strip out the [ and ] when giving you the default release notes to paste in.
Comment #27
dwwp.s. Release notes were never intended to be a blind dump of commits. I originally wrote cvs_release_notes as a *helper* function to get you started. If all you want is a river of commit messages, look in version control. Release notes are meant to be curated lists of things humans actually care about when deciding if they want to install a new release. The practice of just running these scripts, dumping the output into the release node and pressing go is (IMHO) contributing to the culture where very few end users seem to ever bother reading release notes, since they're often full of incomprehensible developer noise. ;)
Comment #28
rfayMy point is that '#xxxx' and '[#xxxx]' have a variety of meanings depending on what filters are enabled. And since most of the world doesn't know what filters are enabled, it can lead to confusion.
Wow, grn++!
Comment #29
danmuzyka commentedMoving this issue to the Documentation issue queue so that all Git documentation issues are in one location.
Comment #30
eliza411 commentedI think the documentation issue here is closed. http://drupal.org/node/52287 is the authoritative page now and as far as I can tell, the major concern, NOT beginning commit messages with a #, has also been addressed.
If the format of these messages, which affects the community practices at large, is still in question by someone here, can they launch a discussion on G.D.O. where it will receive wider attention? A new issue in the queue can be opened if/when there's consensus for change.
Comment #31
eliza411 commentedFor clarity, I meant the Git team group at http://groups.drupal.org/drupal-org-git-team
Comment #32
dwwOkay, posted: http://groups.drupal.org/node/140309