Yes, I know, this question has been asked (and repeatedly answered) before. Unfortunately, the results I'm getting from using those answers don't (seem to) answer the question. Am I using them wrong? Is my repository corrupted? You be the judge.
My journey so far:
From a directory where I've done pushes before, I did a
git pull git://git.code.sf.net/p/mingw-w64/mingw-w64 master
to make sure I had the most current code. Several updates downloaded, which was not surprising.Then I did a clean build of the project to make sure my changes would still build. Yup.
I staged, then committed the 2 files to my local repository. So far, so good.
But before I did the push, I wanted to check to ensure I'm only going to push what I intend. I'm still uncomfortable using git, so a bit of checking before affecting the public repository seemed warranted. So (per this) I used
git cherry -v
to see what my push was about to do:
C:\cygwin64\src\mingw-w64d>git cherry -v + 390ef6ea3275003c44a404b3bae83455287271ae dwrite_2.h: Added IDWriteFontFace2 declaration. + 563731c44e5515ed373b4af03b5a382c7d5ea843 lib32 msvcrt add mkgmtime exports + e05f3e86898d91b870c9c7256efd24c8dd6de9cb Add CreateRemoteThreadEx to 32bit kernel32.def + 6734c8e40e69f305ada23afe86c1176a9ae0fc10 winpthreads mem leak fixed(bug 571) + c798dc2befb7e0b9d9d940aeeffbc7365b01e36a Add missing symbols to crypt library + 6c0ebaa1b404b9f27e1f953a16a7f87063e1079e winstorecompat: Add a GetStartupInfo stub + f3e50a97fb4ec3df8969c54bc5a575819dfb5b87 dpapi: Crypt*Data functions are allowed on Win10 + 0f658a7ad80153970a0c43c6580f892c82e8cc48 uuid: Remove duplicated UUIDs + d47421eab0299215a33c7d24252b66fff3579b8a winstorecompat: Add GetConsoleOutputCP replacement + c77c0298a70b98edb302a7131ea51e739dd35ac3 winstorecompat: Fix mangling header guard. + e2cfbae44eda32aa63477b458f91a907633b334c wincrypt: Unconditionally include dpapi.h + 15b43db3ad61bca9c6a4abaf49e5f4e691349ee6 include: SwitchToThread is always available on Win10 + 8a6d5d945c5c344daa464009e467054f2c7fbd8b crt: Add a WindowsApp.lib mri & associated def files + b48e3ac8969dd478efa8bfd129af38f080fd6741 crt: Add IMP symbols for lock/unlock_file + ac919255813c22aaad9de8b230216f0a8c39d115 GetThemeFont pFont argument is always UTF-16 + 4c2df0d02ed71ae07e85f1b35ac857a148cd2b8f Define IN6_IS_ADDR_ macros to conform to Posix Spec + a76b799dc76dcdf8630dd48307158a5385a9f2ce Bug 541 - fesetenv was broken
My commit is JUST the last one. The rest appear to be all the stuff I just got from the 'git pull.' So either 'git cherry' doesn't "list what I'm about to push," or I'm about to re-push a bunch of already pushed changes.
Guessing maybe 'cherry' isn't the command I want, I tried
git diff --stat origin master
(from here. This lists all the files I just got from the git pull. But it DOESN'T list the files in the commit I actually want to push. So again, this isn't telling me what I want to know.As a last try I did
git push --dry-run origin master
which shows:4c2df0d..a76b799 master -> master
Now this looks right(-ish). As you can see, a76b799 is my commit. 4c2df0d is the commit right before it. As written, this appears to say the push will send 2 commits. That's better than 17, but to call this a "list of what I'm about to push" seems a stretch.
So, to return to my question: How to tell what 'git push' is going to push?
The answers I'm finding on SO aren't telling me what I want to know. Although it's possible this is due to my using them wrong, or that I've (somehow) mucked up my local repository. Maybe calling push really is about to send all 17 commits? But that's not what 'push --dry-run' seems to say? How would I know which one to believe?!?
It's frustrating that 'trying to find out' what I'm going to push has left me more confused over what's going to get pushed than when I started!
What would an acceptable answer to this question look like? Well, something that would get me this would be a start:
+ a76b799dc76dcdf8630dd48307158a5385a9f2ce Bug 541 - fesetenv was broken
Note that unlike my current 'cherry' output, I'm only listing (what I hope is) the one commit about to be pushed.
Alternately would be something that produces a listing of files that includes the actual files about to be pushed (unlike my current 'git diff' output) and excludes everything else:
mingw-w64-crt/misc/fesetenv.c | 2 +-
mingw-w64-crt/misc/feholdexcept.c | 2 +-
Finally would be a way to get the patches (or perhaps 1 big patch if there are multiple commits pending?) of the changes about to be pushed.
I'd like to post the actual output I'm getting from all these commands, but it exceeds the max message size for an SO question. It is (temporarily) available for viewing at http://www.limegreensocks.com/mingw-w64/hist.txt. The files in the a76b799 commit are named fesetenv.c and feholdexcept.c.
A thought: Is my git pull
syntax wrong?