コード例 #1
0
            public Entry(byte[] raw, int pos)
            {
                oldId = ObjectId.FromString(raw, pos);
                pos  += Constants.OBJECT_ID_LENGTH * 2;
                if (raw[pos++] != ' ')
                {
                    throw new ArgumentException("Raw log message does not parse as log entry");
                }
                newId = ObjectId.FromString(raw, pos);
                pos  += Constants.OBJECT_ID_LENGTH * 2;
                if (raw[pos++] != ' ')
                {
                    throw new ArgumentException("Raw log message does not parse as log entry");
                }
                who = RawParseUtils.parsePersonIdentOnly(raw, pos);
                int p0 = RawParseUtils.next(raw, pos, (byte)'\t');

                if (p0 == -1)
                {
                    throw new ArgumentException("Raw log message does not parse as log entry");
                }

                int p1 = RawParseUtils.nextLF(raw, p0);

                if (p1 == -1)
                {
                    throw new ArgumentException("Raw log message does not parse as log entry");
                }

                comment = RawParseUtils.decode(raw, p0, p1 - 1);
            }