October 3, 2014

Git and Perforce Workflow Improvements in Latest Git Fusion Release

Healthcare
Git at Scale

git fusion icon

The latest release of Git Fusion 2014.2 has new branch handling and repo configuration options for improved workflow and greater flexibility that are sure to make both Git- and Perforce-using developers and admins more productive. Here’s what’s included:

Import Perforce streams as Git submodules for component-based development. In Git Fusion 2014.2, you can choose to automatically convert stream import paths into Git submodules. If you have streams that import components or libraries, it’s now possible to change the import definition in a stream specification without invalidating the corresponding Git repository.

Automatic population of new branches pushed from Git. Up to now, new branches pushed from Git were automatically mapped to sparse (lightweight) branches in the Perforce Server. These sparse branches could not easily be shared between Git and Perforce users, limiting the ability to work in hybrid mode.

In 2014.2, we’ve added two branching strategies: “Explicit” enables users to push full branches into the Perforce Server while “all” maps every branch pushed from Git as a full branch. This means Git users can push a Git branch and have that appear as a new branch within the normal Perforce depot hierarchy, visible and usable by their Perforce-using coworkers. For example:

git push origin mytask:depot-branch/newfeature automatically defines a new Git Fusion branch and populates //depot/myrepo/newfeature/... with the pushed commits.

Not all sites desire a deluge of depot branches, so this feature is off by default. Administrators may control who can create them and where.

Lightweight branch tracking. If you opt to stay with lightweight branches, Git Fusion’s handling under the covers has been improved so changes made in Git are more transparent to Perforce users. New “Git Fusion branch management” changelists hold all internal Git Fusion actions so that Git Fusion’s regular Perforce changelists hold only those changes necessary to mirror their corresponding Git action. This makes it easier for humans (and Swarm) to follow a change introduced through Git Fusion in the Perforce server. No more baffling “Why are there several p4 branch actions in this changelist when the Git commit edited only one file?”

Improved triggers, including multiple pre-flight checks. We continue to improve Git Fusion’s submit trigger, making it easier to install and configure. Git Fusion’s preflight-commit hook now accepts multiple lines, allowing multiple tests to reject problematic commits before they get to your Perforce Server.

More flexible matching of Git email addresses to Perforce users. It’s easier to match Git authors to Perforce accounts automatically without a p4gf_usermap file. Git Fusion 2014.2 includes a new configuration option to match the “user” portion of user@company.com with Perforce account “user”, regardless of the rest of the email address. Another option matches on the “full name” (e.g., allowing “Tom.Jones <tjones&company.com>" to match Perforce account “Tom.Jones”).&company.com>

Installation Options

Git Fusion 2014.2 adds more flexibility on how you can map streams and branches between the Perforce Server and Git. The management improvements alone make it worthwhile to upgrade. By the way, Git Fusion (and many other packages) can easily be installed on Linux Debian distributions like Ubuntu. Check out the release notes and download Git Fusion 2014.2.

Happy hacking!