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

Re: [PATCH] Redirect cd output to /dev/null, was: git-clone seems dead

From
GLGreg Louis <glouis@dynamicro.on.ca>
Date
Sep 13, 2005, 11:07 UTC
Message-ID
<20050913110720.GA4826@athame.dynamicro.on.ca>
In-Reply-To
<7v3boaawra.fsf@assigned-by-dhcp.cox.net>
On 20050912 (Mon) at 1253:13 -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Greg Louis <glouis@dynamicro.on.ca> writes:
> 
> > Or (2+1==3) detect CDPATH in the same places as (1), complain with a
> > brief explanation ("don't export CDPATH; it's really only useful in
> > interactive shells") and unset it.
> 
> I like your wording above, so probably that is what is going to
> happen.  Thanks for the suggestion.
You're very welcome.
Show 10 quoted lines
> CDPATH has two problems.  1. It takes scripts to unexpected
> places (somebody had CDPATH=..:../..:$HOME and the "cd" in
> git-clone.sh:get_repo_base took him to $HOME/.git when he said
> "clone foo bar" to clone a repository in "foo" which had
> "foo/.git").  CDPATH mechanism does not implicitly give "." at
> the beginning of CDPATH, which is the most irritating part.
> 2. the extra echo when it does its thing.
> 
> I was under the impression that the patch fixed 2. without doing
> anything about 1., but I may be mistaken.

Oh, I agree entirely that unsetting CDPATH altogether is cleaner and more complete (and much less ugly) than putting &>/dev/null all over the place. I should have said something like, "My patch is _philosophically_ about equivalent to (1)" to make it clear I was referring to the context, ie the alternative approaches you had proposed.

-- 
| G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
|  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
|  http://wecanstopspam.org in signatures helps fight junk email. |
Previous: Junio C Hamano
Message 11 of 11 in “git-clone seems dead”
  1. Peter EriksenSep 11, 2005
  2. Junio C HamanoSep 11, 2005
  3. Greg LouisSep 11, 2005
  4. Redirect cd output to /dev/null, was: git-clone seems deadGreg Louis, Sep 11, 2005
  5. Junio C HamanoSep 12, 2005
  6. Peter EriksenSep 12, 2005
  7. Greg LouisSep 12, 2005
  8. Junio C HamanoSep 12, 2005
  9. Greg LouisSep 12, 2005
  10. Junio C HamanoSep 12, 2005
  11. Greg LouisSep 13, 2005

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.