Project GAR/Git

NOTE: This functionality is completed and has been merged to the master gar/v2 branch.

General

In the past, we had `gmake makepatch` which would generate a patch file based on differences between the extracted source, including local changes, and the upstream pristine source. This was broken at some point, but was never as functional as it could have been…and it was heavy weight too.

Lets re-implement this functionality but use git for the source maintenance and patch generation.

Ultimately, the maintainer shouldn't be aware of this switch, other than maybe noticing the output from some of the targets has changed. The intention is not to make people use or become proficient with git, it's simply to give us some back-end flexibility and restore integrated makepatch to GAR.

That being said, maintainers that want to leverage git should gain some nice benefits as they can do their own local checkouts, use branching and all of the other power tools that would be become available. This can all be done now, but GAR integration would make it cleaner.

The Idea

  1. Snapshot the pristine source immediately after extraction of the upstream source.
  2. Snapshot the source immediately after the existing patches are applied.
  3. Generate a patch file based on the differences between the pristine+patches snapshot taken in 1 and the current source tree.

The Extract Target

The extract target should be extended to initialize a repository containing the working tree at the end of the extract step. This should be done on the master branch. The single commit should have the tag 'upstream' applied. A new branch named CSW should then be checked out from this commit.

The Patch Target

The patch target should make a single commit after all existing patches are applied. If no patches exist, no commit should be made.

The Makepatch Target

A commit should be created containing all differences between the current work tree and the commit representing the top of the current patch stack. The maintainer should supply the commit message interactively. When this has been entered, the git format-patch command should be used to generate a new patch which will be placed into trunk/files.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License