git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/4]
@ 2018-12-07 23:54 Stefan Beller
  2018-12-07 23:54 ` [PATCH 1/4] submodule update: add regression test with old style setups Stefan Beller
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Stefan Beller @ 2018-12-07 23:54 UTC (permalink / raw)
  To: git; +Cc: Stefan Beller

A couple days before the 2.19 release we had a bug report about
broken submodules[1] and reverted[2] the commits leading up to them.

The behavior of said bug fixed itself by taking a different approach[3],
specifically by a weaker enforcement of having `core.worktree` set in a
submodule [4].

The revert [2] was overly broad as we neared the release, such that we wanted
to rather keep the known buggy behavior of always having `core.worktree` set,
rather than figuring out how to fix the new bug of having 'git submodule update'
not working in old style repository setups.

This series re-introduces those reverted patches, with no changes in code,
but with drastically changed commit messages, as those focus on why it is safe
to re-introduce them instead of explaining the desire for the change.

[1] https://public-inbox.org/git/2659750.rG6xLiZASK@twilight
[2] f178c13fda (Revert "Merge branch 'sb/submodule-core-worktree'", 2018-09-07)
[3] 4d6d6ef1fc (Merge branch 'sb/submodule-update-in-c', 2018-09-17)
[4] 74d4731da1 (submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree, 2018-08-13)

Stefan Beller (4):
  submodule update: add regression test with old style setups
  submodule: unset core.worktree if no working tree is present
  submodule--helper: fix BUG message in ensure_core_worktree
  submodule deinit: unset core.worktree

 builtin/submodule--helper.c        |  4 +++-
 submodule.c                        | 14 ++++++++++++++
 submodule.h                        |  2 ++
 t/lib-submodule-update.sh          |  5 +++--
 t/t7400-submodule-basic.sh         |  5 +++++
 t/t7412-submodule-absorbgitdirs.sh |  7 ++++++-
 6 files changed, 33 insertions(+), 4 deletions(-)

-- 
2.20.0.rc2.403.gdbc3b29805-goog


^ permalink raw reply	[flat|nested] 22+ messages in thread
* Broken directory pathname pruning..
@ 2005-05-27  0:41 Linus Torvalds
  2005-05-27  6:41 ` [PATCH] Diff updates, fixing pathspec and rename/copy interaction Junio C Hamano
  0 siblings, 1 reply; 22+ messages in thread
From: Linus Torvalds @ 2005-05-27  0:41 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List


The directory-based pathname pruning doesn't work any more.

I used to just say

	git-whatchanged -v -p drivers/usb/

and I just noticed that it doesn't work any more.

It _does_ work if I leave the final '/' off the thing.

diff-tree itself does this right: that's shown by the fact that with the
slash in place, we still do get the right _changelog_ that is restricted
to drivers/usb changes, but the diffs themselves are missing.

So it seems to be purely "diffcore_pathspec()" that is broken.

Btw, I don't think we should call "diffcore_pathspec()" at all in
diff-tree, because diff-tree already handles "interesting" paths correctly
(and has to do so for performance reasons, since it's not acceptable to
expand all the trees and diff them).

So in the "git-whatchanged"  case the fix is as simple as just removing
those two lines, but the bug then continues to exist in the other *diff* 
programs..

Junio?

		Linus

diff --git a/diff-tree.c b/diff-tree.c
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -268,8 +268,6 @@ static int call_diff_flush(void)
 		diff_flush(DIFF_FORMAT_NO_OUTPUT, 0);
 		return 0;
 	}
-	if (nr_paths)
-		diffcore_pathspec(paths);
 	if (header) {
 		if (diff_output_format == DIFF_FORMAT_MACHINE) {
 			const char *ep, *cp;


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-12-28 20:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 23:54 [PATCH 0/4] Stefan Beller
2018-12-07 23:54 ` [PATCH 1/4] submodule update: add regression test with old style setups Stefan Beller
2018-12-09  0:11   ` Junio C Hamano
2018-12-07 23:54 ` [PATCH 2/4] submodule: unset core.worktree if no working tree is present Stefan Beller
2018-12-08  6:44   ` Junio C Hamano
2018-12-07 23:54 ` [PATCH 3/4] submodule--helper: fix BUG message in ensure_core_worktree Stefan Beller
2018-12-08  6:55   ` Junio C Hamano
2018-12-12 22:46     ` Stefan Beller
2018-12-13  3:14       ` Junio C Hamano
2018-12-07 23:54 ` [PATCH 4/4] submodule deinit: unset core.worktree Stefan Beller
2018-12-08  7:03   ` Junio C Hamano
2018-12-08  5:57 ` [PATCH 0/4] Junio C Hamano
2018-12-12 22:35   ` Stefan Beller
2018-12-13  3:15     ` Junio C Hamano
2018-12-14 23:59   ` [PATCH 0/4] submodules: unset core.worktree when no working tree present Stefan Beller
2018-12-14 23:59     ` [PATCH 1/4] submodule update: add regression test with old style setups Stefan Beller
2018-12-26 18:21       ` Junio C Hamano
2018-12-14 23:59     ` [PATCH 2/4] submodule: unset core.worktree if no working tree is present Stefan Beller
2018-12-26 18:27       ` Junio C Hamano
2018-12-14 23:59     ` [PATCH 3/4] submodule--helper: fix BUG message in ensure_core_worktree Stefan Beller
2018-12-14 23:59     ` [PATCH 4/4] submodule deinit: unset core.worktree Stefan Beller
  -- strict thread matches above, loose matches on Subject: below --
2005-05-27  0:41 Broken directory pathname pruning Linus Torvalds
2005-05-27  6:41 ` [PATCH] Diff updates, fixing pathspec and rename/copy interaction Junio C Hamano
2005-05-27 15:56   ` Linus Torvalds
2005-05-27 22:43     ` [PATCH 00/12] Diff updates Junio C Hamano
2005-05-27 23:03       ` Junio C Hamano
2005-05-28 10:11         ` [PATCH] Do not show empty diff in diff-cache uncached Junio C Hamano
2005-05-29 18:53           ` Linus Torvalds
2005-05-29 20:09             ` Junio C Hamano
2005-05-29 21:52               ` Junio C Hamano
2005-05-29 23:41                 ` [PATCH 0/3] Leftover bits after 12-series Junio C Hamano
2005-05-30  6:58                   ` [PATCH 0/4] Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).