-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly Color Failed Remote Push Messages #1422
Comments
@maplion can you attach screenshots of the error messages, for completeness? Also, I think this might need to be addressed in Git core, rather than Git for Windows. But we can talk about that in more detail later. |
That's a good idea. Please understand that this project is not lacking in feature requests, but seriously lacking in contributors implementing said features. So here is a New Year's challenge for you: implement the desired feature yourself. It is not witch craft, look at how many contributors succeed in adding their work to Git: https://github.com/git/git/pulse Step 1: decide how you want to develop thisThere are essentially two options:
Step 2: identify the code that prints the message you want color-codedThe easiest way is to use Step 3: use colorTo add color to stuff you print, look at the functions provided by Step 4: test locallyOnce you build, you should use the Git in-place, which takes a little fiddling: /path/to/git/git.exe --exec-path=/path/to/git push ... where To test this, you probably want to create a toy project using Step 5: contributeOpen a Pull Request and earn glory ;-) Questions?If there is anything unclear, do not hesitate to ask away. Once you have code to show, a Pull Request will do fine (mark it as [Do not merge yet]), before that this here ticket will do just fine. |
@shiftkey Yes, I thought that might be the case, but since I am primarily using Git for Windows, I figured I'd start here and work up if needed. Screenshot was added. |
@dscho Thank you for the information. If I get a spot of free time, I'll take you up on your challenge. |
@dscho I am having difficulty in building my project. I went with the IDE option running it in Visual Studio with the solution file. With a fresh pull (no changes), it doesn't seem to recognize a lot of identifiers, such as stderr, time_t, FILE, SSL, DWORD, etc., etc. Is there a library or something I am missing? I thought it had me install what it needed when I first loaded the solution. Any recommendations on how to resolve this [I haven't done anything in C in about 20 years]? |
@maplion Which of the steps had you done, and which not? I'm suspecting that you may need something that is downloaded via the SDK, even though you are using the Visual Studio build process. It (compiling) will depend on the state of the repository work tree, and if bits are 'missing' they maybe part of the SDK's download (most contributors at some time or other have downloaded the SDK, so that may be where the mising definitions are hidden). Philip |
Our own documentation states that the SDK is not necessary:
@maplion I also had issues building the solution when investigating a bug over the weekend. The problem is that the projects are not being build in the correct order. Try the following:
Step 3. will take long because it will trigger:
That script will download, compile and install all the packages that are needed. |
@kgybels Thank you. The key was step 3. Step 4 didn't work for me; complained about a missing file, but I was able to compile the whole solution successfully anyway. |
How do I run the test suite? |
Also, could someone explain the documentation and how to properly contribute to it in my case [not sure how this particular change would be relevant to the documentation I am seeing]? |
How do I create a production-like build so I can use it in the mean time? |
Check the Making an installer and Making a portable Git topics on the wiki, both methods require you to install the Git for Windows SDK though. I think it would also work to install a Git for Windows release, and then copy a release build over the provided git.exe. However, do keep in mind that there are lots of files hardlinked to it, so you might need to update those as well. |
@kgybels thank you again. I will try out the SDK for the learning experience, if nothing else. |
Coming v2.18.0? 😃 git@a56fb3d |
@michaelblyons Looks that way. 🎉 |
Yaaaaay! It only took, what, 3 iterations to get it into core Git... |
To help users discern large chunks of white text (when the push succeeds) from large chunks of white text (when the push fails), let's add some color to the latter. This closes #1429 and fixes #1422 Signed-off-by: Johannes Schindelin <[email protected]>
To help users discern large chunks of white text (when the push succeeds) from large chunks of white text (when the push fails), let's add some color to the latter. This closes #1429 and fixes #1422 Signed-off-by: Johannes Schindelin <[email protected]>
I have some colleagues that occasionally have issues with Git [in a team setting] simply because they miss the message when a push is made prior to a required pull and they miss the message that it failed to successfully push. This is because a success shows a block of white text and a failure shows a block of white text. It would make sense for usability purposes if a
git push origin <branch name>
fails, for example, that the text returned is a different color (e.g. yellow/red). I tried to find ways to do this in Windows Git Bash and it seems less than trivial -- and I also think it is something that should be built in; so I am requesting this feature.Example message:
Setup
64-bit
Windows 10 64-bit
defaults?
defaults
to the issue you're seeing?
no
Details
Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Git Bash
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Not relevant
Not relevant
URL to that repository to help us with testing?
Not relevant
The text was updated successfully, but these errors were encountered: