From 1775451793b4538e27047dfdb2feec4b46b766a9 Mon Sep 17 00:00:00 2001 From: hpa Date: Wed, 28 Sep 2005 16:37:37 -0700 Subject: Options to compile on Cygwin --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9920467d9..55b06f276 100644 --- a/Makefile +++ b/Makefile @@ -172,6 +172,10 @@ ifeq ($(shell uname -s),SunOS) TAR = gtar PLATFORM_DEFINES += -D__EXTENSIONS__ endif +ifeq ($(shell uname -o),Cygwin) + NO_STRCASESTR = YesPlease + NEEDS_LIBICONV = YesPlease +endif ifneq (,$(findstring arm,$(shell uname -m))) ARM_SHA1 = YesPlease endif -- cgit v1.2.1 From 49744d63e9c5ffdfb4677bd3aaeafb3371c3fdc1 Mon Sep 17 00:00:00 2001 From: hpa Date: Wed, 28 Sep 2005 16:52:21 -0700 Subject: Call it NO_IPV6 rather than hard-coding __CYGWIN__ --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 55b06f276..be5c0a860 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,8 @@ # # Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3. # +# Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). +# # Define COLLISION_CHECK below if you believe that SHA1's # 1461501637330902918203684832716283019655932542976 hashes do not give you # sufficient guarantee that no collisions between objects will ever happen. @@ -97,7 +99,11 @@ SCRIPT_PYTHON = \ # The ones that do not have to link with lcrypto nor lz. SIMPLE_PROGRAMS = \ git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \ - git-daemon git-var + git-var +ifndef NO_IPV6 +# Not supported to IPv6-challenged platforms yet +SIMPLE_PROGRAMS += git-daemon +endif # ... and all the rest PROGRAMS = \ @@ -175,6 +181,7 @@ endif ifeq ($(shell uname -o),Cygwin) NO_STRCASESTR = YesPlease NEEDS_LIBICONV = YesPlease + NO_IPV6 = YesPlease endif ifneq (,$(findstring arm,$(shell uname -m))) ARM_SHA1 = YesPlease @@ -231,6 +238,9 @@ ifdef NO_STRCASESTR DEFINES += -Dstrcasestr=gitstrcasestr LIB_OBJS += compat/strcasestr.o endif +ifdef NO_IPV6 + DEFINES += -DNO_IPV6 +endif ifdef PPC_SHA1 SHA1_HEADER = "ppc/sha1.h" -- cgit v1.2.1 From 6573faff34eb002535843bbb59365be4ad58a120 Mon Sep 17 00:00:00 2001 From: Peter Anvin Date: Wed, 28 Sep 2005 17:26:44 -0700 Subject: NO_IPV6 support for git daemon --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index be5c0a860..218390396 100644 --- a/Makefile +++ b/Makefile @@ -239,7 +239,7 @@ ifdef NO_STRCASESTR LIB_OBJS += compat/strcasestr.o endif ifdef NO_IPV6 - DEFINES += -DNO_IPV6 + DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in endif ifdef PPC_SHA1 -- cgit v1.2.1 From dc4afa57ce3e07645690bec1e4c20ab59e8a9bd0 Mon Sep 17 00:00:00 2001 From: Peter Anvin Date: Wed, 28 Sep 2005 18:00:24 -0700 Subject: Remove *.exe for Cygwin's benefit --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 218390396..7ae12d882 100644 --- a/Makefile +++ b/Makefile @@ -395,7 +395,7 @@ deb: dist ### Cleaning rules clean: - rm -f *.o mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS) $(LIB_FILE) + rm -f *.o *.exe mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS) $(LIB_FILE) rm -f $(filter-out gitk,$(SCRIPTS)) rm -f git-core.spec *.pyc *.pyo rm -rf $(GIT_TARNAME) -- cgit v1.2.1 From a23cd8ece70262fac2a80ef3e454c1cf1c63605a Mon Sep 17 00:00:00 2001 From: Peter Anvin Date: Wed, 28 Sep 2005 19:08:37 -0700 Subject: Handle Cygwin .exe extensions --- Makefile | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7ae12d882..ff12fbf09 100644 --- a/Makefile +++ b/Makefile @@ -99,11 +99,7 @@ SCRIPT_PYTHON = \ # The ones that do not have to link with lcrypto nor lz. SIMPLE_PROGRAMS = \ git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \ - git-var -ifndef NO_IPV6 -# Not supported to IPv6-challenged platforms yet -SIMPLE_PROGRAMS += git-daemon -endif + git-var git-daemon # ... and all the rest PROGRAMS = \ @@ -182,6 +178,7 @@ ifeq ($(shell uname -o),Cygwin) NO_STRCASESTR = YesPlease NEEDS_LIBICONV = YesPlease NO_IPV6 = YesPlease + X = .exe endif ifneq (,$(findstring arm,$(shell uname -m))) ARM_SHA1 = YesPlease @@ -267,10 +264,13 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ gitk +PROGRAMS_X = $(patsubst %,%$(X),$(PROGRAMS)) +SIMPLE_PROGRAMS_X = $(patsubst %,%$(X),$(SIMPLE_PROGRAMS)) + export TAR INSTALL DESTDIR SHELL_PATH ### Build rules -all: $(PROGRAMS) $(SCRIPTS) +all: $(PROGRAMS_X) $(SCRIPTS) all: $(MAKE) -C templates @@ -304,30 +304,30 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py %.o: %.S $(CC) -o $*.o -c $(ALL_CFLAGS) $< -git-%: %.o $(LIB_FILE) +git-%$(X): %.o $(LIB_FILE) $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -git-mailinfo : SIMPLE_LIB += $(LIB_4_ICONV) -$(SIMPLE_PROGRAMS) : $(LIB_FILE) -$(SIMPLE_PROGRAMS) : git-% : %.o +git-mailinfo$(X) : SIMPLE_LIB += $(LIB_4_ICONV) +$(SIMPLE_PROGRAMS_X) : $(LIB_FILE) +$(SIMPLE_PROGRAMS_X) : git-%$(X) : %.o $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB) -git-http-fetch: fetch.o -git-local-fetch: fetch.o -git-ssh-fetch: rsh.o fetch.o -git-ssh-upload: rsh.o -git-ssh-pull: rsh.o fetch.o -git-ssh-push: rsh.o +git-http-fetch$(X): fetch.o +git-local-fetch$(X): fetch.o +git-ssh-fetch$(X): rsh.o fetch.o +git-ssh-upload$(X): rsh.o +git-ssh-pull$(X): rsh.o fetch.o +git-ssh-push$(X): rsh.o -git-http-fetch: LIBS += $(CURL_LIBCURL) -git-rev-list: LIBS += $(OPENSSL_LIBSSL) +git-http-fetch$(X): LIBS += $(CURL_LIBCURL) +git-rev-list$(X): LIBS += $(OPENSSL_LIBSSL) init-db.o: init-db.c $(CC) -c $(ALL_CFLAGS) \ -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c $(LIB_OBJS): $(LIB_H) -$(patsubst git-%,%.o,$(PROGRAMS)): $(LIB_H) +$(patsubst git-%$(X),%.o,$(PROGRAMS_X)): $(LIB_H) $(DIFF_OBJS): diffcore.h $(LIB_FILE): $(LIB_OBJS) @@ -342,10 +342,10 @@ doc: test: all $(MAKE) -C t/ all -test-date: test-date.c date.o +test-date$(X): test-date.c date.o $(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o -test-delta: test-delta.c diff-delta.o patch-delta.o +test-delta$(X): test-delta.c diff-delta.o patch-delta.o $(CC) $(ALL_CFLAGS) -o $@ $^ check: @@ -355,9 +355,9 @@ check: ### Installation rules -install: $(PROGRAMS) $(SCRIPTS) +install: $(PROGRAMS_X) $(SCRIPTS) $(INSTALL) -d -m755 $(DESTDIR)$(bindir) - $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir) + $(INSTALL) $(PROGRAMS_X) $(SCRIPTS) $(DESTDIR)$(bindir) $(INSTALL) git-revert $(DESTDIR)$(bindir)/git-cherry-pick $(MAKE) -C templates install $(INSTALL) -d -m755 $(DESTDIR)$(GIT_PYTHON_DIR) @@ -395,7 +395,7 @@ deb: dist ### Cleaning rules clean: - rm -f *.o *.exe mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS) $(LIB_FILE) + rm -f *.o mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS_X) $(LIB_FILE) rm -f $(filter-out gitk,$(SCRIPTS)) rm -f git-core.spec *.pyc *.pyo rm -rf $(GIT_TARNAME) -- cgit v1.2.1 From bb8c91d617e8a2ab4a78712086d1574da6e24e68 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 28 Sep 2005 23:31:18 -0700 Subject: Just explicitly add $(X) to most programs. --- Makefile | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ff12fbf09..97b584b41 100644 --- a/Makefile +++ b/Makefile @@ -98,31 +98,29 @@ SCRIPT_PYTHON = \ # The ones that do not have to link with lcrypto nor lz. SIMPLE_PROGRAMS = \ - git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \ - git-var git-daemon + git-get-tar-commit-id$(X) git-mailinfo$(X) git-mailsplit$(X) \ + git-stripspace$(X) git-var$(X) git-daemon$(X) # ... and all the rest PROGRAMS = \ - git-apply git-cat-file \ - git-checkout-index git-clone-pack git-commit-tree \ - git-convert-objects git-diff-files \ - git-diff-index git-diff-stages \ - git-diff-tree git-fetch-pack git-fsck-objects \ - git-hash-object git-init-db \ - git-local-fetch git-ls-files git-ls-tree git-merge-base \ - git-merge-index git-mktag git-pack-objects git-patch-id \ - git-peek-remote git-prune-packed git-read-tree \ - git-receive-pack git-rev-list git-rev-parse \ - git-send-pack git-show-branch \ - git-show-index git-ssh-fetch \ - git-ssh-upload git-tar-tree git-unpack-file \ - git-unpack-objects git-update-index git-update-server-info \ - git-upload-pack git-verify-pack git-write-tree \ - git-update-ref \ - $(SIMPLE_PROGRAMS) + git-apply$(X) git-cat-file$(X) git-checkout-index$(X) \ + git-clone-pack$(X) git-commit-tree$(X) git-convert-objects$(X) \ + git-diff-files$(X) git-diff-index$(X) git-diff-stages$(X) \ + git-diff-tree$(X) git-fetch-pack$(X) git-fsck-objects$(X) \ + git-hash-object$(X) git-init-db$(X) git-local-fetch$(X) \ + git-ls-files$(X) git-ls-tree$(X) git-merge-base$(X) \ + git-merge-index$(X) git-mktag$(X) git-pack-objects$(X) \ + git-patch-id$(X) git-peek-remote$(X) git-prune-packed$(X) \ + git-read-tree$(X) git-receive-pack$(X) git-rev-list$(X) \ + git-rev-parse$(X) git-send-pack$(X) git-show-branch$(X) \ + git-show-index$(X) git-ssh-fetch$(X) git-ssh-upload$(X) \ + git-tar-tree$(X) git-unpack-file$(X) git-unpack-objects$(X) \ + git-update-index$(X) git-update-server-info$(X) \ + git-upload-pack$(X) git-verify-pack$(X) git-write-tree$(X) \ + git-update-ref$(X) $(SIMPLE_PROGRAMS) # Backward compatibility -- to be removed in 0.99.8 -PROGRAMS += git-ssh-pull git-ssh-push +PROGRAMS += git-ssh-pull$(X) git-ssh-push$(X) PYMODULES = \ gitMergeCommon.py @@ -264,13 +262,10 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ gitk -PROGRAMS_X = $(patsubst %,%$(X),$(PROGRAMS)) -SIMPLE_PROGRAMS_X = $(patsubst %,%$(X),$(SIMPLE_PROGRAMS)) - export TAR INSTALL DESTDIR SHELL_PATH ### Build rules -all: $(PROGRAMS_X) $(SCRIPTS) +all: $(PROGRAMS) $(SCRIPTS) all: $(MAKE) -C templates @@ -308,8 +303,8 @@ git-%$(X): %.o $(LIB_FILE) $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) git-mailinfo$(X) : SIMPLE_LIB += $(LIB_4_ICONV) -$(SIMPLE_PROGRAMS_X) : $(LIB_FILE) -$(SIMPLE_PROGRAMS_X) : git-%$(X) : %.o +$(SIMPLE_PROGRAMS) : $(LIB_FILE) +$(SIMPLE_PROGRAMS) : git-%$(X) : %.o $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB) git-http-fetch$(X): fetch.o @@ -327,7 +322,7 @@ init-db.o: init-db.c -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c $(LIB_OBJS): $(LIB_H) -$(patsubst git-%$(X),%.o,$(PROGRAMS_X)): $(LIB_H) +$(patsubst git-%$(X),%.o,$(PROGRAMS)): $(LIB_H) $(DIFF_OBJS): diffcore.h $(LIB_FILE): $(LIB_OBJS) @@ -355,9 +350,9 @@ check: ### Installation rules -install: $(PROGRAMS_X) $(SCRIPTS) +install: $(PROGRAMS) $(SCRIPTS) $(INSTALL) -d -m755 $(DESTDIR)$(bindir) - $(INSTALL) $(PROGRAMS_X) $(SCRIPTS) $(DESTDIR)$(bindir) + $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir) $(INSTALL) git-revert $(DESTDIR)$(bindir)/git-cherry-pick $(MAKE) -C templates install $(INSTALL) -d -m755 $(DESTDIR)$(GIT_PYTHON_DIR) @@ -395,7 +390,7 @@ deb: dist ### Cleaning rules clean: - rm -f *.o mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS_X) $(LIB_FILE) + rm -f *.o mozilla-sha1/*.o ppc/*.o compat/*.o $(PROGRAMS) $(LIB_FILE) rm -f $(filter-out gitk,$(SCRIPTS)) rm -f git-core.spec *.pyc *.pyo rm -rf $(GIT_TARNAME) -- cgit v1.2.1 From fef1ef8e1b87f28f019bf973547644e41f4be7cd Mon Sep 17 00:00:00 2001 From: hpa Date: Thu, 29 Sep 2005 10:38:26 -0700 Subject: git-http-fetch needs $(X) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 97b584b41..1f4f31b53 100644 --- a/Makefile +++ b/Makefile @@ -190,7 +190,7 @@ ifndef NO_CURL else CURL_LIBCURL = -lcurl endif - PROGRAMS += git-http-fetch + PROGRAMS += git-http-fetch$(X) endif ifndef SHELL_PATH -- cgit v1.2.1 From 2f29dd521832540450610893319561a5a136b3fb Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 30 Sep 2005 10:46:25 -0700 Subject: Change $(X) -> $X to be less annoying. --- Makefile | 66 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8b152dd55..e5b8a51af 100644 --- a/Makefile +++ b/Makefile @@ -98,29 +98,29 @@ SCRIPT_PYTHON = \ # The ones that do not have to link with lcrypto nor lz. SIMPLE_PROGRAMS = \ - git-get-tar-commit-id$(X) git-mailinfo$(X) git-mailsplit$(X) \ - git-stripspace$(X) git-var$(X) git-daemon$(X) + git-get-tar-commit-id$X git-mailinfo$X git-mailsplit$X \ + git-stripspace$X git-var$X git-daemon$X # ... and all the rest PROGRAMS = \ - git-apply$(X) git-cat-file$(X) git-checkout-index$(X) \ - git-clone-pack$(X) git-commit-tree$(X) git-convert-objects$(X) \ - git-diff-files$(X) git-diff-index$(X) git-diff-stages$(X) \ - git-diff-tree$(X) git-fetch-pack$(X) git-fsck-objects$(X) \ - git-hash-object$(X) git-init-db$(X) git-local-fetch$(X) \ - git-ls-files$(X) git-ls-tree$(X) git-merge-base$(X) \ - git-merge-index$(X) git-mktag$(X) git-pack-objects$(X) \ - git-patch-id$(X) git-peek-remote$(X) git-prune-packed$(X) \ - git-read-tree$(X) git-receive-pack$(X) git-rev-list$(X) \ - git-rev-parse$(X) git-send-pack$(X) git-show-branch$(X) \ - git-show-index$(X) git-ssh-fetch$(X) git-ssh-upload$(X) \ - git-tar-tree$(X) git-unpack-file$(X) git-unpack-objects$(X) \ - git-update-index$(X) git-update-server-info$(X) \ - git-upload-pack$(X) git-verify-pack$(X) git-write-tree$(X) \ - git-update-ref$(X) $(SIMPLE_PROGRAMS) + git-apply$X git-cat-file$X git-checkout-index$X \ + git-clone-pack$X git-commit-tree$X git-convert-objects$X \ + git-diff-files$X git-diff-index$X git-diff-stages$X \ + git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \ + git-hash-object$X git-init-db$X git-local-fetch$X \ + git-ls-files$X git-ls-tree$X git-merge-base$X \ + git-merge-index$X git-mktag$X git-pack-objects$X \ + git-patch-id$X git-peek-remote$X git-prune-packed$X \ + git-read-tree$X git-receive-pack$X git-rev-list$X \ + git-rev-parse$X git-send-pack$X git-show-branch$X \ + git-show-index$X git-ssh-fetch$X git-ssh-upload$X \ + git-tar-tree$X git-unpack-file$X git-unpack-objects$X \ + git-update-index$X git-update-server-info$X \ + git-upload-pack$X git-verify-pack$X git-write-tree$X \ + git-update-ref$X $(SIMPLE_PROGRAMS) # Backward compatibility -- to be removed after 1.0 -PROGRAMS += git-ssh-pull$(X) git-ssh-push$(X) +PROGRAMS += git-ssh-pull$X git-ssh-push$X PYMODULES = \ gitMergeCommon.py @@ -190,7 +190,7 @@ ifndef NO_CURL else CURL_LIBCURL = -lcurl endif - PROGRAMS += git-http-fetch$(X) + PROGRAMS += git-http-fetch$X endif ifndef SHELL_PATH @@ -299,30 +299,30 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py %.o: %.S $(CC) -o $*.o -c $(ALL_CFLAGS) $< -git-%$(X): %.o $(LIB_FILE) +git-%$X: %.o $(LIB_FILE) $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -git-mailinfo$(X) : SIMPLE_LIB += $(LIB_4_ICONV) +git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV) $(SIMPLE_PROGRAMS) : $(LIB_FILE) -$(SIMPLE_PROGRAMS) : git-%$(X) : %.o +$(SIMPLE_PROGRAMS) : git-%$X : %.o $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB) -git-http-fetch$(X): fetch.o -git-local-fetch$(X): fetch.o -git-ssh-fetch$(X): rsh.o fetch.o -git-ssh-upload$(X): rsh.o -git-ssh-pull$(X): rsh.o fetch.o -git-ssh-push$(X): rsh.o +git-http-fetch$X: fetch.o +git-local-fetch$X: fetch.o +git-ssh-fetch$X: rsh.o fetch.o +git-ssh-upload$X: rsh.o +git-ssh-pull$X: rsh.o fetch.o +git-ssh-push$X: rsh.o -git-http-fetch$(X): LIBS += $(CURL_LIBCURL) -git-rev-list$(X): LIBS += $(OPENSSL_LIBSSL) +git-http-fetch$X: LIBS += $(CURL_LIBCURL) +git-rev-list$X: LIBS += $(OPENSSL_LIBSSL) init-db.o: init-db.c $(CC) -c $(ALL_CFLAGS) \ -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c $(LIB_OBJS): $(LIB_H) -$(patsubst git-%$(X),%.o,$(PROGRAMS)): $(LIB_H) +$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(DIFF_OBJS): diffcore.h $(LIB_FILE): $(LIB_OBJS) @@ -337,10 +337,10 @@ doc: test: all $(MAKE) -C t/ all -test-date$(X): test-date.c date.o +test-date$X: test-date.c date.o $(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o -test-delta$(X): test-delta.c diff-delta.o patch-delta.o +test-delta$X: test-delta.c diff-delta.o patch-delta.o $(CC) $(ALL_CFLAGS) -o $@ $^ check: -- cgit v1.2.1 From 039c6f162a63e9d91f360e2e6138e21a4015c543 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 30 Sep 2005 11:02:26 -0700 Subject: Better handling of exec extension in the git wrapper script --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e5b8a51af..38330c2e9 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,8 @@ all: git: git.sh Makefile rm -f $@+ $@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ - -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.sh >$@+ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + -e 's/@@X@@/$(X)/g' <$@.sh >$@+ chmod +x $@+ mv $@+ $@ -- cgit v1.2.1 From baaac6a7143ad07de62926421f8740cd640c241c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 2 Oct 2005 16:37:27 -0700 Subject: Post 0.99.8 master branch 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 92f0bda5e..25fd5cde8 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ # DEFINES += -DUSE_STDEV -GIT_VERSION = 0.99.8 +GIT_VERSION = 0.99.8.GIT CFLAGS = -g -O2 -Wall ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES) -- cgit v1.2.1 From c8c5b21a3714db3272f869c82f3ce862ed9c2cc6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 3 Oct 2005 16:05:50 -0700 Subject: [PATCH] Merging the Cygwin changes Fix mismerge typo. Signed-off-by: Junio C Hamano --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4ea6d9a71..133808c82 100644 --- a/Makefile +++ b/Makefile @@ -297,13 +297,9 @@ all: git: git.sh Makefile rm -f $@+ $@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ -<<<<<<< Makefile - -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ - -e 's/@@X@@/$(X)/g' <$@.sh >$@+ -======= -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + -e 's/@@X@@/$(X)/g' \ $(GIT_LIST_TWEAK) <$@.sh >$@+ ->>>>>>> .merge_file_3QHyD4 chmod +x $@+ mv $@+ $@ -- cgit v1.2.1 From 4514385edd913f6c10fa03c828effc5ba974369e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 3 Oct 2005 19:05:01 -0700 Subject: On Cygwin, use symbolic ref, not a symbolic link, to express .git/HEAD H. Peter Anvin says that Samba "promotes" symlinks to hardlinks while Cygwin itself uses .lnk files to emulate symlinks. Avoid using symbolic link for .git/HEAD on Cygwin. This does not help the symlinks recorded in trees as user data, but at least we do not use them for our own bookkeeping. Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 133808c82..0d3c27793 100644 --- a/Makefile +++ b/Makefile @@ -183,6 +183,7 @@ ifeq ($(shell uname -o),Cygwin) NEEDS_LIBICONV = YesPlease NO_IPV6 = YesPlease X = .exe + PLATFORM_DEFINES += -DUSE_SYMLINK_HEAD=0 endif ifneq (,$(findstring arm,$(shell uname -m))) ARM_SHA1 = YesPlease -- cgit v1.2.1 From 3ff8cbeda635422f4740d325d56288dfdea10179 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 4 Oct 2005 12:41:35 -0700 Subject: Record which tree the patch applies to. Also note which version of GIT produced the patch. Signed-off-by: Junio C Hamano --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0d3c27793..fd4e163ba 100644 --- a/Makefile +++ b/Makefile @@ -306,19 +306,24 @@ git: git.sh Makefile $(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh rm -f $@ - sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' $@.sh >$@ + sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.sh >$@ chmod +x $@ $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl rm -f $@ - sed -e '1s|#!.*perl|#!$(PERL_PATH)|' $@.perl >$@ + sed -e '1s|#!.*perl|#!$(PERL_PATH)|' \ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.perl >$@ chmod +x $@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py rm -f $@ sed -e '1s|#!.*python|#!$(PYTHON_PATH)|' \ -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR)|g' \ - $@.py >$@ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.py >$@ chmod +x $@ %.o: %.c -- cgit v1.2.1 From d1c5f2a42d7b5c0e3d3862212dea1f09809c4963 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 7 Oct 2005 03:44:18 -0700 Subject: Add git-am, applymbox replacement. It reorganizes the code and also has saner command line options syntax. Unlike git-applymbox, it can take more than one mailbox file from the command line, as well as reading from the standard input when '-' is specified. 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 fd4e163ba..1bdf4de75 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ SCRIPT_SH = \ git-repack.sh git-request-pull.sh git-reset.sh \ git-resolve.sh git-revert.sh git-sh-setup.sh git-status.sh \ git-tag.sh git-verify-tag.sh git-whatchanged.sh git.sh \ - git-applymbox.sh git-applypatch.sh \ + git-applymbox.sh git-applypatch.sh git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ git-merge-resolve.sh git-grep.sh -- cgit v1.2.1 From 730d48a2ef88a7fb7aa4409d40b1e6964a93267f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 8 Oct 2005 15:54:36 -0700 Subject: [PATCH] If NO_MMAP is defined, fake mmap() and munmap() Since some platforms do not support mmap() at all, and others do only just so, this patch introduces the option to fake mmap() and munmap() by malloc()ing and read()ing explicitely. Signed-off-by: Johannes Schindelin --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1bdf4de75..7ca77cf2a 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,8 @@ # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, # Patrick Mauritz). # +# Define NO_MMAP if you want to avoid mmap. +# # Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3. # # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). @@ -258,6 +260,10 @@ ifdef NO_STRCASESTR DEFINES += -Dstrcasestr=gitstrcasestr LIB_OBJS += compat/strcasestr.o endif +ifdef NO_MMAP + DEFINES += -Dmmap=gitfakemmap -Dmunmap=gitfakemunmap -DNO_MMAP + LIB_OBJS += compat/mmap.o +endif ifdef NO_IPV6 DEFINES += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in endif -- cgit v1.2.1 From d2b8593fd3754cf2e0b9a121fe6ba63bfefa3a47 Mon Sep 17 00:00:00 2001 From: Kai Ruemmler Date: Sat, 8 Oct 2005 15:54:37 -0700 Subject: make $prefix available for sub-makefiles exports $prefix and makes Documentation/Makefile following it also. Signed-off-by: Kai Ruemmler 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 7ca77cf2a..bcda94327 100644 --- a/Makefile +++ b/Makefile @@ -293,7 +293,7 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ gitk -export TAR INSTALL DESTDIR SHELL_PATH +export prefix TAR INSTALL DESTDIR SHELL_PATH ### Build rules all: $(PROGRAMS) $(SCRIPTS) -- cgit v1.2.1 From f7c153431b4049e7697664dee4a3d71013422f9d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 9 Oct 2005 12:52:35 -0700 Subject: Makefile: avoid error message from 'uname -o' The platform specific tweaking part was using 'uname -o' which is not always available. Squelch error message from it. It was suggested to chain the if..else, but I chose not to, because maintaining the nested if..else if..else..endif endif to match is a pain. If we had "elif", things would have been different, though. While we are at it, try not to invoke 'uname -s' for each platform candidate. Signed-off-by: Junio C Hamano --- Makefile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bcda94327..a20118739 100644 --- a/Makefile +++ b/Makefile @@ -166,11 +166,19 @@ LIBS += -lz # # Platform specific tweaks # -ifeq ($(shell uname -s),Darwin) + +# We choose to avoid "if .. else if .. else .. endif endif" +# because maintaining the nesting to match is a pain. If +# we had "elif" things would have been much nicer... +uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') +uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') + +ifeq ($(uname_S),Darwin) NEEDS_SSL_WITH_CRYPTO = YesPlease NEEDS_LIBICONV = YesPlease endif -ifeq ($(shell uname -s),SunOS) +ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease NEEDS_NSL = YesPlease SHELL_PATH = /bin/bash @@ -180,20 +188,20 @@ ifeq ($(shell uname -s),SunOS) TAR = gtar PLATFORM_DEFINES += -D__EXTENSIONS__ endif -ifeq ($(shell uname -o),Cygwin) +ifeq ($(uname_O),Cygwin) NO_STRCASESTR = YesPlease NEEDS_LIBICONV = YesPlease NO_IPV6 = YesPlease X = .exe PLATFORM_DEFINES += -DUSE_SYMLINK_HEAD=0 endif -ifneq (,$(findstring arm,$(shell uname -m))) - ARM_SHA1 = YesPlease -endif -ifeq ($(shell uname -s),OpenBSD) +ifeq ($(uname_S),OpenBSD) NEEDS_LIBICONV = YesPlease PLATFORM_DEFINES += -I/usr/local/include -L/usr/local/lib endif +ifneq (,$(findstring arm,$(uname_M))) + ARM_SHA1 = YesPlease +endif ifndef NO_CURL ifdef CURLDIR -- cgit v1.2.1 From eaf718f3ece277462de4e47391e5a965bbbaa297 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Mon, 10 Oct 2005 11:40:43 +0200 Subject: New: git-svnimport. As the name suggests, this script imports from SVN. Only "normal" SVN repositories (with single trunk/, branches/, and tags/ subdrectories) are supported. Incremental imports require preserving the file .git/svn2git. Signed-Off-by: Matthias Urlichs --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fd4e163ba..30fda9ec7 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,8 @@ SCRIPT_SH = \ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ - git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl + git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \ + git-svnimport-perl SCRIPT_PYTHON = \ git-merge-recursive.py -- cgit v1.2.1 From 4769948afe7c502d37746edc2ee2c084c9dcb325 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 10 Oct 2005 13:50:01 -0700 Subject: Deal with $(bindir) and friends with whitespaces. ... using HPA's shellquote macro. Signed-off-by: Junio C Hamano --- Makefile | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ac384c7dc..f7eee4708 100644 --- a/Makefile +++ b/Makefile @@ -163,6 +163,12 @@ LIB_OBJS = \ LIBS = $(LIB_FILE) LIBS += -lz +# Shell quote; +# Result of this needs to be placed inside '' +shq = $(subst ','\'',$(1)) +# This has surrounding '' +shellquote = '$(call shq,$(1))' + # # Platform specific tweaks # @@ -235,7 +241,7 @@ ifndef NO_OPENSSL OPENSSL_LINK = endif else - DEFINES += '-DNO_OPENSSL' + DEFINES += -DNO_OPENSSL MOZILLA_SHA1 = 1 OPENSSL_LIBSSL = endif @@ -294,7 +300,7 @@ endif endif endif -DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)' +DEFINES += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER)) SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.perl,%,$(SCRIPT_PERL)) \ @@ -311,7 +317,7 @@ all: git: git.sh Makefile rm -f $@+ $@ - sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ + sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ -e 's/@@X@@/$(X)/g' \ $(GIT_LIST_TWEAK) <$@.sh >$@+ @@ -320,22 +326,22 @@ git: git.sh Makefile $(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh rm -f $@ - sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ + sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ $@.sh >$@ chmod +x $@ $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl rm -f $@ - sed -e '1s|#!.*perl|#!$(PERL_PATH)|' \ + sed -e '1s|#!.*perl|#!$(call shq,$(PERL_PATH))|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ $@.perl >$@ chmod +x $@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py rm -f $@ - sed -e '1s|#!.*python|#!$(PYTHON_PATH)|' \ - -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR)|g' \ + sed -e '1s|#!.*python|#!$(call shq,$(PYTHON_PATH))|' \ + -e 's|@@GIT_PYTHON_PATH@@|$(call shq,$(GIT_PYTHON_DIR))|g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ $@.py >$@ chmod +x $@ @@ -365,7 +371,7 @@ git-rev-list$X: LIBS += $(OPENSSL_LIBSSL) init-db.o: init-db.c $(CC) -c $(ALL_CFLAGS) \ - -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c + -DDEFAULT_GIT_TEMPLATE_DIR=$(call shellquote,"$(template_dir)") $*.c $(LIB_OBJS): $(LIB_H) $(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) @@ -397,13 +403,13 @@ check: ### Installation rules install: $(PROGRAMS) $(SCRIPTS) - $(INSTALL) -d -m755 $(DESTDIR)$(bindir) - $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir) - $(INSTALL) git-revert $(DESTDIR)$(bindir)/git-cherry-pick - sh ./cmd-rename.sh $(DESTDIR)$(bindir) + $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir)) + $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(bindir)) + $(INSTALL) git-revert $(call shellquote,$(DESTDIR)$(bindir)/git-cherry-pick) + sh ./cmd-rename.sh $(call shellquote,$(DESTDIR)$(bindir)) $(MAKE) -C templates install - $(INSTALL) -d -m755 $(DESTDIR)$(GIT_PYTHON_DIR) - $(INSTALL) $(PYMODULES) $(DESTDIR)$(GIT_PYTHON_DIR) + $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR)) + $(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR)) install-doc: $(MAKE) -C Documentation install -- cgit v1.2.1 From 17712991a59824a8d22d5115c0c154d3122fc17b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 10 Oct 2005 16:31:08 -0700 Subject: Add ".git/config" file parser This is a first cut at a very simple parser for a git config file. The format of the file is a simple ini-file like thing, with simple variable/value pairs. You can (and should) make the variables have a simple single-level scope, ie a valid file looks something like this: # # This is the config file, and # a '#' or ';' character indicates # a comment # ; core variables [core] ; Don't trust file modes filemode = false ; Our diff algorithm [diff] external = "/usr/local/bin/gnu-diff -u" renames = true which parses into three variables: "core.filemode" is associated with the string "false", and "diff.external" gets the appropriate quoted value. Right now we only react to one variable: "core.filemode" is a boolean that decides if we should care about the 0100 (user-execute) bit of the stat information. Even that is just a parsing demonstration - this doesn't actually implement that st_mode compare logic itself. Different programs can react to different config options, although they should always fall back to calling "git_default_config()" on any config option name that they don't recognize. Signed-off-by: Linus Torvalds 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 0ca8e8d27..c31af7b3c 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ LIB_OBJS = \ object.o pack-check.o patch-delta.o path.o pkt-line.o \ quote.o read-cache.o refs.o run-command.o \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ - tag.o tree.o usage.o $(DIFF_OBJS) + tag.o tree.o usage.o config.o $(DIFF_OBJS) LIBS = $(LIB_FILE) LIBS += -lz -- cgit v1.2.1 From f2d6a256272b71f4509e4501a86a0f6c46ee65ad Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 11 Oct 2005 15:22:47 -0700 Subject: Support custom build options in config.mak With this patch, it is possible to store configuration options like NO_CURL=YesPlease or NO_OPENSSL=YesPlease into a file named config.mak, which will be included in the Makefile. [jc: redone with suggestion from Daniel Barkalow to just use -include] Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c31af7b3c..8697d52de 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,8 @@ ifneq (,$(findstring arm,$(uname_M))) ARM_SHA1 = YesPlease endif +-include config.mak + ifndef NO_CURL ifdef CURLDIR # This is still problematic -- gcc does not want -R. -- cgit v1.2.1 From ec2d15118bd6aa24e9323302e9aaa71dd54bc028 Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Tue, 11 Oct 2005 18:47:33 -0700 Subject: Export template_dir in Makefile. If somebody set template_dir in config.mak. Then git-init-db would be compiled with the correct location but the templates would be installed in the default location. Fix it. Signed-off-by: Tom Prince 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 8697d52de..d345c5d11 100644 --- a/Makefile +++ b/Makefile @@ -310,7 +310,7 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ gitk -export prefix TAR INSTALL DESTDIR SHELL_PATH +export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir ### Build rules all: $(PROGRAMS) $(SCRIPTS) -- cgit v1.2.1 From e1b10391eabdaaa4c89c53099dd96d5f9d978719 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 11 Oct 2005 18:47:34 -0700 Subject: Use git config file for committer name and email info This starts using the "user.name" and "user.email" config variables if they exist as the default name and email when committing. This means that you don't have to use the GIT_COMMITTER_EMAIL environment variable to override your email - you can just edit the config file instead. The patch looks bigger than it is because it makes the default name and email information non-static and renames it appropriately. And it moves the common git environment variables into a new library file, so that you can link against libgit.a and get the git environment without having to link in zlib and libcrypt. In short, most of it is renaming and moving, the real change core is just a few new lines in "git_default_config()" that copies the user config values to the new base. It also changes "git-var -l" to list the config variables. Signed-off-by: Linus Torvalds 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 d345c5d11..5e7d0555e 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ LIB_OBJS = \ object.o pack-check.o patch-delta.o path.o pkt-line.o \ quote.o read-cache.o refs.o run-command.o \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ - tag.o tree.o usage.o config.o $(DIFF_OBJS) + tag.o tree.o usage.o config.o environment.o $(DIFF_OBJS) LIBS = $(LIB_FILE) LIBS += -lz -- cgit v1.2.1 From 9cf6d3357aaaaa89dd86cc156221b7b604e9358c Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 12 Oct 2005 12:01:31 -0700 Subject: Add git-index-pack utility git-index-pack builds a pack index file for an existing packed archive. With this utility a packed archive which was transferred without the corresponding pack index can be added to objects/pack/ without repacking. Signed-off-by: Sergey Vlasov 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 5e7d0555e..7c8f6474a 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ PROGRAMS = \ git-convert-objects$X git-diff-files$X \ git-diff-index$X git-diff-stages$X \ git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \ - git-hash-object$X git-init-db$X \ + git-hash-object$X git-index-pack$X git-init-db$X \ git-local-fetch$X git-ls-files$X git-ls-tree$X git-merge-base$X \ git-merge-index$X git-mktag$X git-pack-objects$X git-patch-id$X \ git-peek-remote$X git-prune-packed$X git-read-tree$X \ -- cgit v1.2.1 From 8af12741ee0e35f43b3180b435cd33642c183e97 Mon Sep 17 00:00:00 2001 From: Martin Langhoff Date: Thu, 13 Oct 2005 10:47:42 -0700 Subject: Add findtags - reworked A short perl script that will walk the tag refs, tag objects, and even commit objects in its quest to figure out whether the given SHA1 (for a commit or tree) was ever tagged. This version is reworked incorporating sanity, feature and style fixes from Junio. Usage: git-findtags.perl [ -t ] Signed-off-by: Martin Langhoff 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 7c8f6474a..e2e87f6be 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,8 @@ SCRIPT_SH = \ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ - git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl + git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \ + git-findtags.perl SCRIPT_PYTHON = \ git-merge-recursive.py -- cgit v1.2.1 From 4546738b58a0134eef154231b07d60fc174d56e3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 13 Oct 2005 11:03:18 -0700 Subject: Unlocalized isspace and friends Do our own ctype.h, just to get the sane semantics: we want locale-independence, _and_ we want the right signed behaviour. Plus we only use a very small subset of ctype.h anyway (isspace, isalpha, isdigit and isalnum). 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 e2e87f6be..9fe65ba2b 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,8 @@ LIB_OBJS = \ object.o pack-check.o patch-delta.o path.o pkt-line.o \ quote.o read-cache.o refs.o run-command.o \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ - tag.o tree.o usage.o config.o environment.o $(DIFF_OBJS) + tag.o tree.o usage.o config.o environment.o ctype.o \ + $(DIFF_OBJS) LIBS = $(LIB_FILE) LIBS += -lz -- cgit v1.2.1 From 03feddd6e8e779086ac2d131ded325f8e5601653 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 13 Oct 2005 18:57:39 -0700 Subject: git-check-ref-format: reject funny ref names. Update check_ref_format() function to reject ref names that: * has a path component that begins with a ".", or * has a double dots "..", or * has ASCII control character, "~", "^", ":" or SP, anywhere, or * ends with a "/". Use it in 'git-checkout -b', 'git-branch', and 'git-tag' to make sure that newly created refs are well-formed. 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 9fe65ba2b..523985566 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ PROGRAMS = \ git-ssh-upload$X git-tar-tree$X git-unpack-file$X \ git-unpack-objects$X git-update-index$X git-update-server-info$X \ git-upload-pack$X git-verify-pack$X git-write-tree$X \ - git-update-ref$X git-symbolic-ref$X \ + git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \ $(SIMPLE_PROGRAMS) # Backward compatibility -- to be removed after 1.0 -- cgit v1.2.1 From f005dba7c15af5de74e05f8667da4e5d27cf6d1b Mon Sep 17 00:00:00 2001 From: Kalle Valo Date: Sun, 16 Oct 2005 19:37:25 +0200 Subject: Makefile entry for git-svnimport contained a small typo. Signed-Off-By: Matthias Urlichs --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 30fda9ec7..13b949b09 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ SCRIPT_SH = \ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \ - git-svnimport-perl + git-svnimport.perl SCRIPT_PYTHON = \ git-merge-recursive.py -- cgit v1.2.1 From 4eba0f3763e2f4bbf614c99ae3a5b299e8d61aff Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 20 Oct 2005 17:13:24 +0200 Subject: Make git-cherry-pick in target "all" Since git-cherry-pick is simply a copy of git-revert, it can be created before installing (so that it can be used without installing, too). Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5ee72bc92..903c57cda 100644 --- a/Makefile +++ b/Makefile @@ -310,7 +310,7 @@ DEFINES += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER)) SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ $(patsubst %.perl,%,$(SCRIPT_PERL)) \ $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ - gitk + gitk git-cherry-pick export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir ### Build rules @@ -351,6 +351,9 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py $@.py >$@ chmod +x $@ +git-cherry-pick: git-revert + cp $< $@ + %.o: %.c $(CC) -o $*.o -c $(ALL_CFLAGS) $< %.o: %.S @@ -410,7 +413,6 @@ check: install: $(PROGRAMS) $(SCRIPTS) $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir)) $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(bindir)) - $(INSTALL) git-revert $(call shellquote,$(DESTDIR)$(bindir)/git-cherry-pick) sh ./cmd-rename.sh $(call shellquote,$(DESTDIR)$(bindir)) $(MAKE) -C templates install $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR)) -- cgit v1.2.1 From ac1b3d1248f36b26c2eab55022b9a54bde36b1ee Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 20 Oct 2005 21:05:05 -0700 Subject: Split up tree diff functions into tree-diff.c library This makes the tree diff functionality independent of the "git-diff-tree" program, by splitting the core functionality up into a library file. This will be needed for when we teach git-rev-list to only follow a specified set of pathnames, rather than the global revision history. Most of it is a fairly straightforward code move, but it also involves some calling convention cleanup, and moving some of the static variables from diff-tree.c into the options structure. The actual tree change callback routines also become paramterized by the diff_options structure, allowing the library functionality to do something else than just show the diff on stdout. Right now the only user of this functionality remains git-diff-tree itself. Signed-off-by: Linus Torvalds 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 903c57cda..7eacf61b3 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ LIB_H = \ DIFF_OBJS = \ diff.o diffcore-break.o diffcore-order.o diffcore-pathspec.o \ - diffcore-pickaxe.o diffcore-rename.o + diffcore-pickaxe.o diffcore-rename.o tree-diff.o LIB_OBJS = \ blob.o commit.o connect.o count-delta.o csum-file.o \ -- cgit v1.2.1 From 1114b26e8f2d06912d855c631e51a4ee8a06c4e2 Mon Sep 17 00:00:00 2001 From: Josef Weidendorfer Date: Sun, 23 Oct 2005 18:15:34 +0200 Subject: Add git-mv It supersedes git-rename by adding functionality to move multiple files, directories or symlinks into another directory. It also provides according documentation. The implementation renames multiple files, using the arguments from the command line to produce an array of sources and destinations. In a first pass, all requested renames are checked for errors, and overwriting of existing files is only allowed with '-f'. The actual renaming is done in a second pass. This ensures that any error condition is checked before anything is changed. Signed-off-by: Josef Weidendorfer 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 7eacf61b3..5bdf3cc8d 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ SCRIPT_SH = \ SCRIPT_PERL = \ git-archimport.perl git-cvsimport.perl git-relink.perl \ git-rename.perl git-shortlog.perl git-fmt-merge-msg.perl \ - git-findtags.perl git-svnimport.perl + git-findtags.perl git-svnimport.perl git-mv.perl SCRIPT_PYTHON = \ git-merge-recursive.py -- cgit v1.2.1 From 35eb2d36418a25f9e956b116a622d8d99f4abad9 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 23 Oct 2005 14:30:45 -0700 Subject: Add git-shell. This adds a very git specific restricted shell, that can be added to /etc/shells and set to the pw_shell in the /etc/passwd file, to give users ability to push into repositories over ssh without giving them full interactive shell acount. [jc: I updated Linus' patch to match what the current sq_quote() does.] Signed-off-by: Linus Torvalds 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 5bdf3cc8d..5b0306d39 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ PROGRAMS = \ git-merge-index$X git-mktag$X git-pack-objects$X git-patch-id$X \ git-peek-remote$X git-prune-packed$X git-read-tree$X \ git-receive-pack$X git-rev-list$X git-rev-parse$X \ - git-send-pack$X git-show-branch$X \ + git-send-pack$X git-show-branch$X git-shell$X \ git-show-index$X git-ssh-fetch$X \ git-ssh-upload$X git-tar-tree$X git-unpack-file$X \ git-unpack-objects$X git-update-index$X git-update-server-info$X \ -- cgit v1.2.1 From f3123c4ab3d3698262e59561ac084de45b10365a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 22 Oct 2005 01:28:13 -0700 Subject: pack-objects: Allow use of pre-generated pack. git-pack-objects can reuse pack files stored in $GIT_DIR/pack-cache directory, when a necessary pack is found. This is hopefully useful when upload-pack (called from git-daemon) is expected to receive requests for the same set of objects many times (e.g full cloning request of any project, or updates from the set of heads previous day to the latest for a slow moving project). Currently git-pack-objects does *not* keep pack files it creates for reusing. It might be useful to add --update-cache option to it, which would allow it store pack files it created in the pack-cache directory, and prune rarely used ones from it. 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 5b0306d39..701067d43 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ LIB_OBJS = \ object.o pack-check.o patch-delta.o path.o pkt-line.o \ quote.o read-cache.o refs.o run-command.o \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ - tag.o tree.o usage.o config.o environment.o ctype.o \ + tag.o tree.o usage.o config.o environment.o ctype.o copy.o \ $(DIFF_OBJS) LIBS = $(LIB_FILE) -- cgit v1.2.1 From bd321bcc51e95f644ac5335abe673afcbcaade62 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 26 Oct 2005 15:10:20 +0200 Subject: Add git-name-rev git-name-rev tries to find nice symbolic names for commits. It does so by walking the commits from the refs. When the symbolic name is ambiguous, the following heuristic is applied: Try to avoid too many ~'s, and if two ambiguous names have the same count of ~'s, take the one whose last number is smaller. With "--tags", the names are derived only from tags. With "--stdin", the stdin is parsed, and after every sha1 for which a name could be found, the name is appended. (Try "git log | git name-rev --stdin".) Signed-off-by: Johannes Schindelin 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 701067d43..e76e6c4a3 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ PROGRAMS = \ git-unpack-objects$X git-update-index$X git-update-server-info$X \ git-upload-pack$X git-verify-pack$X git-write-tree$X \ git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \ - $(SIMPLE_PROGRAMS) + git-name-rev$X $(SIMPLE_PROGRAMS) # Backward compatibility -- to be removed after 1.0 PROGRAMS += git-ssh-pull$X git-ssh-push$X -- cgit v1.2.1 From 46774a81f9d6ca4d230d33757afe9dd07bfe398b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 29 Oct 2005 14:35:11 -0700 Subject: GIT 0.99.9 Done in 0.99.9 ============== Ports ~~~~~ * Cygwin port [HPA]. * OpenBSD build [Merlyn and others]. Fixes ~~~~~ * clone request over git native protocol from a repository with too many refs did not work; this has been fixed. * git-daemon got safer for kernel.org use [HPA]. * Extended SHA1 parser was not enforcing uniqueness for abbreviated SHA1; this has been fixed. * http transport does not barf on funny characters in URL. * The ref naming restrictions have been formalized and the coreish refuses to create funny refs; we still need to audit importers. See git-check-ref-format(1). New Features and Commands ~~~~~~~~~~~~~~~~~~~~~~~~~ * .git/config file as a per-repository configuration mechanism, and some commands understand it [Linus]. See git(7). * The core.filemode configuration item can be used to make us a bit more FAT friendly. See git(7). * The extended SHA1 notation acquired Peel-the-onion operator ^{type} and ^{}. See git-rev-parse(1). * SVN importer [Matthias]. See git-svnimport(1). * .git/objects/[0-9a-f]{2} directories are created on demand, and removed when becomes empty after prune-packed [Linus]. * Filenames output from various commands without -z option are quoted when they embed funny characters (TAB and LF) using C-style quoting within double-quotes, to match the proposed GNU diff/patch notation [me, but many people contributed in the discussion]. * git-mv is expected to be a better replacement for git-rename. While the latter has two parameter restriction, it acts more like the regular 'mv' that can move multiple things to one destinatino directory [Josef Weidendorfer]. * git-checkout can take filenames to revert the changes to them. See git-checkout(1) * The new program git-am is a replacement for git-applymbox that has saner command line options and a bit easier to use when a patch does not apply cleanly. * git-ls-remote can show unwrapped onions using ^{} notation, to help Cogito to track tags. * git-merge-recursive backend can merge unrelated projects. * git-clone over native transport leaves the result packed. * git-http-fetch issues multiple requests in parallel when underlying cURL library supports it [Nick and Daniel]. * git-fetch-pack and git-upload-pack try harder to figure out better common commits [Johannes]. * git-read-tree -u removes a directory when it makes it empty. * git-diff-* records abbreviated SHA1 names of original and resulting blob; this sometimes helps to apply otherwise an unapplicable patch by falling back to 3-way merge. * git-format-patch now takes series of from..to rev ranges and with '-m --stdout', writes them out to the standard output. This can be piped to 'git-am' to implement cheaper cherry-picking. * git-tag takes '-u' to specify the tag signer identity [Linus]. * git-rev-list can take optional pathspecs to skip commits that do not touch them (--dense) [Linus]. * Comes with new and improved gitk [Paulus and Linus]. 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 e76e6c4a3..7bccc76f1 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ # DEFINES += -DUSE_STDEV -GIT_VERSION = 0.99.8.GIT +GIT_VERSION = 0.99.9 CFLAGS = -g -O2 -Wall ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES) -- cgit v1.2.1 From c2d07d24e48fd7109ac4c717bcdc6b82609ece1a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 30 Oct 2005 17:27:38 -0800 Subject: GIT 0.99.9 master branch. 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 7bccc76f1..1163dda0f 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ # DEFINES += -DUSE_STDEV -GIT_VERSION = 0.99.9 +GIT_VERSION = 0.99.9.GIT CFLAGS = -g -O2 -Wall ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES) -- cgit v1.2.1