top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Rejecting whitespace-only changes at github

0 votes

Is there some tool or online-service which can check patches if they contain white-space-only changes and all test-wrapping changes?

posted Aug 10, 2017 by Sumit Pokharna

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

I don't think you can run code on GitHub like that. You can write a bot that listens for new pull requests, and comments on them, but you have to find your own place to run that bot.

answer Aug 10, 2017 by Mandeep Sehgal
Similar Questions
+2 votes

In coreboot we try to check for whitespace errors before committing. Of course a pre-commit hook is the way to go, but unfortunately it is not so simple (at least for me) as the following requirements exist.

  1. Only the files actually committed should be checked. That means running git commit -a, abort that and then running git commit some/file should only check some/file for whitespace errors.

  2. There are certain files that are allowed to have whitespace errors. In our case these are *.patch and *.diff files which by design seem to contain whitespace error.

Currently the whole tree is checked, which takes a lot of time. I tried to come up with a patch, but failed so far. Best would be to have

$ git diff --check --only-committed-files --exclude "*patch$"

where I could not find a way for the last to switches.

Currently, I would use

$ git diff-index --cached --name-only $against -- | grep -v patch$

and pass that list to some whitespace check program. Unfortunately that still does not fulfill the first requirement. What am I missing to solve this elegantly?

+1 vote

I was learning to user git-bash and github. As part of tutorial we were asked to set username & password through git-bash command line and create an account in github. But since I already set the email through gitbash global config, I am not allowed to create account or create a password for my account .

Please let me know how can I create a account in github or delete the entry to start fresh.

+3 votes

I was hoping that somebody could give me advice since I'm new to git.

I'll be installing a couple of projects from github on our servers, and adding some features.

Should I create a repository on our server (e.g. in /opt/git/), add the github project as a remote, and create a branch? Then on my local machine add our server as the remote and then pull / push with that?

On the server there will be two web directories: stable and dev. I was planning for these to be branches, and then just pull from the server repository using the local protocol.

I think it would mean sorting out merge actions on the server. I'm hoping to be able to fetch and integrate updates from the developer's github repository, but without making things more complicated than they need to be.

Does anyone have any suggestions?

+3 votes

I have cloned someone's repository on my local drive using git command: git clone

But I don't find any file. How do I install the package xxx? So that I can 'import xxx' in my python script.

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.