Changes between Version 43 and Version 44 of UsingGitWithWebKit

May 13, 2010 10:55:38 AM (12 years ago)



  • UsingGitWithWebKit

    v43 v44  
    74 == Commit through git-svn ==
    76 If you have been granted commit access to WebKit's SVN repository it is possible to work entirely with git and to commit through `git-svn`.
     74== webkit-patch, check-webkit-style and git ==
     76webkit-patch commands all work with git. There's a couple extra flags that help dealing with git branches and local commits, namely --squash, --no-squash and --git-commit.
     78There are two camps on using git with webkit-patch. branch-per-bug and commit-per-bug. In the former, there is one patch per bug and all local commits are essentially one patch. In the latter, there's 1+ local commits per bug and possibly multiple bugs addressed on a single branch. The branch-per-bug use case is met entirely by always using --squash. The commit-per-bug use case is met by a combination of --git-commit and --no-squash, both of which have non-trivial and overlapping FIXMEs.
     80If you get sick of typing --squash or --no-squash, you can set the webkit-patch.squash git config parameter to true/false.
     82--squash: Treat all changes in the local branch as a single patch (local commits + working copy changes). Doesn't actually modify your tree until you land, at which point it squashes all local changes into a single local commit and then lands that.
     83 * FIXME: --squash commits too much if you branch is not fully merged/rebased to trunk
     85--git-commit: operate on the given git commit(s). Commits can be specified as single commits (e.g. HEAD^) or multiple (e.g. HEAD~2..HEAD).
     86 * FIXME: landing doesn't work if it needs to modify the ChangeLog
     87 * FIXME: When passing a commit range, all the commits get squashed into one. --git-commit should respect --squash and --no-squash instead.
     88 * FIXME: Until the above is fixed, specifying both should throw an error
     90--no-squash: Operate only on working-copy changes, with the exception of webkit-patch land.
     91  land: If there are *only* working copy changes, commit them locally and then git svn dcommit. Otherwise, if there are local commits, then just git svn dcommit.
     92 * FIXME: --no-squash is unfinished. It needs a lot of work. It's not 100% clear what the right behavior is. Ideally someone from the commit-per-bug camp could iterate on this and make it work for that use-case. One world that would make things consistent and reliable: a) Always operate on both working copy changes and local commits. b) Always treat each local commit separately, not just for land, e.g., webkit-patch upload will upload each local commit and working-copy changes separately. FWIW, fixing --no-squash to operate on local commits is 99% of the work to making --git-commit ranges respect --no-squash.
     93 * FIXME: This also suffers from in the same way --git-commit does.
     95If you leave out --squash and --no-squash and there's only a single local commit or only working copy changes in a branch, then the commands will work on that single patch. Otherwise they raise an error saying to use --squash or --no-squash.
     96 * FIXME: Make one of --squash or --no-squash the default. The current default is inconsistent and confusing.
     98== Commit manually through git-svn directly ==
     100If you have been granted commit access to WebKit's SVN repository it is possible to work entirely with git and to commit through `git-svn`, however using webkit-patch land is encouraged since it deals with changelogs, commit logs and bugzilla for you.
    78102After you have configured your working copy to track the Subversion repository you can: