This is the mail archive of the
mailing list for the GCC project.
Re: Moving to git
- From: Jason Merrill <jason at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: "gcc at gnu dot org" <gcc at gnu dot org>
- Date: Thu, 20 Aug 2015 16:10:41 -0400
- Subject: Re: Moving to git
- Authentication-results: sourceware.org; auth=none
- References: <55D61512 dot 8010002 at redhat dot com> <1440099112 dot 18943 dot 38 dot camel at surprise>
On 08/20/2015 03:31 PM, David Malcolm wrote:
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
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?
"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 :
"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 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.
Sounds good to me.
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.
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.
 http://git-scm.com/docs/git-commit (see "DISCUSSION")