git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] range-diff: allow to diff files regardless submodule
@ 2018-10-10 15:09 Lucas De Marchi
  2018-10-11  0:02 ` brian m. carlson
  2018-10-11  7:42 ` Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 17+ messages in thread
From: Lucas De Marchi @ 2018-10-10 15:09 UTC (permalink / raw)
  To: git
  Cc: Johannes Schindelin, Thomas Gummerer, Eric Sunshine,
	Junio C Hamano, lucas.de.marchi

Do like it's done in grep so mode doesn't end up as
0160000, which means range-diff doesn't work if one has
"submodule.diff = log" in the configuration. Without this
while using range-diff I only get a

    Submodule a 0000000...0000000 (new submodule)

instead of the diff between the revisions.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 range-diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/range-diff.c b/range-diff.c
index 60edb2f518..bd8083f2d1 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -354,7 +354,7 @@ static struct diff_filespec *get_filespec(const char *name, const char *p)
 {
 	struct diff_filespec *spec = alloc_filespec(name);
 
-	fill_filespec(spec, &null_oid, 0, 0644);
+	fill_filespec(spec, &null_oid, 0, 0100644);
 	spec->data = (char *)p;
 	spec->size = strlen(p);
 	spec->should_munmap = 0;
-- 
2.19.1.1.g8c3cf03f71


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

end of thread, other threads:[~2018-10-24 19:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 15:09 [PATCH] range-diff: allow to diff files regardless submodule Lucas De Marchi
2018-10-11  0:02 ` brian m. carlson
2018-10-11  7:50   ` Lucas De Marchi
2018-10-12  9:24     ` Johannes Schindelin
2018-10-12 23:17       ` brian m. carlson
2018-10-11  7:42 ` Ævar Arnfjörð Bjarmason
2018-10-11  8:14   ` Lucas De Marchi
2018-10-11  8:17     ` [PATCH v2] " Lucas De Marchi
2018-10-12  9:26       ` Johannes Schindelin
2018-10-11  8:25   ` [PATCH] " Junio C Hamano
2018-10-23 14:07     ` Lucas De Marchi
2018-10-24  2:12       ` Junio C Hamano
2018-10-24  2:43         ` Lucas De Marchi
2018-10-24  5:12           ` Junio C Hamano
2018-10-24  5:18             ` Junio C Hamano
2018-10-24 17:19               ` Lucas De Marchi
2018-10-24 19:46               ` [PATCH v3] range-diff: allow to diff files regardless of submodule config Lucas De Marchi

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).