Skip to content

Commit

Permalink
Add a new merge strategy by Fredrik Kuivinen.
Browse files Browse the repository at this point in the history
I really wanted to try this out, instead of asking for an adjustment
to the 'git merge' driver and waiting.  For now the new strategy is
called 'fredrik' and not in the list of default strategies to be tried.

The script wants Python 2.4 so this commit also adjusts Debian and RPM
build procecure files.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Sep 11, 2005
1 parent 0f69be5 commit 720d150
Show file tree
Hide file tree
Showing 9 changed files with 741 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ git-mailinfo
git-mailsplit
git-merge
git-merge-base
git-merge-fredrik
git-merge-index
git-merge-octopus
git-merge-one-file
Expand Down
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES)
prefix = $(HOME)
bindir = $(prefix)/bin
template_dir = $(prefix)/share/git-core/templates/
GIT_PYTHON_DIR = $(prefix)/share/git-core/python
# DESTDIR=

CC = gcc
Expand Down Expand Up @@ -81,6 +82,9 @@ SCRIPT_PERL = \
git-archimport.perl git-cvsimport.perl git-relink.perl \
git-rename.perl git-shortlog.perl

SCRIPT_PYTHON = \
git-merge-fredrik.py

# 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 \
Expand All @@ -105,6 +109,9 @@ PROGRAMS = \
git-upload-pack git-verify-pack git-write-tree \
$(SIMPLE_PROGRAMS)

PYMODULES = \
gitMergeCommon.py

ifdef WITH_SEND_EMAIL
SCRIPT_PERL += git-send-email.perl
endif
Expand Down Expand Up @@ -150,6 +157,9 @@ endif
ifndef PERL_PATH
PERL_PATH = /usr/bin/perl
endif
ifndef PYTHON_PATH
PYTHON_PATH = /usr/bin/python
endif

ifndef NO_OPENSSL
LIB_OBJS += epoch.o
Expand Down Expand Up @@ -189,7 +199,9 @@ endif
DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'

SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) gitk
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
$(patsubst %.py,%,$(SCRIPT_PYTHON)) \
gitk

### Build rules

Expand All @@ -214,6 +226,13 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl
sed -e '1s|#!.*perl|#!$(PERL_PATH)|' $@.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 >$@
chmod +x $@

%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
%.o: %.S
Expand Down Expand Up @@ -274,6 +293,8 @@ install: $(PROGRAMS) $(SCRIPTS)
$(INSTALL) git-revert $(DESTDIR)$(bindir)/git-cherry-pick
sh ./cmd-rename.sh $(DESTDIR)$(bindir)
$(MAKE) -C templates install
$(INSTALL) -m755 -d $(DESTDIR)$(GIT_PYTHON_DIR)
$(INSTALL) $(PYMODULES) $(DESTDIR)$(GIT_PYTHON_DIR)

install-doc:
$(MAKE) -C Documentation install
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Standards-Version: 3.6.1
Package: git-core
Architecture: any
Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, patch, rcs
Recommends: rsync, curl, ssh, libmail-sendmail-perl, libemail-valid-perl
Recommends: rsync, curl, ssh, libmail-sendmail-perl, libemail-valid-perl, python (>= 2.4.0)
Suggests: cogito
Conflicts: git, cogito (<< 0.13)
Description: The git content addressable filesystem
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
build: debian/build-stamp
debian/build-stamp:
dh_testdir
$(MAKE) prefix=$(PREFIX) all doc
$(MAKE) prefix=$(PREFIX) PYTHON_PATH=/usr/bin/python2.4 all doc
touch debian/build-stamp

debian-clean:
Expand Down
2 changes: 1 addition & 1 deletion git-core.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ URL: http://kernel.org/pub/software/scm/git/
Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
BuildRequires: zlib-devel, openssl-devel, curl-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: sh-utils, diffutils, rsync, rcs, mktemp >= 1.5
Requires: sh-utils, diffutils, rsync, rcs, python >= 2.4

%description
This is a stupid (but extremely fast) directory content manager. It
Expand Down
Loading

0 comments on commit 720d150

Please sign in to comment.