WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
29127
commit-log-editor: Abort commit on unchanged commit messages
https://bugs.webkit.org/show_bug.cgi?id=29127
Summary
commit-log-editor: Abort commit on unchanged commit messages
Jakob Petsovits
Reported
2009-09-10 09:43:22 PDT
Normally, when I submit an empty commit message to my VCS, it would abort (or at least ask me to abort) the commit. When commit-log-editor runs, it prefills the message, thus it's not empty anymore, thus the commit doesn't abort if I choose to back off and leave it as is. That's kinda annoying. The patch below makes commit-log-editor keep a backup of the original file (that is passed to $EDITOR) and after $EDITOR exits, compares the user's one with the original one so that it can abort when nothing changed. Improves commit workflows considerably! Please review, thanks!
Attachments
commit-log-editor: Abort commit on unchanged commit messages
(1.63 KB, patch)
2009-09-10 09:49 PDT
,
Jakob Petsovits
jpetsovits
: review-
Details
Formatted Diff
Diff
Abort commits when a "no description or bug URL" OOPS is given.
(1.66 KB, patch)
2009-09-10 11:14 PDT
,
Jakob Petsovits
levin
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jakob Petsovits
Comment 1
2009-09-10 09:49:30 PDT
Created
attachment 39354
[details]
commit-log-editor: Abort commit on unchanged commit messages
Jakob Petsovits
Comment 2
2009-09-10 09:55:27 PDT
Comment on
attachment 39354
[details]
commit-log-editor: Abort commit on unchanged commit messages Whoops, forgot the ChangeLog. Let me reroll.
Jakob Petsovits
Comment 3
2009-09-10 11:14:42 PDT
Created
attachment 39358
[details]
Abort commits when a "no description or bug URL" OOPS is given. Alright, here's a better one that actually works with messages being copied from the ChangeLogs (as is normally the case). Only aborts on description/URL OOPSes. Still does the job to abort for empty commit messages, both when it's pre-filled-in from the ChangeLogs and when it's generated from the Git index.
Darin Adler
Comment 4
2009-09-10 11:21:01 PDT
Comment on
attachment 39358
[details]
Abort commits when a "no description or bug URL" OOPS is given. This seems too specific. We should abort if any OOPS is present.
Jakob Petsovits
Comment 5
2009-09-10 11:38:54 PDT
Well, we shouldn't abort if the reviewer OOPS is present, as that would break Git workflows. I also think it would be worthwhile to (preliminarily) commit local Git patches that come without tests, they can still be squashed into the commit later on. All I'm looking for is really a way to abort the commit process when I already invoked git commit, and the description OOPS seems the best indicator that the committer does not want to commit in the first place. I would defer the other OOPSes to the committer's best judgement; for WebKit SVN, patches with an OOPS wouldn't be r+'d in the first place.
Timothy Hatcher
Comment 6
2009-09-12 21:08:32 PDT
You can already about a commit in Git or SVN by clearing the commit log and saving. The commands wont commit an emily log and will abort. I agree we shouldn't prevent committing with OOPS in the commit, since that prevents using Git to commit locally. It also seems silly to prevent svn commits with OOPS on the client side, since we already have a check on the server side.
Timothy Hatcher
Comment 7
2009-09-12 21:09:57 PDT
I meant: You can already *abort* a commit… the commands wont commit an *empty* log and will abort.
Jakob Petsovits
Comment 8
2009-09-12 22:06:46 PDT
It's true that I can abort the commit by manually clearing the lines, I noticed that when skimming through the code. However, what I was asking for is aborting on an *unchanged* commit message, that is, exiting the editor without any modifications being made. The approach that the patch takes seems to me like a good compromise between achieving that goal and not diaturbing existing workflows or possibilities. Note that checking the commit message for OOPSes is just an implementation detail, but not the original intent of this patch.
Timothy Hatcher
Comment 9
2009-09-12 22:22:52 PDT
I don't think that is a good change to make. What if you have a review already (in person) and you put the reviewer in the ChangeLog before commiting even once (assuming git), so there is never a need to edit the commit log.
Jakob Petsovits
Comment 10
2009-09-12 22:43:21 PDT
The current (second) patch doesn't deal with review OOPSes so there's no difference inn behaviour to the current state of commit-log-editor. But fair enough; it might not be all too common to commit stuff locally without changing the actual CommitLog file and only adding it before the actual submission to upstream (which is the use case that motivated my patch in the first place). I understand if that is not enough reason to warrant the patch being submitted upstream. (Still hoping for a change of mind, though!)
Adam Roben (:aroben)
Comment 11
2009-09-16 08:43:09 PDT
I agree with Tim in
comment 9
. As to what Jakob said in
comment 1
:
> When commit-log-editor runs, it prefills the message, thus it's not empty > anymore, thus the commit doesn't abort if I choose to back off and leave it as > is. That's kinda annoying.
The same situation occurs after a merge commit, or a conflicted cherry-pick. (I'm assuming you're talking about git.) So I don't think this problem is specific to commit-log-editor. The solution for commit-log-editor is the same as for those other situations: just delete the prefilled commit message.
David Levin
Comment 12
2009-10-28 21:51:09 PDT
Comment on
attachment 39358
[details]
Abort commits when a "no description or bug URL" OOPS is given. It looks like at least two reviewers find this change objectionable and afaik no other reviewers find this problem bad enough to counter that.Also, it looks like there are no reviewers who find this issue to be so much of a problem to argue with them about it. I suppose if you want to pursue this further, you could attempt to gather support on webkit-dev for this change. Given that there doesn't seem to be a way forward for this right now, I'm r- to move this out of the review queue.
Jakob Petsovits
Comment 13
2010-03-02 08:03:13 PST
I think this is not going anywhere, so let's rest this case and stick with what we've got. Resolved wontfix.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug