git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
	Patrick Higgins <patrick133t@yahoo.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: wishlist: git gui not listing untracked files in unstaged list
Date: Thu, 11 Mar 2010 02:11:45 -0500	[thread overview]
Message-ID: <20100311071145.GA5919@sigill.intra.peff.net> (raw)
In-Reply-To: <4B9896D4.2020106@viscovery.net>

On Thu, Mar 11, 2010 at 08:08:04AM +0100, Johannes Sixt wrote:

> > It depends on the shell. Bash will expand it in _some_ cases (but not
> > this one). Dash never will:
> > 
> >   $ echo $BASH_VERSION
> >   4.1.0(1)-release
> >   $ echo foo=~/foo ;# expands
> >   foo=/home/peff/foo
> 
> This is wrong, FWIW. Tilde expansion must happen only at the beginning of
> a word or, when in an assignment, at the beginning of the assigned value
> or after any unquoted ':'. Note that in `echo foo=~/foo`, what looks like
> an assignment is *not* an assignment in POSIX shell lingo because it comes
> after the command name.

Thanks for the reference. I thought it was a bit funny when I wrote the
above, but just assumed it was implementation defined.

I think it doesn't change our outcome, though. Even though we cannot
rely on the shell to do such an expansion, it is still probably not sane
to assume ls-files will do it. Git's expansion is connected with the
config entry, not the use in ls-files, and it is git-gui's
responsibility to correctly expand as it reads the config.

-Peff

  reply	other threads:[~2010-03-11  7:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 19:43 wishlist: git gui not listing untracked files in unstaged list MALAISE Pascal
2010-03-10 19:59 ` Junio C Hamano
2010-03-10 20:07   ` Shawn O. Pearce
2010-03-10 20:57     ` MALAISE Pascal
2010-03-10 22:00     ` Patrick Higgins
2010-03-10 22:12       ` Jeff King
2010-03-10 22:14         ` Shawn O. Pearce
2010-03-10 22:30           ` Junio C Hamano
2010-03-10 22:32           ` Jeff King
2010-03-10 22:36             ` Jeff King
2010-03-11  7:08             ` Johannes Sixt
2010-03-11  7:11               ` Jeff King [this message]
2010-03-11 12:52               ` Andreas Schwab

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=20100311071145.GA5919@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=patrick133t@yahoo.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).