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 tr...@inf.ethz.ch wrote: Francis Moreau francis.m...@gmail.com writes: On Thu, Jun 20, 2013 at 3:20 PM, Thomas Rast tr...@inf.ethz.ch wrote: positive=$(git rev-parse $@ | grep -v '^\^') negative=$(git rev-parse $@ | grep '^\^')

Re: Splitting a rev list into 2 sets

2013-06-24 Thread Thomas Rast
Francis Moreau francis.m...@gmail.com writes: On Thu, Jun 20, 2013 at 3:20 PM, Thomas Rast tr...@inf.ethz.ch wrote: positive=$(git rev-parse $@ | grep -v '^\^') negative=$(git rev-parse $@ | grep '^\^') boundary=$(git rev-list --boundary $positive ^master | sed -n 's/^-//p') # the

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 artag...@gmail.com 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

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

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

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 francis.m...@gmail.com 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

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 artag...@gmail.com 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 Francis Moreau
Hi, On Thu, Jun 20, 2013 at 3:04 PM, Phil Hord phil.h...@gmail.com wrote: On Thu, Jun 20, 2013 at 6:14 AM, Francis Moreau francis.m...@gmail.com 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

Re: Splitting a rev list into 2 sets

2013-06-20 Thread Thomas Rast
Francis Moreau francis.m...@gmail.com 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

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

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 tr...@inf.ethz.ch wrote: Francis Moreau francis.m...@gmail.com 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