From patchwork Thu Oct 7 20:31:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_Scharfe?= X-Patchwork-Id: 12543053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1508C433FE for ; Thu, 7 Oct 2021 20:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8588660E9B for ; Thu, 7 Oct 2021 20:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242466AbhJGUdD (ORCPT ); Thu, 7 Oct 2021 16:33:03 -0400 Received: from mout.web.de ([212.227.15.4]:41557 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242444AbhJGUdB (ORCPT ); Thu, 7 Oct 2021 16:33:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1633638662; bh=WtfnCv1KZIYdkaFlgL0daUuQ3VdoWyCJIttjCI3WNgY=; h=X-UI-Sender-Class:Subject:To:References:Cc:From:Date:In-Reply-To; b=q5tuFAjhXYoPM/9s14tmIW5zH+PfZ3mCuy9b4rSrsSoLRD9zzSkP6MH4E5Q7IvaNX XmncRDZ6I6RHUEAYuGvmRqcJV7+TXi4hbOQVj32ZBaY03/0i3InosGS7uFDJAatMdO FmD7dE93drkeY5jxkV3CHkFxpjI2MdDkVPajejQE= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from Mini-von-Rene.fritz.box ([79.203.20.171]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MAdb9-1meNkE3oQl-00Bqiu; Thu, 07 Oct 2021 22:31:01 +0200 Subject: [PATCH 1/3] t3905: show failure to ignore sub-repo To: git@vger.kernel.org References: Cc: Junio C Hamano , Derrick Stolee , Robert Leftwich From: =?utf-8?q?Ren=C3=A9_Scharfe?= Message-ID: <079598e4-47fa-671e-0d1d-cf82039d861f@web.de> Date: Thu, 7 Oct 2021 22:31:01 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:AoMAhMXYM4I176PFMkxyqof+zaTwGPHUu5RV2BldGEXPg7Sq6X7 0rVs/UxFQ63lIw1V6pCgeDOOgFfjAT2T4Ze8I9LB8Oa+qfuscnk01zC3d04ViaWP6WOTAmx AfHA0roXT8Np6edmvpXOx4OQArvYrMTq5Ts/Jd8U/xA8C3DV5u3Oh2Ll4NQt6QS49jmYOYT cHZgLN+RMVTNuMVv6Vc9g== X-UI-Out-Filterresults: notjunk:1;V03:K0:5OrCNLV+K9Y=:rM09cCmjoy2o5VPxiQylKg ufgVwOps/rV9/EgDf1LPrq1rxCEDbiDSYQK8dyM1K8uCfMx0dbuewx8ybFFVrKcM4XxTY21xN kBRXGPWfFmv5xwETk5cUaaOzoCZ5yBeA40Usll1+VU5FoW7FdB8Aw2K9d924NP46Qnu+OQNf0 dCOH9JGAbbon97UL8i3Gc5JOlkMfsWptit3IQWxDxG5LXas6rDBCwFzIHKt5fCoRASMybZWgn 2VMnFJkpMelsgziOPaxMcxoTNz4uGjfe9r5VcRcUMv9GF39vbivjXa6Q6mKI4ziGEfR2c0YrV lJHkJ3pKFh+MkLIzProYTbovOgogkzPN5WeGQew/FsQH9XPrBBo0xeryhZP2KCLGjc+yhUWcT WnZ8haxIc6LBUaDx7KoSOD8S6wuZqQL6pHsOWGp1RUy6iKdZkRXNgaEfHs6QeSsp9pG6eZHq6 ylFrSj8x4oke/WVeZmKUDs1qOk6DpVuaPxEg+iQSMx6nOf9lT9Ht3lg18WB9yt/plUCWRE4Tp cZ8R7YjYBDIrVNdON0aybkVLVU04g1/F6hWS1TDYY3g0hnThFOH1AE+eXjk8VLfIGa6lrIOuT ZKKZYep42FtZ1WGT1WAT6W3Rfixsu/HPOuYGNKO9cYr5QWZFZfwyVrJUHXjXsSRjGSJHoJkRD AeCgVq74Pq3kBCtjHH3tIIGbg4X8GKksk2hj6QuK4CEgqmNAr7zGDvF+cjAzUNhL0pgY8mMLJ c88f+e3OK9C6+zYmhwXZQ8wDRt5xRF2Mjiuxup5ewKzz2c2p61HIanE5nxy5SlO5HPu/D/pXK oPN1z+786LW24UtcJTXzKss4Q0+qYDH721m+WX0MqUEeMM7w2ZK+bSFAmXU6OyiFJRUcJk723 Uww9/dTnzCcc+sU67Ph4QX1VhZI6togPDwUUyJsTF4nHMa6Dnl78BJtMVogqtqFurzByOVr7R fP5XEYK7i41jiGUKerxyajMHvqcwpnDv9tZfd/2zKe5EA85gYDeeahPex20brfGELqbgdgn1k dNB+mGMbGFe9KsAr8plZLAWdErONrM6pl71eE4wMHzcWQ8SYP0Vb7hdINDXGCxxNBg== Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "git stash" used to ignore sub-repositories until 6e773527b6 (sparse-index: convert from full to sparse, 2021-03-30). Add a test that demonstrates this regression. Reported-by: Robert Leftwich Signed-off-by: René Scharfe --- t/t3905-stash-include-untracked.sh | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.33.0 diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh index dd2cdcc114..19da46b7fb 100755 --- a/t/t3905-stash-include-untracked.sh +++ b/t/t3905-stash-include-untracked.sh @@ -422,4 +422,10 @@ test_expect_success 'stash show --{include,only}-untracked on stashes without un test_must_be_empty actual ' +test_expect_failure 'stash -u ignores sub-repository' ' + test_when_finished "rm -rf sub-repo" && + git init sub-repo && + git stash -u +' + test_done From patchwork Thu Oct 7 20:31:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_Scharfe?= X-Patchwork-Id: 12543055 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CAA9C433EF for ; Thu, 7 Oct 2021 20:31:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10E6660F22 for ; Thu, 7 Oct 2021 20:31:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242565AbhJGUdr (ORCPT ); Thu, 7 Oct 2021 16:33:47 -0400 Received: from mout.web.de ([212.227.15.3]:53035 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242542AbhJGUdo (ORCPT ); Thu, 7 Oct 2021 16:33:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1633638704; bh=Dakxct9u6oZluwVSzgunqgIzxAG9Bv7dPg7f31p+L0s=; h=X-UI-Sender-Class:Subject:To:References:Cc:From:Date:In-Reply-To; b=ZfMME7WUSdEPUh2GWqJ3doOz+oxTbNAaE6xnrNmCfJLCF4FMo82lIsb3MC2522SEk FW2HA9ExSFv2STeDLnovR94fZLxUFaEO8KVbuUbX4xVBXnq++WQ10/cgaXcsjdZIVG Omn7xkVMv8cAXyxSvP0gYrL1jvPM5MkhxskO36OM= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from Mini-von-Rene.fritz.box ([79.203.20.171]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MSs2H-1mONK12v6T-00Rrm0; Thu, 07 Oct 2021 22:31:44 +0200 Subject: [PATCH 2/3] read-cache: add verify_path_internal() To: git@vger.kernel.org References: Cc: Junio C Hamano , Derrick Stolee , Robert Leftwich From: =?utf-8?q?Ren=C3=A9_Scharfe?= Message-ID: Date: Thu, 7 Oct 2021 22:31:44 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:l5ggE6e1eN/2HSe7VtGEtjR/8aDzDXPwU2TTd7wPESMRceJiC7y jBXo+ZpAUo5QOwuqCsVk6U67NnJ52JnxErfy8/TdYju2DtQxaxnns78MPZEaZi+JPndgJVX rqHEhCXakFvGkB2fI81YNJv2h/D2OAF/V1e5TsaRJpTJjb8OLc9DuJYciVpXZcfGFL8Tq42 Yk8UDN6NCdCHPS2DXQm1Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:5k7ROhbIE1o=:iBIoo7UmHjBzGCQsY+nCCU bpre0pj7tCfI+Bzgn58pZB7BYVFN/lQj4zp+a2MRwkMwDFtC+nts2S2rZqvVRU7iNCFeu+bvm hA8P9RzERmIk2O7ztkxT1hdtn2egdCJZTPliVmHsAVvvfctMoSGO0jWLH/lmPW9ljxaIdwDoV OEGFDpW6Fruj+mIFVvZN6/VG+SX9SKUe6wUsZ9BkCaXEdORa/pOde8yNc8qK/BOeOrUoajaLy olwZ8oqHokyiPMgsIlBZoTifvtXwXNANWmRZvgXHJ4Jydw5159EJaiN3qoQN6onOfEQP/k8/B G+lMJKc7pLTOEfYqjSgdKuxu/jrw/Z1wpkTnzK/iVUDSiVLXZG43Ef8ZUvPpgQWsDI53ljx1A AaAeWBP/7LRWINbinALyD087MkLXcx9mBYKUvizUzArcPgJfzdK2rVr6vjJeyV603d58sI0w0 9/j+a0D7Y7Yz98FyAb9slIipWh4XXymthgK7c9/fZfYBmJkeLR0pAagppbO0TNwzPFMpHOvIG w51413D2mq9gQzMByRQqrgY5NUeBv42Tjrv+W1WODT3k+5mqP7+wgMfuxeLKfveD3/lgX0Dut w3pizCVCEMnRsD7vAbdqMa0UKBSbo1bWUErGR99Dd3ndwxDWDEgOMYqVXPSioSABTv4EByq2V rDpoN/yPyqWzsyx/W67qhTWRwSqPEVjlPN9Ldwc1BAAsGlcz/9AzF8NnwlaT4f4DwrJH4xqlm ro8LQ5DNFQeBurM99kf5vFOtVZ3aBz7kZK42R6AqtC4V7Syjj8Tl+kjhdGHqNiGk8D3ye5dQk nCJerlpILE1nwUe1Fgm/zKyiUL51i/lckcx9HFWaWBmOcKDars8SQpNO73LrEqYb+JFjgVRti 4gYQFSuw5ZbIkskzAOC80Qmm+lUl2cj16tGhjOcK+0tsJc4OiMz61tn5qs3xX6asnz/4k0k17 cTH5t/I5VJ0sL9tA/duKAFeJPdUzCwc+1qQmQIZ+saaNB97aoypv3+iC/Ef4esHu6kgDe5v1x Rh/8BxVJ/cjRKSvhajIgSDkQn1PGo3bP5g3esJTWj+EOcCWLJur8ukVA2QWw8AqN31y/JF/Ut 9REuuzY7U/PqwU= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Turn verify_path() into an internal function that distinguishes between valid paths and those with trailing directory separators and rename it to verify_path_internal(). Provide a wrapper with the old behavior under the old name. No functional change intended. The new function will be used in the next patch. Suggested-by: Junio C Hamano Signed-off-by: René Scharfe --- read-cache.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) -- 2.33.0 diff --git a/read-cache.c b/read-cache.c index b0a06db5c5..5b6fc08e46 100644 --- a/read-cache.c +++ b/read-cache.c @@ -849,6 +849,19 @@ struct cache_entry *make_empty_transient_cache_entry(size_t len, return xcalloc(1, cache_entry_size(len)); } +enum verify_path_result { + PATH_OK, + PATH_INVALID, + PATH_DIR_WITH_SEP, +}; + +static enum verify_path_result verify_path_internal(const char *, unsigned); + +int verify_path(const char *path, unsigned mode) +{ + return verify_path_internal(path, mode) != PATH_INVALID; +} + struct cache_entry *make_cache_entry(struct index_state *istate, unsigned int mode, const struct object_id *oid, @@ -993,60 +1006,62 @@ static int verify_dotfile(const char *rest, unsigned mode) return 1; } -int verify_path(const char *path, unsigned mode) +static enum verify_path_result verify_path_internal(const char *path, + unsigned mode) { char c = 0; if (has_dos_drive_prefix(path)) - return 0; + return PATH_INVALID; if (!is_valid_path(path)) - return 0; + return PATH_INVALID; goto inside; for (;;) { if (!c) - return 1; + return PATH_OK; if (is_dir_sep(c)) { inside: if (protect_hfs) { if (is_hfs_dotgit(path)) - return 0; + return PATH_INVALID; if (S_ISLNK(mode)) { if (is_hfs_dotgitmodules(path)) - return 0; + return PATH_INVALID; } } if (protect_ntfs) { #if defined GIT_WINDOWS_NATIVE || defined __CYGWIN__ if (c == '\\') - return 0; + return PATH_INVALID; #endif if (is_ntfs_dotgit(path)) - return 0; + return PATH_INVALID; if (S_ISLNK(mode)) { if (is_ntfs_dotgitmodules(path)) - return 0; + return PATH_INVALID; } } c = *path++; if ((c == '.' && !verify_dotfile(path, mode)) || is_dir_sep(c)) - return 0; + return PATH_INVALID; /* * allow terminating directory separators for * sparse directory entries. */ if (c == '\0') - return S_ISDIR(mode); + return S_ISDIR(mode) ? PATH_DIR_WITH_SEP : + PATH_INVALID; } else if (c == '\\' && protect_ntfs) { if (is_ntfs_dotgit(path)) - return 0; + return PATH_INVALID; if (S_ISLNK(mode)) { if (is_ntfs_dotgitmodules(path)) - return 0; + return PATH_INVALID; } } From patchwork Thu Oct 7 20:31:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_Scharfe?= X-Patchwork-Id: 12543063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B1E3C433F5 for ; Thu, 7 Oct 2021 20:32:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3562B60F22 for ; Thu, 7 Oct 2021 20:32:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242246AbhJGUeE (ORCPT ); Thu, 7 Oct 2021 16:34:04 -0400 Received: from mout.web.de ([212.227.15.14]:40353 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242624AbhJGUd5 (ORCPT ); Thu, 7 Oct 2021 16:33:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1633638719; bh=m6DIhPWVz1Bux0/ieEVCmXk1q0HC/M4bL+orY0KktCw=; h=X-UI-Sender-Class:Subject:To:References:Cc:From:Date:In-Reply-To; b=U40znknlYW9OvnVWTVxIvXwhH2bJQR9psnOTPwuWJrjjwpZVRlVnM7EIMcA/+UE5v 66ZNeQiqcQRqpJX1f0f2nSA2txIUvI8lLr0KlkFQSakUE73jGvrMkGZCvU6p6m2LCs Jm73xoipwr2d2FP9UQ8YK52oX/KIZR8gK1e7vMpQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from Mini-von-Rene.fritz.box ([79.203.20.171]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M6UiB-1mindk1Ltz-00yT4d; Thu, 07 Oct 2021 22:31:59 +0200 Subject: [PATCH 3/3] read-cache: let verify_path() reject trailing dir separators again To: git@vger.kernel.org References: Cc: Junio C Hamano , Derrick Stolee , Robert Leftwich From: =?utf-8?q?Ren=C3=A9_Scharfe?= Message-ID: <5e6fafa9-f155-61af-6906-05fec27808e6@web.de> Date: Thu, 7 Oct 2021 22:31:58 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:VV8hB4BVMMROHL7K0ISls4UPsD9AzMMJux1ul7Q7qKAas9QSndn fo0I5FeHOPq8H49h5FAsH8irsmtG4Lgh9rNSdXxlJd+3yLV2v5zTlquifZwJWmm5hoCaA30 TWLmerPOu6e82rwh83cne1s73ipPaiXE+MGZk5oBIDOAH+hEkPMkOJZcQHAs/Vt+CYjD9sO 84Xye6HsCEyc9HsOrpB6A== X-UI-Out-Filterresults: notjunk:1;V03:K0:UB44buz+v+Y=:bfEVECwbbCd9z86n/U1oRg rmM5T73MNLraMtneyEVdffhIG3cB+gGvDE1zF3jcpHsZSWUvekXw9XUmtvQuyLepeKMxlU8Ge PdNMVDVqdlRN2hcn/MMndR0mibH2tHbLzVgDDbwZjmhZzLhc5AOL8Z9CKthAgo981scuP//Oj X43U4DvTbeb3KEq7ZQm1ZBaYh8D+ZNfw6eavc71LhFD7B6yr8e1V+BEy91BnCRBwdQrf1aqPg mquqoGHAHndfBwCM9jcsf/l0byfxFf6o6lcVTwMXP6bMWC3FW4DuotBJvD3F2XvPbWQLyaUbB rSqT5KOCjz1GKZQlTFKIZB2ZpNXM5uPjNQ/Td9ohbxYkd+BbziOBUF+03JmMizxJrYAMM16QR gjHXLyZ2NOvOurpEHb9f7DJJ3ZyIWsLLGrKLWa6e3OTYmKYw2knpr3R/Yksj5R7AZSW8MpP3N Kcti799Z9zPGDzyy7lx7/6UNZoGPZpqljTCJuWob8Caav25d52EpQF+ho1p2VGcrtmyg+AE6t AlUktUYy2/GxYxeYlkZgrcsc3jNrIgN20raFQa3+exFCdr1p0uX5SiObTwJsuggTmEMJi/JAf 0Ovh4Z1cj2CAJEmV+nGciaPR3HeO10A2RsavupkzypLWh+Da17TtCBLVpqNTFlxVIoOwzOhbI PImHa/zvXUHmiz3sHgUN1xzP5E5GfYI97hXZvyliH/Ea/FT6qtE/i/ElY+z3uvsDfVL9XIpd4 UpYfGs08xOd5Po8hbciVQxhdq8ewiD+qIxVv7izl9ZSWH8JpV5Q/bt4sxprgaEjTkVvir0LdZ MA1XmEc9t6Ha1MiqzMxgYhw9TG5bEKXu8WWczO5RW+gh+wypD+d/g4QMNt+VjIndyFOTKPC1G f6Dw4Oi4EaNDeqPSoTyMhP5NhlW1y+VvE3DzmeKhDB8IZPhtTBvvcj907FcecPv1VaEc2wDUm dlJzQA20dsIKGIb18UJ5uFs7sUKff4T1qPVgm6Niad+5XAjupYun4VUPtFiFpRzKA52bsS1pR P/UJy/ApAhzXRHXzyCoMJ5kHAmmAdA/6ab9fMVhv1HWj6xiliDdAwC/Zv3xzkvCT3dAIx7WPj P9DplRimmvKF6w= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 6e773527b6 (sparse-index: convert from full to sparse, 2021-03-30) made verify_path() accept trailing directory separators for directories, which is necessary for sparse directory entries. This clemency causes "git stash" to stumble over sub-repositories, though, and there may be more unintended side-effects. Avoid them by restoring the old verify_path() behavior and accepting trailing directory separators only in places that are supposed to handle sparse directory entries. Signed-off-by: René Scharfe --- read-cache.c | 6 +++--- t/t3905-stash-include-untracked.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.33.0 diff --git a/read-cache.c b/read-cache.c index 5b6fc08e46..f1aabc47b6 100644 --- a/read-cache.c +++ b/read-cache.c @@ -859,7 +859,7 @@ static enum verify_path_result verify_path_internal(const char *, unsigned); int verify_path(const char *path, unsigned mode) { - return verify_path_internal(path, mode) != PATH_INVALID; + return verify_path_internal(path, mode) == PATH_OK; } struct cache_entry *make_cache_entry(struct index_state *istate, @@ -872,7 +872,7 @@ struct cache_entry *make_cache_entry(struct index_state *istate, struct cache_entry *ce, *ret; int len; - if (!verify_path(path, mode)) { + if (verify_path_internal(path, mode) == PATH_INVALID) { error(_("invalid path '%s'"), path); return NULL; } @@ -1364,7 +1364,7 @@ static int add_index_entry_with_check(struct index_state *istate, struct cache_e if (!ok_to_add) return -1; - if (!verify_path(ce->name, ce->ce_mode)) + if (verify_path_internal(ce->name, ce->ce_mode) == PATH_INVALID) return error(_("invalid path '%s'"), ce->name); if (!skip_df_check && diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh index 19da46b7fb..5390eec4e3 100755 --- a/t/t3905-stash-include-untracked.sh +++ b/t/t3905-stash-include-untracked.sh @@ -422,7 +422,7 @@ test_expect_success 'stash show --{include,only}-untracked on stashes without un test_must_be_empty actual ' -test_expect_failure 'stash -u ignores sub-repository' ' +test_expect_success 'stash -u ignores sub-repository' ' test_when_finished "rm -rf sub-repo" && git init sub-repo && git stash -u