--- Junio C Hamano <junkio@xxxxxxx> wrote: > > ---cut--- > > The porcelain format is as follows: > > > > <SHA-1> <orig line> <line> [<num lines> > > This is misleading. <num lines> is always shown for the group > head, even if there was another group earlier from the same > commit (otherwise the Porcelain has to buffer the chunk, which Completely understood and always agreed upon. > you did not like). Second and subsequent lines in the same > group do not have <num lines>. Completely understood and always agreed upon. > > > author <name> > > author-mail <email format> > >... > > committer-tz <TZ> > > filename <string> > > summary <string>] > > <TAB><line data> > > > > Where > > <SHA-1> is the SHA-1 of the commit which introduces this line. > > <orig line> it the line number where this line is introduced. > > <line> is the line number of the final file (at SHA-1 commit) > > > > Then, if <SHA-1> is different from the previous line's SHA-1 (if no > > previous then always different), a header follows. It starts by the > > number of lines that this <SHA-1> commit introduces,... > > So this description is wrong; <num lines> is not part of the > "extra". So, it is possible to print <SHA-1> <orig lineno> <this lineno> <num lines> TAB<data line> ? > I deliberately left it vague so that we can add things later to > the header. Porcelains should ignore the fields that they do > not understand, and should not expect these fields listed above > come in the order the above list shows. If the format changes, then porcelains should change their parsing algorithms. > Also I deliberately left it vague so that Porcelains can get the > header for the same SHA-1 more than once. This is needed when For different blocks separated by at least one different commit, yes. But the opposite should not be true. That is, you start a group, only when the previous commit differs from this commit. It would be prudent to print a <num lines> iff a group is started. > we add "ciff" to pick more than one paths from the same commit. > In such a case, most likely we are better off not to repeat > header fields from author...committer-tz and summary but we > would need filename. The expectation to the Porcelains is: > > Read one line, which begins with commit object name and two > or three numbers; if it has three numbers, it is the > beginning of a group. And if it doesn't have three numbers? Luben - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html