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

Re: git-send-email no longer works outside a repository?

From
BWBrandon Williams <bmwill@google.com>
Date
Jun 1, 2017, 23:00 UTC
Message-ID
<20170601230002.GB159608@google.com>
In-Reply-To
<CA+P7+xr39qk9qHE0=uU3HZE2wOhU9X7rmENoDfP=bp09j9N9Mg@mail.gmail.com>
On 06/01, Jacob Keller wrote:
Show 32 quoted lines
> I often use git-send-email in order to send patch files. Recently when
> I tried to do this outside a repository I got some cryptic failures,
> I'm using the master branch, git version 2.13.0.311.g0339965c70d6
> 
> I generate the patch files and copy them into a separate folder
> outside of the repository, and make sure everything looks good and
> write a cover letter, then I try to send them with
> 
> $git send-email --to=<address> 00*
> Can't call method "repo_path" on an undefined value at
> /home/jekeller/libexec/git-core/git-send-email line 1759.
> 
> Even weirder, if I move into the repository and try to send files
> which are outside, such as:
> 
> $git send-email --to=iwl<address> ../patches/00*
> fatal: /home/jekeller/git/patches/00*:
> '/home/jekeller/git/patches/00*' is outside repository
> format-patch -o /tmp/AZatqXB1uD /home/jekeller/git/patches/00*:
> command returned error: 128
> 
> I would expect that if you're outside a repository the command (as
> before) would alllow you to send files. It shouldn't strictly need to
> be inside a repository to function.
> 
> I found this first on pu, but as above, I checked out master and still
> seem to have the problem.
> 
> I'm working on a bisect now.
> 
> Thanks,
> Jake

This looks like it is due to '6489660b4 (origin/jt/send-email-validate-hook) send-email: support validate hook'. It's trying to look for a hook in a non-existent repository.

-- 
Brandon Williams
Previous: Jacob KellerNext: Junio C Hamano
Message 2 of 7 in “git-send-email no longer works outside a repository?”
  1. Jacob KellerJun 1, 2017
  2. Brandon WilliamsJun 1, 2017
  3. Junio C HamanoJun 1, 2017
  4. send-email: check for repo before invoking hookJonathan Tan, Jun 1, 2017
  5. Todd ZullingerJun 2, 2017
  6. Jacob KellerJun 2, 2017
  7. Junio C HamanoJun 2, 2017

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.