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 12, 2005, 16:36 UTC
Message-ID
<20050912163637.GA22018@athame.dynamicro.on.ca>
In-Reply-To
<7vbr2yfp0r.fsf@assigned-by-dhcp.cox.net>
On 20050912 (Mon) at 0529:08 -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Greg Louis <glouis@dynamicro.on.ca> writes:
> 
> > I could argue that it's a relatively harmless contribution to
> > robustness of the git scripts, but if someone replied that total
> > idiot-proofing isn't a worthwhile goal for a project of this sort, I   
> > wouldn't necessarily disagree.
> 
> We could:
> 
>  (0) do nothing and let people shoot in the foot themselves.
> 
>  (1) unset CDPATH silently while we run.  Most conveniently done
>      by doing so at the beginning of git-setup-sh, and scripts
>      that do not use the setup script but still does "cd".
> 
>  (2) detect CDPATH in the same places as (1), complain and die.

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. That way we'd educate, in a friendly way, people who thought they needed it for some reason, or who just never noticed their vendor's /etc/profile was exporting the damn thing.

> Among these, (1) would be naturally the approach of least
> resistance.  It would make things "just work" for everybody,

My patch was about the equivalent of (1), and (1) is what I'd feel was the most that git owes its users. Option (0) could be justified on the grounds that git users are presumably developers and ought to be able to catch that sort of blunder, but the facts that you didn't originally twig to it, and that it took me a couple of hours to find it independently, suggest that that's too cavalier an attitude (neither of us being a tyro). Option (3) does qualify as excess baggage IMHO, and option (2) as a bit unhelpfully pedantic.

> I would probably end up doing (1), though.
As would I if the decision were mine. 
(btw I'm on the list -- no Cc: needed)
-- 
| 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 HamanoNext: Junio C Hamano
Message 9 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.