git/list[1] front-page[2] threads[3] people[4] search[5] about
 

sending attachments via git send-email

From
Shourya Shukla <shouryashukla.oo@gmail.com>
Date
Feb 3, 2020, 06:47 UTC
Message-ID
<20200203064712.14621-1-shouryashukla.oo@gmail.com>
Hello everyone,
I was doing some tests on 'git send-email'[1] and noticed a couple of things:
	1. We are not able to send attachments via 'git send-email' unlike
	   various other mail clients such as GMail, Yahoo, etc. Is there
	   any particular reason for this (maybe performance issues or code
	   compatibility issues etc.)?
	
	2. Even so, I tried sending an image to myself and noticed that the
	   command basically does not check if we are sending a text file or
	   not(though I think it should unless there is any key reason behind it).
	   On executing the command(when trying to send an image), it asks for the
	   encoding (that was odd as it did not ask for any of emails I have sent
           using the command). I entered the command:
	   'git send-email --to=shouryashukla.oo@gmail.com --subject=test_mail me.JPG'
	   which prompts:
	   'The following files are 8bit, but do not declare a Content-Transfer-Encoding.'
    	   'me.JPG'
	   'Which 8bit encoding should I declare [UTF-8]?'
	   So i enter the encoding as '8BIT', which at the end prompts:
	   'No subject line in me.JPG? at /usr/lib/git-core/git-send-email line 687.'
	   
	   Why is this happening even though I entered the subject in the command itself?
	3. I looked up at the script of the command and noticed that there are two files,
	   namely: 'git-send-email.perl' and 'git-send-email', both are identical except for
	   an extra 'use lib (split(/:/, $ENV{GITPERLLIB} || '/home/<<username>>/share/perl5'));'
	   on line 3 of 'git-send-email'(my inference is that we are trying to import the perl
	   library by splitting the addresses at '/' or something similar). What is the purpose
	   of the latter file?(I am new to Perl, if I am missing out on anything please forgive
	   my ignorance).

On an additional note, I noticed that there is a test file called 't9001-send-email.sh' which needs various style modernisations and maybe other changes too(I glanced at the file so I might have missed out on other improvements which could be made). ;-)

I would love to hear from the community what exactly is going on and if any improvements are possible in the command. :-)

Regards, Shourya Shukla

[1]: https://git-scm.com/docs/git-send-email
Next: Pratyush Yadav
Message 1 of 2 in “sending attachments via git send-email”
  1. Shourya ShuklaFeb 3, 2020
  2. Pratyush YadavFeb 3, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.