From 71dfbf224ff980f4085f75868dc409118418731e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 9 Jan 2007 00:50:02 -0800 Subject: Make merge-base a built-in. Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 43113e9e16..eb88860bc9 100644 --- a/Makefile +++ b/Makefile @@ -194,7 +194,6 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ PROGRAMS = \ git-convert-objects$X git-fetch-pack$X git-fsck-objects$X \ git-hash-object$X git-index-pack$X git-local-fetch$X \ - git-merge-base$X \ git-daemon$X \ git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \ git-peek-remote$X git-receive-pack$X \ @@ -289,6 +288,7 @@ BUILTIN_OBJS = \ builtin-ls-tree.o \ builtin-mailinfo.o \ builtin-mailsplit.o \ + builtin-merge-base.o \ builtin-merge-file.o \ builtin-mv.o \ builtin-name-rev.o \ -- cgit v1.2.3 From 207dfa07919baba034291f1d5169f86272839d59 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 7 Feb 2007 10:37:03 -0800 Subject: Remove git-resolve. Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 40bdcff696..6a9431331a 100644 --- a/Makefile +++ b/Makefile @@ -172,7 +172,7 @@ SCRIPT_SH = \ git-merge-one-file.sh git-parse-remote.sh \ git-pull.sh git-rebase.sh \ git-repack.sh git-request-pull.sh git-reset.sh \ - git-resolve.sh git-revert.sh git-sh-setup.sh \ + git-revert.sh git-sh-setup.sh \ git-tag.sh git-verify-tag.sh \ git-applymbox.sh git-applypatch.sh git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ -- cgit v1.2.3 From 4cc41a16c15a6d73b13f9211eb8bf49ec869705f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 7 Feb 2007 17:03:46 -0800 Subject: Remove git-diff-stages. Signed-off-by: Junio C Hamano --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a9431331a..e38cb9f61c 100644 --- a/Makefile +++ b/Makefile @@ -280,7 +280,6 @@ BUILTIN_OBJS = \ builtin-diff.o \ builtin-diff-files.o \ builtin-diff-index.o \ - builtin-diff-stages.o \ builtin-diff-tree.o \ builtin-fmt-merge-msg.o \ builtin-for-each-ref.o \ -- cgit v1.2.3 From 4b02c5290e410e6bbb58b507942f722dff9d76a8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 13 Feb 2007 22:45:22 -0800 Subject: Makefile: update check-docs target Old aliases are not linked to the main command list. Also the internal git-add--interactive does not need to be on the list. Signed-off-by: Junio C Hamano --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 40bdcff696..dae2919965 100644 --- a/Makefile +++ b/Makefile @@ -939,11 +939,14 @@ check-docs:: case "$$v" in \ git-merge-octopus | git-merge-ours | git-merge-recursive | \ git-merge-resolve | git-merge-stupid | \ + git-add--interactive | git-fsck-objects | git-init-db | \ + git-repo-config | \ git-ssh-pull | git-ssh-push ) continue ;; \ esac ; \ test -f "Documentation/$$v.txt" || \ echo "no doc: $$v"; \ - grep -q "^gitlink:$$v\[[0-9]\]::" Documentation/git.txt || \ + sed -e '1,/^__DATA__/d' Documentation/cmd-list.perl | \ + grep -q "^$$v[ ]" || \ case "$$v" in \ git) ;; \ *) echo "no link: $$v";; \ -- cgit v1.2.3 From 6c510bee2013022fbce52f4b0ec0cc593fc0cc48 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 13 Feb 2007 11:07:23 -0800 Subject: Lazy man's auto-CRLF It currently does NOT know about file attributes, so it does its conversion purely based on content. Maybe that is more in the "git philosophy" anyway, since content is king, but I think we should try to do the file attributes to turn it off on demand. Anyway, BY DEFAULT it is off regardless, because it requires a [core] AutoCRLF = true in your config file to be enabled. We could make that the default for Windows, of course, the same way we do some other things (filemode etc). But you can actually enable it on UNIX, and it will cause: - "git update-index" will write blobs without CRLF - "git diff" will diff working tree files without CRLF - "git checkout" will write files to the working tree _with_ CRLF and things work fine. Funnily, it actually shows an odd file in git itself: git clone -n git test-crlf cd test-crlf git config core.autocrlf true git checkout git diff shows a diff for "Documentation/docbook-xsl.css". Why? Because we have actually checked in that file *with* CRLF! So when "core.autocrlf" is true, we'll always generate a *different* hash for it in the index, because the index hash will be for the content _without_ CRLF. Is this complete? I dunno. It seems to work for me. It doesn't use the filename at all right now, and that's probably a deficiency (we could certainly make the "is_binary()" heuristics also take standard filename heuristics into account). I don't pass in the filename at all for the "index_fd()" case (git-update-index), so that would need to be passed around, but this actually works fine. NOTE NOTE NOTE! The "is_binary()" heuristics are totally made-up by yours truly. I will not guarantee that they work at all reasonable. Caveat emptor. But it _is_ simple, and it _is_ safe, since it's all off by default. The patch is pretty simple - the biggest part is the new "convert.c" file, but even that is really just basic stuff that anybody can write in "Teaching C 101" as a final project for their first class in programming. Not to say that it's bug-free, of course - but at least we're not talking about rocket surgery here. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 40bdcff696..60496ff957 100644 --- a/Makefile +++ b/Makefile @@ -262,7 +262,8 @@ LIB_OBJS = \ revision.o pager.o tree-walk.o xdiff-interface.o \ write_or_die.o trace.o list-objects.o grep.o \ alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \ - color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o + color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \ + convert.o BUILTIN_OBJS = \ builtin-add.o \ -- cgit v1.2.3 From bc6b4f52fc79712db637ff90a472b82b32695e11 Mon Sep 17 00:00:00 2001 From: Jason Riedy Date: Mon, 19 Feb 2007 16:22:56 -0800 Subject: Add a compat/strtoumax.c for Solaris 8. Solaris 8 was pre-c99, and they weren't willing to commit to the strtoumax definition according to /usr/include/inttypes.h. This adds NO_STRTOUMAX and NO_STRTOULL for ancient systems. If NO_STRTOUMAX is defined, the routine in compat/strtoumax.c will be used instead. That routine passes its arguments to strtoull unless NO_STRTOULL is defined. If NO_STRTOULL, then the routine uses strtoul (unsigned long). Signed-off-by: Jason Riedy Acked-by: Shawn O Pearce Signed-off-by: Junio C Hamano --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dae2919965..f85fb7c197 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,10 @@ all:: # # Define NO_STRLCPY if you don't have strlcpy. # +# Define NO_STRTOUMAX if you don't have strtoumax in the C library. +# If your compiler also does not support long long or does not have +# strtoull, define NO_STRTOULL. +# # Define NO_SETENV if you don't have setenv in the C library. # # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. @@ -353,11 +357,13 @@ ifeq ($(uname_S),SunOS) NO_UNSETENV = YesPlease NO_SETENV = YesPlease NO_C99_FORMAT = YesPlease + NO_STRTOUMAX = YesPlease endif ifeq ($(uname_R),5.9) NO_UNSETENV = YesPlease NO_SETENV = YesPlease NO_C99_FORMAT = YesPlease + NO_STRTOUMAX = YesPlease endif INSTALL = ginstall TAR = gtar @@ -517,6 +523,13 @@ ifdef NO_STRLCPY COMPAT_CFLAGS += -DNO_STRLCPY COMPAT_OBJS += compat/strlcpy.o endif +ifdef NO_STRTOUMAX + COMPAT_CFLAGS += -DNO_STRTOUMAX + COMPAT_OBJS += compat/strtoumax.o +endif +ifdef NO_STRTOULL + COMPAT_CFLAGS += -DNO_STRTOULL +endif ifdef NO_SETENV COMPAT_CFLAGS += -DNO_SETENV COMPAT_OBJS += compat/setenv.o -- cgit v1.2.3 From 32043c9f8c60fc03b0b6a324c559d98094729323 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 14 Feb 2007 12:48:14 +0100 Subject: config: read system-wide defaults from /etc/gitconfig The settings in /etc/gitconfig can be overridden in ~/.gitconfig, which in turn can be overridden in .git/config. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 40bdcff696..203aac4517 100644 --- a/Makefile +++ b/Makefile @@ -124,6 +124,7 @@ prefix = $(HOME) bindir = $(prefix)/bin gitexecdir = $(bindir) template_dir = $(prefix)/share/git-core/templates/ +ETC_GITCONFIG = $(prefix)/etc/gitconfig # DESTDIR= # default configuration for gitweb @@ -584,6 +585,7 @@ endif # Shell quote (do not use $(call) to accommodate ancient setups); SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) +ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG)) DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) bindir_SQ = $(subst ','\'',$(bindir)) @@ -596,7 +598,8 @@ PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) LIBS = $(GITLIBS) $(EXTLIBS) -BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' $(COMPAT_CFLAGS) +BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ + -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $(COMPAT_CFLAGS) LIB_OBJS += $(COMPAT_OBJS) ALL_CFLAGS += $(BASIC_CFLAGS) -- cgit v1.2.3 From 4917d2a66e8fa8c40ea6082c0fd8b58492c9444e Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 21 Feb 2007 23:49:51 -0500 Subject: Include git-gui credits file in dist. The Makefile for the git-gui subproject will fail to execute if run outside of a git.git directory, such as when building from a .tar.gz or .tar.bz2. This is because it is looking for the credits file, which was created but omitted from the tarball by the toplevel Makefile. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f85fb7c197..64d29f7c18 100644 --- a/Makefile +++ b/Makefile @@ -895,7 +895,8 @@ dist: git.spec git-archive $(TAR) rf $(GIT_TARNAME).tar \ $(GIT_TARNAME)/git.spec \ $(GIT_TARNAME)/version \ - $(GIT_TARNAME)/git-gui/version + $(GIT_TARNAME)/git-gui/version \ + $(GIT_TARNAME)/git-gui/credits @rm -rf $(GIT_TARNAME) gzip -f -9 $(GIT_TARNAME).tar -- cgit v1.2.3 From 17e48368751ae8df7ed0332ae8ef900ce983fce6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 24 Feb 2007 18:18:22 -0800 Subject: Add test-chmtime: a utility to change mtime on files This is intended to be a portable replacement for our usage of date(1), touch(1), and Perl one-liners in tests. Usage: test-chtime (+|=|-|=+|=-) ..." '+' increments the mtime on the files by '-' decrements the mtime on the files by '=' sets the mtime on the file to exactly '=+' and '=-' sets the mtime on the file to after or before the current time. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e51b448c78..8a42be9bab 100644 --- a/Makefile +++ b/Makefile @@ -829,7 +829,7 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS export NO_SVN_TESTS -test: all +test: all test-chmtime$X $(MAKE) -C t/ all test-date$X: test-date.c date.o ctype.o @@ -844,6 +844,9 @@ test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS) test-sha1$X: test-sha1.o $(GITLIBS) $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) +test-chmtime$X: test-chmtime.c + $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $< + check-sha1:: test-sha1$X ./test-sha1.sh -- cgit v1.2.3