-
Notifications
You must be signed in to change notification settings - Fork 94
Internals
This page goal is to describe the internals of git-cc in order to manage the degraded cases (anything going wrong during rebase or checkin). This is my understanding of the behaviors and should not be taken as truth but more as a guideline to go further.
The hypothesis is that master is the synchronized branch.
Configuration is stored in .git/gitcc file. It is an ini file containing one section by branch to be synchronized with clearcase.
This file contains the clearcase elements matching the last synchronisation clearcase -> git it contains one line per clearcase element (file/directory), with the full clearcase path of the element (@@/main/... notation)
For each synchronized branch, gitcc creates a branch_cc branch and a branch_ci tag.
This is used as a mirror of clearcase. It contains commits for each clearcase checkin/checkin group. When rebasing, the date of the more recent commit is used as starting point to get clearcase history in git. This branch do not contains local changes.
This branch is update by following commands :
- rebase
- reset
This tag mark the common commit between clearcase and git. It is updated when doing a checkin to mark the last commit ckecked-in in clearcase
This tag is updated by the following commands :
- tag
- reset
- checkin
- rebase
Initialize a new link between clearcase and git. Git repo shall be empty.
Next command can be :
- rebase : Get full history
- sync : Get clearcase files in a single commit
This function rebase current work on changes which append in clearcase
- Get the more recent changes in clearcase in master_cc branch
- Rebase local branch on master_cc
- move master_ci on last rebased commit
This function push the more recent changes to clearcase (between master_ci and master). A rebase (or tag) is necessary beforehand.
Copy file from clearcase view, without creating a commit. Files will be left changed in current branch.
Reset hard master_cc branch to the specific commit
Move the master_ci tag to the specified commit
Same as sync, be create a commit with the changed files
Return the current version