GithubHelp home page GithubHelp logo

Comments (12)

bitboxer avatar bitboxer commented on June 17, 2024

When I open the mail and look at the text/plain output, I don't see line numbers at the beginning of each line. Those line numbers are only available in the html version of the mail. Maybe your mutt client tries to be too smart and is rendering the html version?

from git-commit-notifier.

 avatar commented on June 17, 2024

Hmm, this is quite dubious:

Both the text/plain and the text/html output are in the e-mail as attachments.

I have a indeed a mailcap to parse text/html with a http client, but never the less I've saved both attachments as text/plain and as text/html and they appear to be rendered in the same way. As a matter of fact the e-mail client decodes the attachments and the magic mime-type seems to work.

If you say that you've looked at the text/plain output, do you mean the diff output is in e-mails body ? Maybe this is the problem. Definitely I was expecting that the diff in text/plain would be in the body.

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

I opened the mail and viewed the plain version of the mail. It has 2 blocks, one text/plain and one text/html . The text/plain version did not contain line numbers, but only + - as you would expect. It's the normal diff output. Only the html version has the line numbers.

Please open the mail with a real client without any magic your mail pipe applies to all your mails and have a look yourself :) .

from git-commit-notifier.

 avatar commented on June 17, 2024

You clearly have no clue what an e-mail should contain. As soon as I arrive at work I'll forward the mails to see for yourself.

As for real e-mail clients I f*rt in the opposite direction.

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

By the way: the diff is comming from this:

git show #{rev.strip} -w

and is processed from there to the HTML-View. The plain-text version has the output of that command as mail. That code can be found in diff_to_html.rb starting in line 397 . That result is used in Emailer.rb#send to create the actual email and send it.

I think I have a very good clue on what should be in the mail.

from git-commit-notifier.

akzhan avatar akzhan commented on June 17, 2024

Issue will be closed now. @bitboxer absolutely right, use good mail client like GMail, Thunderbird, Bat or Outlook.

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

I won't go that far to close this issue. I still want to know why there are line numbers in the mail.

from git-commit-notifier.

 avatar commented on June 17, 2024

I've sent you a couple of screenshots -- from thunderbird, to avoid the misconception that the client somehow ``mangles'' it.

Yeah I managed to see how you invoke git, I haven't had any time to play with it -- btw this is installed from gems

$ gem list | grep git-commit
git-commit-notifier (0.9.1)

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

The mail you forwarded doesn't have the plain text body the original mail contained. I really encourage you to at least try to have a look at your mails with another mail client. The line numbers in the screenshots are clearly the line numbers that are created for the html version. Last night I had the tought that you might have reconfigured the diff output of git, but that way the html mail would be corrupted and would not render the way it renders in the forwarded mail.

from git-commit-notifier.

 avatar commented on June 17, 2024

Have you even bother to look at the screenshots ? I've opened the e-mails with a gui client, and displayed the body of the message as text/plain''. And I've sent you exactly what I got from the server. I totally despiseworks for me'' behaviour.

Anyway, I'll try to dig (and rant) more :-). I'll close this until I have some sense of this.

from git-commit-notifier.

bitboxer avatar bitboxer commented on June 17, 2024

Sorry, but It's not a "works for me" thing. It's a "I don't see anything in the source code that would explain this". Something on your mailserver or your your mailclient is changing the mail and creates a new text/plain version that replaces the original one the notifier is sending. That's the only explanation I can offer right now.

from git-commit-notifier.

akzhan avatar akzhan commented on June 17, 2024

JFYI: typical letter sent by Git-commit-notifier, source:

Delivered-To: [email protected]
Received: by 10.52.182.226 with SMTP id eh2cs186088vdc;
        Thu, 28 Apr 2011 09:16:25 -0700 (PDT)
Received: by 10.217.7.71 with SMTP id z49mr8339374wes.33.1304007384863;
        Thu, 28 Apr 2011 09:16:24 -0700 (PDT)
Return-Path: 
Received: from ...
        by mx.google.com with ESMTP id c54si5655702wer.141.2011.04.28.09.16.24;
        Thu, 28 Apr 2011 09:16:24 -0700 (PDT)
