Re: [PATCH 2/2] upload-pack: fix off-by-one depth calculation in shallow clone

2013-01-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > get_shallow_commits() is used to determine the cut points at a given > depth (i.e. the number of commits in a chain that the user likes to > get). However we count current depth up to the commit "commit" but we > do the cutting at its parents (i.e. current depth +

[PATCH 2/2] upload-pack: fix off-by-one depth calculation in shallow clone

2013-01-10 Thread Nguyễn Thái Ngọc Duy
get_shallow_commits() is used to determine the cut points at a given depth (i.e. the number of commits in a chain that the user likes to get). However we count current depth up to the commit "commit" but we do the cutting at its parents (i.e. current depth + 1). This makes upload-pack always return