* FEATURE REQUEST: Cherry pick in not checked out branch @ 2010-03-15 8:39 Maxim Treskin 2010-03-15 8:55 ` Tim Mazid 2010-03-15 9:43 ` Sverre Rabbelier 0 siblings, 2 replies; 6+ messages in thread From: Maxim Treskin @ 2010-03-15 8:39 UTC (permalink / raw) To: git Hello git cherry-pick applies the change introduced by specified commit only to currently checked out branch. Why this requirement exists? Is it possible to apply changes to not checked out branch, like: $ git cherry-pick <branch> <commit> Thank you -- Maxim Treskin ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: FEATURE REQUEST: Cherry pick in not checked out branch 2010-03-15 8:39 FEATURE REQUEST: Cherry pick in not checked out branch Maxim Treskin @ 2010-03-15 8:55 ` Tim Mazid 2010-03-15 9:43 ` Sverre Rabbelier 1 sibling, 0 replies; 6+ messages in thread From: Tim Mazid @ 2010-03-15 8:55 UTC (permalink / raw) To: Git Mailing List That's actually a very good point. I could have used such a feature on a number of occasions. I second this feature request. > Date: Mon, 15 Mar 2010 14:39:38 +0600 > Subject: FEATURE REQUEST: Cherry pick in not checked out branch > From: zerthurd@gmail.com > To: git@vger.kernel.org > > Hello > > git cherry-pick applies the change introduced by specified commit only > to currently checked out branch. Why this requirement exists? Is it > possible to apply changes to not checked out branch, like: > > $ git cherry-pick <branch> <commit> > > Thank you > > -- > Maxim Treskin > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html _________________________________________________________________ Link all your email accounts and social updates with Hotmail. Find out now. http://windowslive.ninemsn.com.au/oneinbox?ocid=T162MSN05A0710G ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FEATURE REQUEST: Cherry pick in not checked out branch 2010-03-15 8:39 FEATURE REQUEST: Cherry pick in not checked out branch Maxim Treskin 2010-03-15 8:55 ` Tim Mazid @ 2010-03-15 9:43 ` Sverre Rabbelier 2010-03-15 9:54 ` Tim Mazid 1 sibling, 1 reply; 6+ messages in thread From: Sverre Rabbelier @ 2010-03-15 9:43 UTC (permalink / raw) To: Maxim Treskin; +Cc: git Heya, On Mon, Mar 15, 2010 at 09:39, Maxim Treskin <zerthurd@gmail.com> wrote: > git cherry-pick applies the change introduced by specified commit only > to currently checked out branch. Why this requirement exists? Is it > possible to apply changes to not checked out branch, like: Because you need a working directory to resolve conflicts. -- Cheers, Sverre Rabbelier ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: FEATURE REQUEST: Cherry pick in not checked out branch 2010-03-15 9:43 ` Sverre Rabbelier @ 2010-03-15 9:54 ` Tim Mazid 2010-03-15 11:01 ` Michael J Gruber 0 siblings, 1 reply; 6+ messages in thread From: Tim Mazid @ 2010-03-15 9:54 UTC (permalink / raw) To: Git Mailing List Hi, Could we not make cherry-pick "stash, checkout, cherry-pick, checkout, pop"? Cheers, Tim. ---------------------------------------- > From: srabbelier@gmail.com > Date: Mon, 15 Mar 2010 10:43:14 +0100 > Subject: Re: FEATURE REQUEST: Cherry pick in not checked out branch > To: zerthurd@gmail.com > CC: git@vger.kernel.org > > Heya, > > On Mon, Mar 15, 2010 at 09:39, Maxim Treskin wrote: >> git cherry-pick applies the change introduced by specified commit only >> to currently checked out branch. Why this requirement exists? Is it >> possible to apply changes to not checked out branch, like: > > Because you need a working directory to resolve conflicts. > > -- > Cheers, > > Sverre Rabbelier > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html _________________________________________________________________ Looking for a new home? With all the latest places, searching has never been easier. http://clk.atdmt.com/NMN/go/157631292/direct/01/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FEATURE REQUEST: Cherry pick in not checked out branch 2010-03-15 9:54 ` Tim Mazid @ 2010-03-15 11:01 ` Michael J Gruber 2010-03-15 13:12 ` Johannes Schindelin 0 siblings, 1 reply; 6+ messages in thread From: Michael J Gruber @ 2010-03-15 11:01 UTC (permalink / raw) To: Tim Mazid; +Cc: Git Mailing List, Sverre Rabbelier Tim Mazid venit, vidit, dixit 15.03.2010 10:54: > > Hi, > > Could we not make cherry-pick "stash, checkout, cherry-pick, checkout, pop"? Sure, that would be 5 command invocations requiring a work tree ;) Seriously, you can make this into an alias or custom commend, of course, but it would possibly need to stop in a state of conflict, the very same way that rebase -i may. There are structural improvements on the way which will make rebase -i, cherry-pick and so on use the same underlying code base, and that will help implementing requests such as this one. Michael P.S.: Please don't top-post (I cut it). P.P.S.: Please don't cull cc (I re-added SR). ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: FEATURE REQUEST: Cherry pick in not checked out branch 2010-03-15 11:01 ` Michael J Gruber @ 2010-03-15 13:12 ` Johannes Schindelin 0 siblings, 0 replies; 6+ messages in thread From: Johannes Schindelin @ 2010-03-15 13:12 UTC (permalink / raw) To: Michael J Gruber; +Cc: Tim Mazid, Git Mailing List, Sverre Rabbelier Hi, On Mon, 15 Mar 2010, Michael J Gruber wrote: > Tim Mazid venit, vidit, dixit 15.03.2010 10:54: > > > Could we not make cherry-pick "stash, checkout, cherry-pick, checkout, > > pop"? > > Sure, that would be 5 command invocations requiring a work tree ;) Actually, if you want something that does not change all the timestamps, and that does only trivial merges (i.e. no conflicts), you may have luck with something like this: test $# = 2 || { echo "Usage: $0 <commit> <branch>" >&2 exit 1 } GIT_INDEX_FILE=.git/tmp.index && export GIT_INDEX_FILE && git read-tree "$2" && git diff "$1"^! | git apply --index && tree=$(git write-tree) && msg="$(git cat-file commit "$1" | sed '1,/^$/d')" && commit=$(echo "$msg" | git commit-tree $tree -p "$2") && git update-ref -m cherry-pick-2.0 "$2" $commit Totally Untested(tm), Dscho ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-15 13:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-15 8:39 FEATURE REQUEST: Cherry pick in not checked out branch Maxim Treskin 2010-03-15 8:55 ` Tim Mazid 2010-03-15 9:43 ` Sverre Rabbelier 2010-03-15 9:54 ` Tim Mazid 2010-03-15 11:01 ` Michael J Gruber 2010-03-15 13:12 ` Johannes Schindelin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).