Re: Commit to more than one branch at once?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear diary, on Fri, Oct 06, 2006 at 08:18:42PM CEST, I got a letter
where Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> 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*',/((..)*)$/)
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]