Received-SPF: neutral (google.com: ... is neither permitted nor denied by best guess record for domain of gitorious@...) client-ip=...;
Authentication-Results: mx.google.com; spf=neutral (google.com: ... is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Received: from localhost (localhost [127.0.0.1])
    by ... (Postfix) with ESMTP id 47000120F;
    Thu, 28 Apr 2011 20:02:15 +0400 (MSD)
X-Virus-Scanned: amavisd-new at ...
Received: from ... ([127.0.0.1])
    by localhost (... [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id g4H+i8oHY92I; Thu, 28 Apr 2011 20:02:15 +0400 (MSD)
Received: from ... (unknown [...])
    by ... (Postfix) with ESMTPS id F1D04A38
    for ; Thu, 28 Apr 2011 20:02:14 +0400 (MSD)
Received: from gitorious by ... with local (Exim 4.69)
    (envelope-from )
    id 1QFTt9-0002bO-EJ
    for commits@...; Thu, 28 Apr 2011 20:16:23 +0400
From: Denis Sukhonin <...>
Reply-To: Denis Sukhonin <...>
To: commits@...
Subject: =?utf-8?Q?=5Btelemarker=2Fvr=5D_fixes_=23=34=31=31=38_=D0=9D=D0=B5_=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0=D0=B5=D0=BC_=D0=BD=D0=B5=D0=BE=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=83=D1=8E_=D0=BD=D0=BE=D0=B2=D0=BE=D1=81=D1=82=D1=8C_=D0=B8=D0=BB=D0=B8_=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=2E?=
X-Mailer: git-commit-notifier
X-Git-Refname: refs/heads/vr
X-Git-Oldrev: 0c0b39694e60492e9ef0ade37533f40198496820
X-Git-Newrev: 447c0d5e25d02a8f1fbd36303e501525ac3e0430
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=754ef50d9fd8512dbea47412a3bd95753c95c477
Message-Id: 
Date: Thu, 28 Apr 2011 20:16:23 +0400



--754ef50d9fd8512dbea47412a3bd95753c95c477
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: inline



commit 447c0d5e25d02a8f1fbd36303e501525ac3e0430
Author: Denis Sukhonin <....>
Date:   Thu Apr 28 20:12:07 2011 +0400

    fixes #4118 Не показываем неопубликованную новость или возможность.

diff --git a/app/controllers/promo/facilities_controller.rb b/app/controllers/promo/facilities_controller.rb
index 8042150..eca914a 100644
--- a/app/controllers/promo/facilities_controller.rb
+++ b/app/controllers/promo/facilities_controller.rb
@@ -1,10 +1,12 @@
 class Promo::FacilitiesController < Promo::ApplicationController
+  rescue_from ActiveRecord::RecordNotFound, :with => :render_404
+
   def index
     @facilities = Facility.with_head_pictures.select {|facility| facility.head_picture }
   end
   
   def show
-    @facility = Facility.find(params[:id])
+    @facility = Facility.find(params[:id], :conditions => {:publish => true})
     @picture = @facility.inner_picture
   end
 end
\ No newline at end of file
diff --git a/app/controllers/promo/news_articles_controller.rb b/app/controllers/promo/news_articles_controller.rb
index 2601d01..9ec1de1 100644
--- a/app/controllers/promo/news_articles_controller.rb
+++ b/app/controllers/promo/news_articles_controller.rb
@@ -1,9 +1,11 @@
 class Promo::NewsArticlesController < Promo::ApplicationController
+  rescue_from ActiveRecord::RecordNotFound, :with => :render_404
+
   def index
     @news_articles = NewsArticle.with_head_pictures.select {|news| news.head_picture }.paginate :page => params[:page], :per_page => 5
   end
   
   def show
-    @news_article = NewsArticle.find(params[:id])
+    @news_article = NewsArticle.find(params[:id], :conditions => {:publish => true})
   end
 end




--754ef50d9fd8512dbea47412a3bd95753c95c477
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Disposition: inline



<html style="font-size: 11px;">
...


--754ef50d9fd8512dbea47412a3bd95753c95c477--

from git-commit-notifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.