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

Re: [PATCH] checkout-index needs a working tree

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2007, 00:55 UTC
Message-ID
<7vd4xww6mr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0708100129200.21857@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
> That is _completely_ expected.  If it is a bare repository, you can _only_ 
> override that check by GIT_WORK_TREE or --work-tree.
>
> But I have to wonder: if you want to use git checkout-index, which is a 
> work-tree operation, why did you mark it as bare to begin with?

I do not necessarily think --prefix=untar/it/here/ is a work tree operation.

Perhaps we probably are better off if we add something that says specifying GIT_DIR alone means you are at the top of work tree (to resurrect the traditional behaviour), to alleviate fallouts like this and the other cvsserver one? If one does not like that traditional behaviour, the new GIT_WORK_TREE support can be used override it.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 6 of 12 in “checkout-index needs a working tree”
  1. checkout-index needs a working treeJohannes Schindelin, Aug 4, 2007
  2. Junio C HamanoAug 4, 2007
  3. Johannes SchindelinAug 5, 2007
  4. Uwe Kleine-KönigAug 9, 2007
  5. Johannes SchindelinAug 10, 2007
  6. Junio C HamanoAug 10, 2007
  7. Johannes SchindelinAug 10, 2007
  8. Reinstate the old behaviour when GIT_DIR is set and GIT_WORK_TREE is unsetJunio C Hamano, Aug 10, 2007
  9. Uwe Kleine-KönigAug 10, 2007
  10. Junio C HamanoAug 10, 2007
  11. Junio C HamanoAug 11, 2007
  12. checkout-index doc: use --work-dir in the export exampleUwe Kleine-König, Aug 11, 2007

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.