Re: Specifying N revisions after the initial commit

2015-09-22 Thread Junio C Hamano
Theodore Ts'o writes: > On Tue, Sep 22, 2015 at 04:11:23PM -0400, Josh Boyer wrote: >> Oh, context would help, yes. In the case of the tree I'm parsing, I >> know for a fact that the commit history is entirely linear and will >> (should) always remain so. E.g. >> >> A - B - C - D - E - F ... {

Re: Specifying N revisions after the initial commit

2015-09-22 Thread Theodore Ts'o
On Tue, Sep 22, 2015 at 04:11:23PM -0400, Josh Boyer wrote: > Oh, context would help, yes. In the case of the tree I'm parsing, I > know for a fact that the commit history is entirely linear and will > (should) always remain so. E.g. > > A - B - C - D - E - F ... {N} > > So yes, finding e.g. th

Re: Specifying N revisions after the initial commit

2015-09-22 Thread Josh Boyer
On Tue, Sep 22, 2015 at 3:55 PM, Junio C Hamano wrote: > Josh Boyer writes: > >> On Tue, Sep 22, 2015 at 2:40 PM, Konstantin Khomoutov >> ... >>> Hence, given any particular commit, you're able to trace all of its >>> ancestry, but the reverse is not possible. >> >> That makes sense. I suppose I

Re: Specifying N revisions after the initial commit

2015-09-22 Thread Junio C Hamano
Josh Boyer writes: > On Tue, Sep 22, 2015 at 2:40 PM, Konstantin Khomoutov > ... >> Hence, given any particular commit, you're able to trace all of its >> ancestry, but the reverse is not possible. > > That makes sense. I suppose I will have to resort to parsing output > of git-rev-list or somet

Re: Specifying N revisions after the initial commit

2015-09-22 Thread Josh Boyer
On Tue, Sep 22, 2015 at 2:40 PM, Konstantin Khomoutov wrote: > On Tue, 22 Sep 2015 14:32:19 -0400 > Josh Boyer wrote: > >> Please CC me as I'm not subscribed. >> >> I was hoping someone could help me with the revision shorthand to get >> the commit sha of a commit N commits after the initial comm

Re: Specifying N revisions after the initial commit

2015-09-22 Thread Konstantin Khomoutov
On Tue, 22 Sep 2015 14:32:19 -0400 Josh Boyer wrote: > Please CC me as I'm not subscribed. > > I was hoping someone could help me with the revision shorthand to get > the commit sha of a commit N commits after the initial commit. What happens if right after the initial commit, there have been f

Specifying N revisions after the initial commit

2015-09-22 Thread Josh Boyer
Hi All, Please CC me as I'm not subscribed. I was hoping someone could help me with the revision shorthand to get the commit sha of a commit N commits after the initial commit. Thus far I've figured out that to get the initial commit in a repository, you can use: git rev-list --max-parents=0 HE