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

Re: Some strange behavior of git

From
OPOlga Pshenichnikova <olga@ip-5.ru>
Date
Feb 25, 2016, 16:43 UTC
Message-ID
<56CF2F1C.9070803@ip-5.ru>
In-Reply-To
<20160225161409.GK1831@hank>
Thanx )
On 02/25/2016 07:14 PM, Thomas Gummerer wrote:
Show 42 quoted lines
> [Please keep everyone cc'd in the conversation, especially the mailing
> list.  I added it back for now.
> Also please don't top post on the list]
>
> On 02/25, Olga Pshenichnikova wrote:
>> No, it isn't empty, but I found the problem.
>> Problem was that I handled subdirectories structure in exclude file:
>>
>> design/dir1
>> design/dir2
>>
>> But
>>
>> design/dir3 wasn't ignored and wasn't controlled.
>>
>> So, my problem take place when some sub directory both isn't ignored AND
>> isn't controlled even if it isn't empty.
> I think that's a bug, I think this directory should only be removed if
> -x is given.  I haven't come up with a patch yet, but here's a test
> demonstrating the failure.
>
> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
> index 86ceb38..0961007 100755
> --- a/t/t7300-clean.sh
> +++ b/t/t7300-clean.sh
> @@ -653,4 +653,13 @@ test_expect_success 'git clean -d respects pathspecs (pathspec is prefix of dir)
>   	test_path_is_dir foobar
>   '
>
> +test_expect_failure 'git clean -d does not clean ignored files in subdir' '
> +	mkdir -p sub/dir &&
> +	>sub/dir/file &&
> +	test_when_finished rm .gitignore &&
> +	echo sub/dir/ >.gitignore &&
> +	git clean -df sub &&
> +	test_path_is_file sub/dir/file
> +'
> +
>   test_done
>
>
>> Thank you for response!
Previous: Thomas Gummerer
Message 6 of 6 in “Some strange behavior of git”
  1. Olga PshenichnikovaFeb 24, 2016
  2. Stefan BellerFeb 24, 2016
  3. Randall S. BeckerFeb 24, 2016
  4. Thomas GummererFeb 25, 2016
  5. Thomas GummererFeb 25, 2016
  6. Olga PshenichnikovaFeb 25, 2016

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.