Re: Announcing git-reparent

2013-01-14 Thread Mark Lodato
On Mon, Jan 14, 2013 at 3:03 AM, Piotr Krukowiecki wrote: > Just wondering, is the result different than something like > > git checkout commit_to_reparent > cp -r * ../snapshot/ > git reset --hard new_parent > rm -r * > cp -r ../snapshot/* . > git add -A > > (assumes 1 parent, does not cope with

Re: Announcing git-reparent

2013-01-14 Thread Andreas Schwab
Piotr Krukowiecki writes: > Just wondering, is the result different than something like > > git checkout commit_to_reparent > cp -r * ../snapshot/ > git reset --hard new_parent > rm -r * > cp -r ../snapshot/* . > git add -A I think you are looking for "git reset --soft new_parent", which keeps b

Re: Announcing git-reparent

2013-01-14 Thread Junio C Hamano
Jonathan Nieder writes: > Hi Mark, > > Mark Lodato wrote: > >> Create a new commit object that has the same tree and commit message as HEAD >> but with a different set of parents. If ``--no-reset`` is given, the full >> object id of this commit is printed and the program exits > > I've been wish

Re: Announcing git-reparent

2013-01-14 Thread Piotr Krukowiecki
Hello, On Mon, Jan 14, 2013 at 8:16 AM, Jonathan Nieder wrote: > Hi Mark, > > Mark Lodato wrote: > >> Create a new commit object that has the same tree and commit message as HEAD >> but with a different set of parents. If ``--no-reset`` is given, the full >> object id of this commit is printed a

Re: Announcing git-reparent

2013-01-13 Thread Jonathan Nieder
Hi Mark, Mark Lodato wrote: > Create a new commit object that has the same tree and commit message as HEAD > but with a different set of parents. If ``--no-reset`` is given, the full > object id of this commit is printed and the program exits I've been wishing for something like this for a long

Announcing git-reparent

2013-01-13 Thread Mark Lodato
I threw together a small utility called "git-reparent", available on GitHub at: https://github.com/MarkLodato/git-reparent I welcome any comments or suggestions. To make discussion easier, I've copied the README and code below. --- 8< --- NAME git-reparent - Recommit HEAD with a new