From 021479ca7e8b46ad4c35e4f8c168d21bb2e79743 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Fri, 4 Oct 2019 18:46:29 +0000 Subject: [PATCH] Add simple git object detection --- magic/Magdir/git | 13 +++++++++++++ magic/Makefile.am | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 magic/Magdir/git diff --git a/magic/Magdir/git b/magic/Magdir/git new file mode 100644 index 00000000..4087fcd8 --- /dev/null +++ b/magic/Magdir/git @@ -0,0 +1,13 @@ + +#------------------------------------------------------------------------------ +# $File: git,v 1.1 2019/10/04 18:46:29 christos Exp $ +# git: file(1) magic for Git objects + +0 string blob\040 +>5 regex [0-9]+ Git blob %s + +0 string tree\040 +>5 regex [0-9]+ Git tree %s + +0 string commit\040 +>7 regex [0-9]+ Git commit %s diff --git a/magic/Makefile.am b/magic/Makefile.am index de746547..2c0dfc31 100644 --- a/magic/Makefile.am +++ b/magic/Makefile.am @@ -1,5 +1,5 @@ # -# $File: Makefile.am,v 1.148 2019/09/30 15:58:24 christos Exp $ +# $File: Makefile.am,v 1.149 2019/10/04 18:46:29 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -111,6 +111,7 @@ $(MAGIC_FRAGMENT_DIR)/gconv \ $(MAGIC_FRAGMENT_DIR)/geo \ $(MAGIC_FRAGMENT_DIR)/geos \ $(MAGIC_FRAGMENT_DIR)/gimp \ +$(MAGIC_FRAGMENT_DIR)/git \ $(MAGIC_FRAGMENT_DIR)/glibc \ $(MAGIC_FRAGMENT_DIR)/gnome \ $(MAGIC_FRAGMENT_DIR)/gnu \ -- 2.40.0