Comments (5)
Btw, works fine with 1.8.7 ; I've reverted now to Ruby 1.8.
I just realized this is kind of the same like Issue 103
from git-commit-notifier.
Thanks for the report.
from git-commit-notifier.
Some more information:
I tried to reproduce this problem in another environment and it worked without problems. Trying to narrow it down, I compared the locale
output on both environments. In the working environment it was all set up to en_US.UTF-8
. In the "problematic" environment, which is using git-http-backend via apache2, no specific locale was set, it all defaulted to POSIX
.
I was able to fix this on my end up setting the post-receive
hook this way:
LANG=en_US.UTF-8 GEM_HOME=... .../git-commit-notifier ...git-notifier-config.yml
Or, to describe it the other way: I can easily reproduce this problem locally when I set LANG=POSIX
in the environment executing git-commit-notifier
.
I found a workaround by always forcing UTF-8, because the git commands in use (git log, git show) default to UTF-8. See https://github.com/bitboxer/git-commit-notifier/pull/105 .
from git-commit-notifier.
I still have the same issue, albeit the error message is a bit different; it now references UTF-8
instead of US-ASCII
; tested with master @ 36122d0 :
$ rm previously.txt; src/ruby/git-commit-notifier/local-run.rb example.yml badc3992480cbd645aa67f360c8fd7d5516fe286 b232ff2f08a24bae1c6c55df1784ccbd64291611
Sending mail...
#<Encoding:UTF-8>
src/ruby/git-commit-notifier/lib/git_commit_notifier/diff_to_html.rb:319:in `split': invalid byte sequence in UTF-8 (ArgumentError)
from src/ruby/git-commit-notifier/lib/git_commit_notifier/diff_to_html.rb:319:in `extract_commit_info_from_git_show_output'
from src/ruby/git-commit-notifier/lib/git_commit_notifier/diff_to_html.rb:434:in `diff_for_commit'
from src/ruby/git-commit-notifier/lib/git_commit_notifier/diff_to_html.rb:515:in `block in diff_between_revisions'
from src/ruby/git-commit-notifier/lib/git_commit_notifier/diff_to_html.rb:512:in `each'
from src/ruby/git-commit-notifier/lib/git_commit_notifier/diff_to_html.rb:512:in `diff_between_revisions'
from src/ruby/git-commit-notifier/lib/git_commit_notifier/commit_hook.rb:121:in `run'
from src/ruby/git-commit-notifier/lib/git_commit_notifier/executor.rb:23:in `run!'
from src/ruby/git-commit-notifier/local-run.rb:22:in `<main>'
(I can't reopen the issue, no permissions)
from git-commit-notifier.
In case you want to test it yourself, here's the dummy repository I used for testing (it's a git repos in a tar.bz2): http://my-serve.rs/tmp/foo.tar.bz2 ; it contains differences in files as well as commit messages with non-US-ASCII characters. The above shown command can be simply applied to it. This was tested with locale en_US.UTF-8
from git-commit-notifier.
Related Issues (20)
- add URL of repository HOT 2
- emphasizing first line of commit message HOT 3
- Set Reply-to to recipient address? HOT 5
- Pushing a new branch resulted in Iconv::IllegalSequence in diff_to_html HOT 5
- Creation of a branch triggers notification mails for ALL commits in the repository HOT 4
- Add parameter to gem HOT 5
- ${repo_name} is not getting expanded as the project name for gitweb URL's
- COMMIT_LINK_MAP for gitlabhq missing parent in url
- gitlabhq file_link feature produces 404s HOT 5
- support trac with multiple repositories HOT 1
- nokogiri 1.6.0 dropped support for ruby 1.8.3 HOT 1
- I've got a Permission problem with git-commit-notifier HOT 4
- Sorry for Problem again HOT 4
- How to change auther HOT 3
- Link file summary list to web view repository HOT 1
- Invalid multibyte escape
- Pushing to GitLab with link_files fails under ruby 2 HOT 1
- Commits suppressed with unique_commits_per_branch:false and include_branches:[...]
- How to config smtps(port 465) in the file of git-notifier-config.yml
- Tag/deploy new version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-commit-notifier.