简体   繁体   中英

Find applied patches in kernel source tgz from git

I have a kernel source code with patches in a tgz archive. Most patches are known in kernel git but I do not know which ones have been integrated. How can I tell which patches have been applied to the source code?

Seems you are copying the source code to the outside of the git repo (let's call it production environment of your application). And then you want to check whether the latest commit in git repo is applied to your production environment (outside the git repo).

If above situation is what you meet, the direct answer is no. But you can c hange the production environment as a branch inside the git repo .

For git repo, we usually use branches to work separately and occurrently. And also sync the branches/works/environments if we need to apply changes among the branches. For your situation, you can work on two branches in your git repo:

  • master branch: work as the production environment inside your git repo.
  • develop branch: develop new changes/features or fix bugs on this branch, when you are ready to apply the changes to master branch (production environment), just merge develop branch into master branch.

Steps for the workflow as below:

Assume, you are only work on master branch now, and the commit history as below:

…---A---B---C  master

Now you can create ad evelop branch by git checkout -b develop , and then works as this branch (such the commits D , E and F in below graph), the commit history will as below:

…---A---B---C  master
             \
              D---E---F   develop

When you want to apply the commits from develop branch into master branch (production environment), then use the commands:

git checkout master
git merge develop

And the commit history will be (both master branch and develop branch are point to the latest commit F ):

…---A---B---C---D---E---F  master, develop

And for more detail branching model, you can also refer A successful Git branching model .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM