Re: Splitting a rev list into 2 sets

2013-06-25 Thread Francis Moreau
Hello Thomas, On Mon, Jun 24, 2013 at 11:59 AM, Thomas Rast wrote: > Francis Moreau writes: > >> On Thu, Jun 20, 2013 at 3:20 PM, Thomas Rast wrote: >>> positive=$(git rev-parse "$@" | grep -v '^\^') >>> negative=$(git rev-parse "$@" | grep '^\^') >>> boundary=$(git rev-list --boundary $p

Re: Splitting a rev list into 2 sets

2013-06-24 Thread Thomas Rast
Francis Moreau writes: > On Thu, Jun 20, 2013 at 3:20 PM, Thomas Rast wrote: >> positive=$(git rev-parse "$@" | grep -v '^\^') >> negative=$(git rev-parse "$@" | grep '^\^') >> boundary=$(git rev-list --boundary $positive ^master | sed -n 's/^-//p') >> # the intersection is >> git rev-

Re: Splitting a rev list into 2 sets

2013-06-21 Thread Ramkumar Ramachandra
Francis Moreau wrote: > Slower ? why do you think Thomas' solution is slower than the obvious one ? There's really only one way to find out: try it and see. YMMV depending on your data. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.ker

Re: Splitting a rev list into 2 sets

2013-06-21 Thread Francis Moreau
Hi, On Thu, Jun 20, 2013 at 3:47 PM, Ramkumar Ramachandra wrote: > Francis Moreau wrote: >> Basically I have an initial set (or can be several different sets) >> expressed as a revision specification described by git-rev-list man >> page. I just want to find the common set of commit which are par

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Francis Moreau
Hi, On Thu, Jun 20, 2013 at 3:20 PM, Thomas Rast wrote: > Francis Moreau writes: >> >> But I'm wondering if someone can see another solution more elegant ? > > I think there's a cute way. Suppose your arguments are of the form Really nice ! > > p1 p2 ... --not n1 n2 ... > > that is each pX

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Ramkumar Ramachandra
Francis Moreau wrote: > Basically I have an initial set (or can be several different sets) > expressed as a revision specification described by git-rev-list man > page. I just want to find the common set of commit which are part of > the initial sets *and* is reachable by master. That's just a gen

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Thomas Rast
Francis Moreau writes: > Hello, > > I'd like to write a script that would parse commits in one of my repo. > Ideally this script should accept any revision ranges that > git-rev-list would accept. > > This script should consider commits in master differently than the > ones in others branches. >

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Francis Moreau
Hi, On Thu, Jun 20, 2013 at 3:04 PM, Phil Hord wrote: > On Thu, Jun 20, 2013 at 6:14 AM, Francis Moreau > wrote: >> I'd like to write a script that would parse commits in one of my repo. >> Ideally this script should accept any revision ranges that >> git-rev-list would accept. >> >> This scrip

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Francis Moreau
On Thu, Jun 20, 2013 at 1:26 PM, Ramkumar Ramachandra wrote: > Francis Moreau wrote: >> To get the commit set which can't be reached by master (ie commits >> which are specific to branches other than master) I would do: >> >> # "$@" is the range spec passed to the script >> git rev-list "$@" ^

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Phil Hord
On Thu, Jun 20, 2013 at 6:14 AM, Francis Moreau wrote: > I'd like to write a script that would parse commits in one of my repo. > Ideally this script should accept any revision ranges that > git-rev-list would accept. > > This script should consider commits in master differently than the > ones in

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Ramkumar Ramachandra
Francis Moreau wrote: > To get the commit set which can't be reached by master (ie commits > which are specific to branches other than master) I would do: > > # "$@" is the range spec passed to the script > git rev-list "$@" ^master | check_other_commit > > But I don't know if it's possible to

Splitting a rev list into 2 sets

2013-06-20 Thread Francis Moreau
Hello, I'd like to write a script that would parse commits in one of my repo. Ideally this script should accept any revision ranges that git-rev-list would accept. This script should consider commits in master differently than the ones in others branches. To get the commit set which can't be rea