From: Petr Baudis <pasky@suse.cz>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: git@vger.kernel.org
Subject: Re: Commit to more than one branch at once?
Date: Fri, 6 Oct 2006 20:52:27 +0200 [thread overview]
Message-ID: <20061006185227.GV20017@pasky.or.cz> (raw)
In-Reply-To: <45269E02.50407@s5r6.in-berlin.de>
Dear diary, on Fri, Oct 06, 2006 at 08:18:42PM CEST, I got a letter
where Stefan Richter <stefanr@s5r6.in-berlin.de> said that...
> if I git-cherry-pick a commit from branch A into branch B, this is shown
> as a difference in "git-log B..A".
>
> Is it possible to commit a change to two or more branches but preserve
> the identity of the change? IOW, is there an alternative to
> git-cherry-pick that does not have above mentioned side effect?
Philosophical answer:
This is a point where it shows that Git is snapshot-based, not
changeset-based version control system. So you are not committing a
change, you are committing a snapshot taken after the change. So only
snapshots have identity and if the snapshots differ, they obviously have
different identity. Thus your commit has to have different identity.
Furthermore the commit ties the snapshot with some history (and only
this is the first moment where the concept of the 'change' emerges), and
if you have different history, identity of your commit cannot be
the same either.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
prev parent reply other threads:[~2006-10-06 18:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 18:18 Commit to more than one branch at once? Stefan Richter
2006-10-06 18:37 ` Linus Torvalds
[not found] ` <20061006143804.abb6c321.seanlkml@sympatico.ca>
2006-10-06 18:38 ` Sean
2006-10-06 19:23 ` Stefan Richter
2006-10-06 18:52 ` Petr Baudis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061006185227.GV20017@pasky.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox