From: Michael J Gruber <git@drmicha•warpmail.net>
To: Git Mailing List <git@vger•kernel.org>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail•com>
Subject: [BUG] typo DWIMery with alias broken (cd to random dir)
Date: Tue, 26 Jan 2016 08:37:25 +0100 [thread overview]
Message-ID: <56A72235.9080602@drmicha.warpmail.net> (raw)
Hi there,
with current next (989ee58 plus local additions) it seems that typo
DWIMery with aliases is broken, see below.
It appears that the typo DWIMery is broken only when there is a unique
automatic DWIM substitution for a mistyped alias.
I haven't bisected yet, but I suspect this to be related to recent
changes regarding the environment in which commands/aliases are started
(though this happens without extra work trees), so I'm cc'ing an expert
in that area. Funny, though, that my user name shows up...
I think the reason is that git.c's handle_alias() (or something else)
calls restore_env() multiple times, and restore_env frees orig_cwd such
that subsequent restore_env(0) with external_alias=0 tries to cd to a
random location.
I have no idea whether orig_cwd=0 after freeing or something else would
be the proper fix.
Michael
LANG=C git sss
WARNING: You called a Git command named 'sss', which does not exist.
Continuing under the assumption that you meant 'ss'
in 2.0 seconds automatically...
fatal: could not move to git@drmicha•warpmail.net: No such file or directory
[mjg@skimbleshanks git]✗ LANG=C git ss
## HEAD (no branch)
?? a
?? a.patch
?? c2d.sh
[mjg@skimbleshanks git]✓ LANG=C git statu -sb
git: 'statu' is not a git command. See 'git --help'.
Did you mean one of these?
status
stage
stash
[mjg@skimbleshanks git]✗ LANG=C git statuss -sb
WARNING: You called a Git command named 'statuss', which does not exist.
Continuing under the assumption that you meant 'status'
in 2.0 seconds automatically...
## HEAD (no branch)
?? a
?? a.patch
?? c2d.sh
next reply other threads:[~2016-01-26 7:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 7:37 Michael J Gruber [this message]
2016-01-26 12:50 ` [BUG] typo DWIMery with alias broken (cd to random dir) Duy Nguyen
2016-01-26 13:26 ` [PATCH] git.c: fix help.autocorrect after 57ea712 breaks it Nguyễn Thái Ngọc Duy
2016-01-26 14:39 ` Michael J Gruber
2016-01-26 17:44 ` Junio C Hamano
2016-01-26 19:02 ` Junio C Hamano
2016-01-26 20:11 ` Junio C Hamano
2016-01-27 6:49 ` Junio C Hamano
2016-01-27 6:50 ` [PATCH 2/3] git: protect against unbalanced calls to {save,restore}_env() Junio C Hamano
2016-01-27 23:19 ` [PATCH v2 " Junio C Hamano
2016-01-27 6:52 ` [PATCH 3/3] git: simplify environment save/restore logic Junio C Hamano
2016-01-27 23:22 ` [PATCH v2 " Junio C Hamano
2016-01-27 23:47 ` Junio C Hamano
2016-01-27 9:14 ` [PATCH] git.c: fix help.autocorrect after 57ea712 breaks it Duy Nguyen
2016-01-27 12:01 ` Junio C Hamano
2016-01-27 23:18 ` [PATCH v2 1/3] git: remove an early return from save_env_before_alias() Junio C Hamano
2016-02-02 23:47 ` [PATCH v3 1/4] " Junio C Hamano
2016-02-02 23:47 ` [PATCH v3 2/4] git: protect against unbalanced calls to {save,restore}_env() Junio C Hamano
2016-02-02 23:48 ` [PATCH v3 3/4] git: simplify environment save/restore logic Junio C Hamano
2016-02-02 23:50 ` [PATCH v3 4/4] restore_env(): free the saved environment variable once we are done Junio C Hamano
2016-02-03 1:47 ` Eric Sunshine
2016-02-03 2:19 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A72235.9080602@drmicha.warpmail.net \
--to=git@drmicha$(echo .)warpmail.net \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox