Hi,
jian he <jian.universality@xxxxxxxxx>, 28 Ara 2022 Çar, 13:01 tarihinde şunu yazdı:
the last command should return nothing?
No, a patch file is not the same with diff output. Patches in the mailing list mostly include some meta information like commit message, commit date, author name etc. in addition to diff.
That's why git diff will probably find differences between a patch downloaded from the mailing list and your patch created by git diff.
If differences are only in meta info, stats, indexes etc.and not code itself, then it should be good.
You may use "git format-patch" to create a patch with similar format to the ones from the mailing list. But it wouldn't be exactly the same since dates, commit messages etc will be different.
The idea is to create a local branch, patch the downloaded patch file, and commit the patch file.Then try to use git diff to validate local branch = master + patch file by comparing the download patch file with the output of (git diff branchA branchB).Generally what's the correct commands (workflow to patch the patch file) and how can i validate the local branch only has the patched file changes and no others.
Alternatively, you can use "git am <patch_name>" to add the patch as a new commit to your current branch. Then you'll have master + patch.
also in this link: https://wiki.postgresql.org/wiki/Working_with_GitSee the documentation and tutorials at http://git.or.cz/ for a more detailed Git introduction. For a more detailed lesson, check out http://progit.org and maybe get a hardcopy to help support the site.the first link not working, the second link, is not that related to git.
This is just bad. Needs to be updated properly.
Best,
Melih Mutlu
Microsoft