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

Re: [BUG] git --work-tree=... status

From
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Date
Aug 17, 2007, 11:50 UTC
Message-ID
<20070817115051.GA11107@informatik.uni-freiburg.de>
In-Reply-To
<7vlkcgim5w.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
> Uwe Kleine-König  <ukleinek@informatik.uni-freiburg.de> writes:
> 
> > The problem seems to be that require_work_tree demands more that I think
> > it should.  It calls `git rev-parse --is-inside-work-tree`.
> 
> I think the semantics of require_work_tree is (currently and has
> been) indeed "you are supposed to be inside the work tree".
> 
> "git-status $args" is a "git commit --dry-run $args" and $args
> are often filenames relative to $cwd that name paths to include
> in the partial commit, so for this particular case I think it is
> understandable that it wants you to be _IN_ the work tree.

An (IMHO better) alternative is to introduce two flags---say --absolute-paths and --relative-paths. --relative-paths is the default if you're in a work tree, otherwise it's --absolute-paths.

Best regards Uwe

-- 
Uwe Kleine-König

fib where fib = 0 : 1 : zipWith (+) fib (tail fib)
Previous: Junio C Hamano
Message 3 of 3 in “[BUG] git --work-tree=... status”
  1. Uwe Kleine-KönigAug 12, 2007
  2. Junio C HamanoAug 12, 2007
  3. Uwe Kleine-KönigAug 17, 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.