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

Re: git stash takes excessively long when many untracked files present

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 13, 2013, 21:47 UTC
Message-ID
<7v61v9w9dy.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vmwolwk94.fsf@alter.siamese.dyndns.org>
[administrivia: people on the original thread added back on CC]
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> Anders Darander <anders.darander@gmail.com> writes:
>
>>>> Do anyone have any better idea on how to approach this?
>>>
>>>Teaching "ls-files" to leave early once it seens even a single
>>>output is probably a possibility.
>>
>> Would that mean that we're able to fail early?
>
> Heh, good point.  "Leave once you find one path" does not help the
> most common "sane" case where you do not kill any path, so it does
> not help us at all.

In any case, this is a regression introduced in 'master' since the last release, and the attempted fix was for an issue that has long been with us, so I'll revert a7365313 (git stash: avoid data loss when "git stash save" kills a directory, 2013-06-28) soon. For today's -rc3, I'm already deep into the integration cycle, so it is too late to do the revert it and then redo everything.

Then we will plan to re-apply the patch once "ls-files --killed" gets fixed not to waste too much cycles needlessly, after the coming release.

Thanks for a report and discussion.
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 15 in “git stash takes excessively long when many untracked files present”
  1. Josh TriplettAug 10, 2013
  2. Anders DaranderAug 13, 2013
  3. Junio C HamanoAug 13, 2013
  4. Anders DaranderAug 13, 2013
  5. Junio C HamanoAug 13, 2013
  6. Junio C HamanoAug 13, 2013
  7. Junio C HamanoAug 15, 2013
  8. Josh TriplettAug 15, 2013
  9. Junio C HamanoAug 15, 2013
  10. Junio C HamanoAug 15, 2013
  11. 0/3 Optimizing "ls-files -k"Junio C Hamano, Aug 15, 2013
  12. 1/3 dir.c: use the cache_* macro to access the current indexJunio C Hamano, Aug 15, 2013
  13. 2/3 ls-files -k: a directory only can be killed if the index has a non-directoryJunio C Hamano, Aug 15, 2013
  14. 3/3 t3010: update to demonstrate "ls-files -k" optimization pitfallsJunio C Hamano, Aug 15, 2013
  15. 4/3 git stash: avoid data loss when "git stash save" kills a directoryJunio C Hamano, Aug 15, 2013

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.