This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Moving to git

On Thu, 2015-08-20 at 13:57 -0400, Jason Merrill wrote:
> I hear that at Cauldron people were generally supportive of switching 
> over to git as the primary GCC repository, and talked about me being 
> involved in that transition.  Does anyone have more information about 
> this discussion?
> Our current workflow translates over to a git master pretty easily: 
> basically, in the current git-svn workflow, replace git svn rebase and 
> git svn dcommit with git pull --rebase and git push.
> It should be pretty straightforward to use the existing git mirror as 
> the master repository; the main adjustment I'd want to make is rewriting 
> the various subdirectory branches to be properly represented in git. 
> This is straightforward, but we'll want to stop SVN commits to 
> subdirectory branches shortly before the changeover.
> It would be good to have a more explicit policy on branch/tag creation, 
> rebasing, and deletion in the git world where branches are lighter 
> weight and so more transient.

If we're going to migrate to git (I hope so), can we also please
*slightly* revise the policy on commit messages, to add meaningful
titles to commits?

Currently: says:

"The log message for that checkin should be the complete ChangeLog entry
for the change."

and the subsection "Commit the changes to the central repository" below
has an example showing this.

In the git world, the first line of the commit message has special
meaning, being treated as the "title" of the commit.
Quoting the git docs [1]:
  "Though not required, itâs a good idea to begin the commit message
with a single short (less than 50 character) line summarizing the
change, followed by a blank line and then a more thorough description.
The text up to the first blank line in a commit message is treated as
the commit title, and that title is used throughout Git. For example,
git-format-patch[1] turns a commit into email, and it uses the title on
the Subject line and the rest of the commit in the body."

For gcc, I suggest that the first line of the commit message should be a
representative title, typically the "Subject" line of the relevant
gcc-patches thread (without any "[PATCH]" prefix), and this should be
followed by the ChangeLog entry as before as the "more thorough
description" that the git docs speak of.

Looking at the commit history, many contributors appear to be already
applying this policy when committing to svn (I'm one of them); it makes
the history much easier to read from git (otherwise the title is
typically something like "gcc/" or just a datestamp and email, which
isn't as helpful).  Try running "git shortlog" on a git mirror of the
current repo to see what I mean.

For example:
which when viewed from git has the title:
"[ARM] Hide existing float16 intrinsics unless we have a scalar __fp16

I'm merely proposing doing this going forward, *not* to attempt any kind
of retroactive history-editing (ugh).

I can write it up for the website if people agree it's a good policy.

Hope this is constructive.

[1] (see "DISCUSSION")

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]