duplicates - How to apply patches on the top of a git tree preventing duplication? -


I am seeking advice for a problem that I thought that simple, and it really is a small script But I think that should already be done in a way to do this with Git / Quilt / Stgit.

I'm not really doing good on Git and this is a problem for me.

My problem: I've got a guit tree (Linux kernel) and several patches. What happens, such a patch was intended for the older version of the kernel, and many of them have already been applied to my tree. A header row or patch

  starting with b1af4315d823a2b6659c5b14bc17f7bc61878ef4 (timestamp)  

and pre> Git b1af4315d823a2b6659c5b14bc17f7bc61878ef4 show

in my kernel tree, I can see this to my current tree is already available, and I've never tried to implement them.

I tried to use things like git apply or git am , but they try to apply the patch:

  alan @ubuntu: ~ /Desktop/openwrt/linux-git/linux-2.6.33.y$ Git apply -P1 --check --index / home / Allen / desktop / OpenWRT / SVN / vomiting-branch / build_dir / Linux Kirkwood / Linux- 2.6.30.10/patches/generic/000-bzip_lzma_remove_nasty_hack.patch error: patch failed: lib / decompress_bunzip2.c: 45 error: lib / decompress_bunzip2.c: patch error does not apply : Patch failed: lib / decompress_unlzma.c: Error 29: Lib / decompress_unlzma.c: Patch does not apply  

Thank you.

You can create a new branch of the version for which the patches were applied, by applying them and temporary branch merged with the master:

  git checkout -b temp-branch v2.6.30 git I / apply ... patch ... git checkout master git merge temp-branch  

This should resolve the most duplicated patches (though, it will not use encryption, rather patch contents). In addition, you can try git rebase in the previous step.

This is not the best way, but should do the trick.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -