[sr-dev] sr_3.0 branch: git screaming while trying to cherry-pick

Andrei Pelinescu-Onciul andrei at iptel.org
Sat Jun 26 09:54:57 CEST 2010


On Jun 25, 2010 at 16:24, Timo Reimann <timo.reimann at 1und1.de> wrote:
> Hey,
> 
> I just tried to cherry-pick my really short one-char typo fix (touching
> timer.h only) from master branch (commit e5d313913b34e05) into the
> sr_3.0 branch when git started to scream at me because of unmerged files:
> 
> 
> $ git cherry-pick -x e5d313913b34e05a9e0529a907b87a54ba354d26
> Added pkg/kamailio/debian-lenny/changelog
> Added pkg/kamailio/debian-lenny/rules
> Auto-merged timer.h
> pkg/kamailio/debian-lenny/compat: unmerged
> (7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69)
> pkg/kamailio/debian-lenny/control: unmerged
> (0fcdc55bb67da3503dc1a493c67827f55b0bfe35)
> pkg/kamailio/debian-lenny/copyright: unmerged
> (36282d7348bb5c5cf60f3221960bf2207d74a204)
> pkg/kamailio/debian-lenny/kamailio.README.Debian: unmerged
> (4eaf90bf566f73dbadb98019fc162f1577e220d5)
> pkg/kamailio/debian-lenny/kamailio.default: unmerged
> (4317664cfed06f8819c9c1e9dd8f09cc5f190dd1)
> pkg/kamailio/debian-lenny/kamailio.dirs: unmerged
> (f16a2e95bfec7df65ce7031fd57e9c1709f276a6)
> pkg/kamailio/debian-lenny/kamailio.examples: unmerged
> (c48447a3e9c5d9dc13a410b40345c970b0e1e741)
> pkg/kamailio/debian-lenny/kamailio.init: unmerged
> (e5f50fcbf7a174c34a2f69ec0d74f0b448d629e4)
> pkg/kamailio/debian-lenny/kamailio.postinst: unmerged
> (fc7e4a8192ba5cdee9bfc14cc7b490af47b0b545)
> Automatic cherry-pick failed.  After resolving the conflicts,
> mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and
> commit the result.
> When commiting, use the option '-c e5d3139' to retain authorship and
> message.
> 
> 
> I'm not quite sure how to resolve this the best way. Help is appreciated.

It's because a directory was changes into a symlink with the same name
(and git is not very happy when the name is preserved but a directory is
changes into a symlink or a file, or viceversa).

The fix is to run:
git reset -- pkg/kamailio/debian-lenny


In your case you would need to do:

git cherry-pick -x e5d31391
git reset -- pkg/kamailio/debian-lenny
git commit -c e5d3139

(and you'll have to repeat it for any cherry-pick for a commit after the
 debian-lenny changes)


Andrei



More information about the sr-dev mailing list