示例#1
0
        private int ParseGitBinary(FileHeader fh, int c, int end)
        {
            var postImage = new BinaryHunk(fh, c);
            int nEnd      = postImage.parseHunk(c, end);

            if (nEnd < 0)
            {
                // Not a binary hunk.
                //
                error(fh.Buffer, c, "Missing forward-image in GIT binary patch");
                return(c);
            }
            c = nEnd;
            postImage.endOffset  = c;
            fh.ForwardBinaryHunk = postImage;

            var preImage = new BinaryHunk(fh, c);
            int oEnd     = preImage.parseHunk(c, end);

            if (oEnd >= 0)
            {
                c = oEnd;
                preImage.endOffset   = c;
                fh.ReverseBinaryHunk = preImage;
            }

            return(c);
        }
示例#2
0
        private int ParseGitBinary(FileHeader fh, int c, int end)
        {
            var postImage = new BinaryHunk(fh, c);
            int nEnd = postImage.parseHunk(c, end);
            if (nEnd < 0)
            {
                // Not a binary hunk.
                //
                error(fh.Buffer, c, "Missing forward-image in GIT binary patch");
                return c;
            }
            c = nEnd;
            postImage.endOffset = c;
            fh.ForwardBinaryHunk = postImage;

            var preImage = new BinaryHunk(fh, c);
            int oEnd = preImage.parseHunk(c, end);
            if (oEnd >= 0)
            {
                c = oEnd;
                preImage.endOffset = c;
                fh.ReverseBinaryHunk = preImage;
            }

            return c;
        }