Files
git-tfs/doc/release-notes
Craig E. Shea 334a040e98 Improve branch point changeset detection
@jeremy-sylvis-tmg is the original author of this commit. He originally
issued Pull Request #973. However, a code review was performed by myself
and @pmiossec whereby changes were requested. Unfortunately, the author of
the pull request declined to make the requested changes due to time
constraints.

Because the changes implemented in this commit could potentially solve a
long outstanding problem in how git-tfs currently detects branch point
changeset detection, I have recreated this commit with the requested
changes.

Basically, this commit allows gits-tfs to properly clone a TFS branch into
a git repository when the branch was first created as a folder, deleted,
and subsequently created as an actual TFS branch:

   *--C1--C2--C3--C4(X)--*--*--*
	            \
		     C5(?)--*--*

In the diagram above, a folder would be created at C3 called 'Branch'. At
C4, it was determined that either C3 was a mistake, or simply that a true
TFS branch was desired as opposed to a TFS folder. So at C4, the folder
named 'Branch' is deleted. At C5, an actual TFS branch called 'Branch' is
created, and C5 is the first changeset on TFS branch 'Branch'.

Prior to this commit, Git-Tfs would get "confused" because branches and
folder in TFS are similar, but not the same--and there's no analogue in
Git whatsoever. The branch 'Branch' usually fails to clone properly, and
IIRC, you'll get messages such as "Could not find parent changeset for
branch 'Branch'". In my experience, providing a parent changeset ID does
not always resolve the situation satisfactorily.

The changes in this commit detect this situation. At C3, it detects that a
folder was created, called 'Branch'. TFS folders are not branches, and so
this commit causes git-tfs to keep searching through TFS history for the
most recent branch point. So, when the folder named 'Branch' is deleted at
C4, git-tfs will continue to search for merge history, which it finds at
C5, where the TFS branch named 'Branch' is created. This is a true branch
point off of the main line. Because C3 and C4 effectively "cancel" each
other out, the resulting Git history after cloning this TFS repository
history looks like the following (NOTE: this author is unsure how git-tfs
represents commits C3 and C4 in the commit history of a Git repository
since Git has no concept of "folders"):

    *--C1--C2--C3--C4(X)--*--*
            \
	     C5--*--*

NOTE: This commit does add some methods to an interface. As such, the next
version of Git-TFS should have it's minor version incremented; e.g. the
next version of Git-Tfs released containing this commit should be in the
0.26.x series.

Signed-off-by: Craig E. Shea <craig.e.shea@gmail.com>
2016-11-12 20:46:14 -05:00
..
2014-06-16 10:40:18 -04:00
2015-03-02 17:42:52 -05:00
2015-05-04 13:28:58 -04:00
2015-06-01 18:49:30 -04:00
2015-08-05 17:54:46 +02:00
2015-09-21 15:18:14 -04:00
2015-12-07 09:54:45 -05:00
2015-12-11 21:55:17 -05:00
2016-01-04 10:53:43 -05:00
2016-03-05 08:09:12 -05:00