Matthijs Kooijman <matthijs@xxxxxxxx> writes: >> Doing it "correctly" (in the shorter term) would involve: > > Given below suggestion, I take it you don't like what Jonathan proposed > (changing the meaning of the deepen parameter in the protocol so that > the server effectively decides how to interpret --depth)? Correct. > We can implement these two in current git already, since they only > add to the protocol, not break it in an incompatible manner, right? Correct. >> - teaching the requestor that got --depth=N from the end user to >> pay attention to the new capability in such a way that: >> >> - when talking to an old sender (i.e. without the off-by-one >> fix), send N-1 for N greater than 1. Punt on N==1; >> >> - when talking to a fixed sender, ask to enable the capability, >> and send N as is (including N==1). > And these should wait for git2, since they change the meaning of the > --depth parameter? Or is this change ok for current git as well? My suggestion was based on the understanding that everybody agreed that the current behaviour of --depth=1 to have one extra commit behind the shallow "snapshot" aka "poor-man's tarball", is a *bug* to be fixed, so I didn't mean it as a "backward incompatible change" at all. > What do you mean by "punt" exactly? As old senders can only send a history with 2 or more commits deep, it would be sensible for the receiver to warn the user that we are buggily asking for one more than the user asked for to the sender, and fetch history with two commits. It would be a regression to error it out. >> In the longer term, I think we should introduce a better deepening >> mechanism. Cf. > Even when there will be a better deepening mechanism, the above is still > useful (passing --depth=1 serves to get just a single commit without > history, which is a distinct usecase from deepening the history of an > existing shallow repository). Correct. That is why I said "in the longer term, we should introduce". Did I say "introduce and replace with it"? -- 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