git-add-ChangeLogs script would be useful
I'm finding myself doing the same operation over and over again as I go through the patches on bug 16036 for landing. I'm going through a rebase -i trunk and "edit"-ing each of my changes to have a ChangeLog with reviewer. It would be really nice if there was a way to do this programatically, by passing a command some text file all at once. For example. If I could run:
and it would open up my $EDITOR with a modified version of the -i "pick" file, where I could also specify reviewers and whether I wanted to stop and edit the ChangeLog, that would be great!
Then it could just go through and do all the changelog additions for me, stopping only when needed.
Curious what other git users think.
I have a script, git-add-reviewer, which replaces the "NOBODY (OOPS!)" in the ChangeLogs/commit log for a particular commit with a name you specify on the command line. I've been wanting to make it work better for series of commits (right now you have to run the script in a loop). Maybe this would be enough for you?
Hum.. interesting. I haven't been adding the ChangeLogs until right before final commits, but I guess I could. It would stop Sam from complaining about my patches not having change logs. ;) In that case, your script would probably work great.
Well, so one aspect of my current system is that I just commit willie-nillie knowing that I'll fix up teh commits for final (including possibly squashing) at the end. I also use git-style one-liner commit logs, which I would want whatever script to replace for me in preparing the final commits.
I almost always write ChangeLog entries, but then you must resolve the inevitable ChangeLog conflicts using the resolve-ChangeLogs script.
Maybe we should make a git-commit-log-editor script that prepopulates the commit log with the ChangeLog template(s). Then you can fill in your "ChangeLog" entry as you commit each change (or you can do it when you squash commits together), and you'll avoid running into ChangeLog conflicts. Then we can have some other script, like git-add-ChangeLogs, that works on a range of commits and turns the commit logs into ChangeLog entries. You would run git-add-ChangeLogs just before running git svn dcommit.
Eric and Dave, what do you think?
This git-commit-log-editor script would also allow us to get rid of ChangeLogs entirely, eventually.
(In reply to comment #5)
> Eric and Dave, what do you think?
Sounds nice! Does no one else set the GIT_EDITOR environment variable to WebKitTools/Scripts/commit-log-editor?
(In reply to comment #6)
> This git-commit-log-editor script would also allow us to get rid of ChangeLogs
> entirely, eventually.
Blasphemy! ;) We'd have to switch to git from svn before that would be possible. (More blasphemy!)
On a related note, I don't like that git doesn't do a good job of following file history through copies and renames. Am I missing a command-line option for git-log?
(In reply to comment #7)
> (In reply to comment #5)
> > Eric and Dave, what do you think?
> Sounds nice! Does no one else set the GIT_EDITOR environment variable to
I set the core.editor config variable to commit-log-editor.
> (In reply to comment #6)
> > This git-commit-log-editor script would also allow us to get rid of ChangeLogs
> > entirely, eventually.
> Blasphemy! ;) We'd have to switch to git from svn before that would be
> possible. (More blasphemy!)
Yeah, I'm not suggesting we get rid of ChangeLogs while still using Subversion.
> On a related note, I don't like that git doesn't do a good job of following
> file history through copies and renames. Am I missing a command-line option
> for git-log?
git log --follow
Is something like this still desired?
This is redundant with `git-add-reviewer -i`, as far as I can tell.
(In reply to comment #10)
> This is redundant with `git-add-reviewer -i`, as far as I can tell.
Especially since you can't get a review without a Changelog.