~sircmpwn/sr.ht-discuss

4 4

git-send-email help

Ben Buhse <me@benbuhse.com>
Details
Message ID
<926D6BF3-9DA0-46E4-B3AA-E5169B77E297@benbuhse.com>
DKIM signature
missing
Download raw message
Hi, I’m trying to test my `git send-email` on Mac but I’m getting this issue:

```
~/email-test-drive master ⇡
❯ git send-email --to="~sircmpwn/email-test-drive@lists.sr.ht" HEAD^
zsh: no matches found: HEAD^

~/email-test-drive master ⇡
❯ git send-email --to="~sircmpwn/email-test-drive@lists.sr.ht" ^HEAD
README.md
ben-buhse
drew-devault
No subject line in README.md? at /Library/Developer/CommandLineTools
	/usr/libexec/git-core/git-send-email line 884.
```

I’m wondering if anyone has advice.

Thanks,
Ben
Cara Salter <cara@devcara.com>
Details
Message ID
<20230221182946.fhbcgtbfxyyom2ck@cerium>
In-Reply-To
<926D6BF3-9DA0-46E4-B3AA-E5169B77E297@benbuhse.com> (view parent)
DKIM signature
missing
Download raw message
Hi,

On Tue, Feb 21, 2023 at 12:25:45PM -0600, Ben Buhse wrote:
> Hi, I’m trying to test my `git send-email` on Mac but I’m getting this issue:
> 
> ```
> ~/email-test-drive master ⇡
> ❯ git send-email --to="~sircmpwn/email-test-drive@lists.sr.ht" HEAD^
> zsh: no matches found: HEAD^

On ZSH, you should double-quote (") HEAD^ to keep it from trying to do patterns.

Cara
Details
Message ID
<413219f5afe56af475eb9e85edf0ec23513222b1.camel@kararou.space>
In-Reply-To
<20230221182946.fhbcgtbfxyyom2ck@cerium> (view parent)
DKIM signature
missing
Download raw message
On Tue, 2023-02-21 at 13:29 -0500, Cara Salter wrote:
> Hi,
> 
> On Tue, Feb 21, 2023 at 12:25:45PM -0600, Ben Buhse wrote:
> > Hi, I’m trying to test my `git send-email` on Mac but I’m getting
> > this issue:
> > 
> > ```
> > ~/email-test-drive master ⇡
> > ❯ git send-email --to="~sircmpwn/email-test-drive@lists.sr.ht"
> > HEAD^
> > zsh: no matches found: HEAD^
> On ZSH, you should double-quote (") HEAD^ to keep it from trying to
> do patterns.


You can also disable extended globbing.  If ya aren't comfortable
editing your .zshrc by hand, you can rerun `zsh-newuser-install` or
simply rename your .zshrc to something else and it should run again
next time you open your terminal.  That's assuming that macOS doesn't
do something funny.

If you're comfortable editing your .zshrc, you can find the line that
reads `setopt extended_glob` and either comment it out or remove it
entirely.

Another option is to alias git so that extended globbing doesn't affect
it.  You would do that by adding the following line to your .zshrc:
alias git="noglob git"

Regards,
Ræn
Details
Message ID
<20230222094252.00007ec8@gmail.com>
In-Reply-To
<926D6BF3-9DA0-46E4-B3AA-E5169B77E297@benbuhse.com> (view parent)
DKIM signature
missing
Download raw message
As others have already pointed out, the problem is not with your git
command but with your zsh command.  Others have suggested ways to bend
zsh to your will, but I suggest you simply don't use zsh.  If you
weren't able to realize the problem was with zsh globbing, you aren't a
zsh power-user.  You should stick with a more de-facto solution, ala
bash.

If you _are_ a zsh power-user, then learn more about zsh.

--
Enan
3nan.ajmain@gmail.com
https://www.github.com/3N4N
Details
Message ID
<Y/XXdFtZkp2m15N3@t480>
In-Reply-To
<926D6BF3-9DA0-46E4-B3AA-E5169B77E297@benbuhse.com> (view parent)
DKIM signature
missing
Download raw message
On Tue, Feb 21, 2023 at 12:25:45PM -0600, Ben Buhse wrote:
> Hi, I’m trying to test my `git send-email` on Mac but I’m getting this issue:
> 
> ```
> ~/email-test-drive master ⇡
> ❯ git send-email --to="~sircmpwn/email-test-drive@lists.sr.ht" HEAD^
> zsh: no matches found: HEAD^
> 
> ~/email-test-drive master ⇡
> ❯ git send-email --to="~sircmpwn/email-test-drive@lists.sr.ht" ^HEAD
> README.md
> ben-buhse
> drew-devault
> No subject line in README.md? at /Library/Developer/CommandLineTools
> 	/usr/libexec/git-core/git-send-email line 884.
> ```
> 
> I’m wondering if anyone has advice.

JFTR, instead of HEAD^ you can use HEAD~ which works in zsh with
extended globbing enabled. They both mean the same.

You can also use @~ instead of HEAD~ if you are lazy. @ is a shortcut
for HEAD.

See man 1 git-rev-parse section SPECIFYING REVISIONS for all details.
Reply to thread Export thread (mbox)