author | Sebastian Harl <sh@tokkee.org> | |
Mon, 22 Jan 2007 12:30:25 +0000 (12:30 +0000) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 22 Jan 2007 12:30:25 +0000 (12:30 +0000) |
debian/changelog | patch | blob | history | |
debian/control | patch | blob | history | |
debian/patches/00list | [new file with mode: 0644] | patch | blob |
debian/patches/infiniteloop.dpatch | [new file with mode: 0644] | patch | blob |
debian/patches/splitview.dpatch | [new file with mode: 0644] | patch | blob |
debian/rules | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index 7f884fec844b20bbca1df001b8c13b9b888521a6..28b6fbffce6c2d0e52a31460b04b51647479cac1 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
+tig (0.5-2) unstable; urgency=medium
+
+ * Added two upstream patches by Jonas Fonseca <fonseca@diku.dk>:
+ - Fix a segfault when navigating in tree mode (Closes: #403565).
+ - Fix an infinite loop.
+ * Put the sample manpage in /usr/share/doc/tig/examples/.
+
+ -- Sebastian Harl <sh@tokkee.org> Fri, 22 Dec 2006 09:08:57 +0000
+
tig (0.5-1~bpo.1) sarge-backports; urgency=low
* Rebuild for Sarge.
diff --git a/debian/control b/debian/control
index e413b49137194b459215e38442de699336c0c782..a22bc43c18e839766baea2010abfd19c204198bc 100644 (file)
--- a/debian/control
+++ b/debian/control
Section: utils
Priority: optional
Maintainer: Sebastian Harl <sh@tokkee.org>
-Build-Depends: debhelper (>= 5), libncurses5-dev, asciidoc (>= 7), xmlto,
- docbook-utils
+Build-Depends: debhelper (>= 5), libncurses5-dev, asciidoc (>= 7), xmlto, docbook-utils, dpatch
Standards-Version: 3.7.2
Package: tig
diff --git a/debian/patches/00list b/debian/patches/00list
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,3 @@
+infiniteloop.dpatch
+splitview.dpatch
+
diff --git a/debian/patches/infiniteloop.dpatch b/debian/patches/infiniteloop.dpatch
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## infiniteloop.dpatch by Jonas Fonseca <fonseca@diku.dk>
+##
+## DP: add_keybinding: always allocate the new keybinding
+## DP:
+## DP: Fixes infinite loop repoted by Miciah. Also simply continue when wgetch
+## DP: returns ERR (-1) instead of calling get_keybinding() etc.
+
+@DPATCH@
+
+diff --git a/tig.c b/tig.c
+index aac7c4e..6c2b7d0 100644
+--- a/tig.c
++++ b/tig.c
+@@ -767,10 +767,9 @@ static struct keybinding *keybindings[AR
+ static void
+ add_keybinding(enum keymap keymap, enum request request, int key)
+ {
+- struct keybinding *keybinding = keybindings[keymap];
++ struct keybinding *keybinding;
+
+- if (!keybinding)
+- keybinding = calloc(1, sizeof(*keybinding));
++ keybinding = calloc(1, sizeof(*keybinding));
+ if (!keybinding)
+ die("Failed to allocate keybinding");
+
+@@ -3532,6 +3531,8 @@ main(int argc, char *argv[])
+
+ /* Refresh, accept single keystroke of input */
+ key = wgetch(status_win);
++ if (key == ERR)
++ continue;
+
+ request = get_keybinding(display[current_view]->keymap, key);
+
diff --git a/debian/patches/splitview.dpatch b/debian/patches/splitview.dpatch
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## splitview.dpatch by Jonas Fonseca <fonseca@diku.dk>
+##
+## DP: Never split the tree view when opening another tree view.
+## DP:
+## DP: The resulting bogus display[] state ment that the blob view was not
+## DP: initialized causing segmentation faults in the redrawing code.
+## DP:
+## DP: Reported by Alexey Tourbin <at@altlinux.ru>, Josh Triplett
+## DP: <josh@freedesktop.org> and Jamey Sharp <sharpone@debian.org>
+
+@DPATCH@
+
+diff --git a/tig.c b/tig.c
+index fcfbc43..3b320e6 100644
+--- a/tig.c
++++ b/tig.c
+@@ -2580,7 +2580,7 @@ tree_read(struct view *view, char *text)
+ static bool
+ tree_enter(struct view *view, struct line *line)
+ {
+- enum open_flags flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT;
++ enum open_flags flags;
+ enum request request;
+
+ switch (line->type) {
+@@ -2610,11 +2610,12 @@ tree_enter(struct view *view, struct lin
+
+ /* Trees and subtrees share the same ID, so they are not not
+ * unique like blobs. */
+- flags |= OPEN_RELOAD;
++ flags = OPEN_RELOAD;
+ request = REQ_VIEW_TREE;
+ break;
+
+ case LINE_TREE_FILE:
++ flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT;
+ request = REQ_VIEW_BLOB;
+ break;
+
diff --git a/debian/rules b/debian/rules
index 8af679ab35fe0d13a8669e9d37177ff4aaa36d49..ceae06e9991380c7de25217f083be7adf00fd45a 100755 (executable)
--- a/debian/rules
+++ b/debian/rules
CFLAGS += -O2
endif
+include /usr/share/dpatch/dpatch.make
+
build: build-stamp
-build-stamp:
+build-stamp: patch
dh_testdir
CFLAGS="$(FLAGS)" $(MAKE) all doc
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp
dh_testroot
dh_installchangelogs
dh_installdocs BUGS TODO manual.pdf
+ dh_installexamples tigrc
dh_link
dh_strip
- dh_compress
+ dh_compress -X.pdf
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_builddeb
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: build clean binary-indep binary-arch binary install patch unpatch