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 <redacted>
---
.gitignore | 1 +
Makefile | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
applies-to: 4380edd21387645ec027e365df316e93820cfc13
35408716ef9d85bc2feaf71c3d6cf20345c7f635
diff --git a/.gitignore b/.gitignore
index 975e773..52cb9e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ git-check-ref-format
git-checkout
git-checkout-index
git-cherry
+git-cherry-pick
git-clone
git-clone-pack
git-commit
diff --git a/Makefile b/Makefile
index 5fa9f4f..b043175 100644
--- a/Makefile
+++ b/Makefile
@@ -314,7 +314,7 @@ DEFINES += -DSHA1_HEADER=$(call shellquo
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
@@ -355,6 +355,9 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : %
$@.py >$@
chmod +x $@
+git-cherry-pick: git-revert
+ cp $< $@
+
%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
%.o: %.S
@@ -414,7 +417,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))
---
0.99.8.GIT