summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f7a97a)
raw | patch | inline | side by side (parent: 4f7a97a)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 15 Jul 2012 09:39:39 +0000 (11:39 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 15 Jul 2012 09:39:39 +0000 (11:39 +0200) |
This is an upstream patch fixing a regression breaking the graph when path
spec is specified.
Thanks to Simon Paillard for reporting this!
Closes: #680442
spec is specified.
Thanks to Simon Paillard for reporting this!
Closes: #680442
debian/changelog | patch | blob | history | |
debian/patches/bts680442-broken-graph.patch | [new file with mode: 0644] | patch | blob |
debian/patches/series | [new file with mode: 0644] | patch | blob |
diff --git a/debian/changelog b/debian/changelog
index 020eb89eec78e532843276cfa668ce90af86ac11..88d3966329abd6be01e8bef333ce0ad2f395a6c5 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
+tig (1.0-2) UNRELEASED; urgency=low
+
+ * debian/patches:
+ - Added bts680442-broken-graph.patch -- upstream patch fixing a regression
+ breaking the graph when path spec is specified; thanks to Simon Paillard
+ for reporting this (Closes: #680442).
+
+ -- Sebastian Harl <tokkee@debian.org> Sun, 15 Jul 2012 11:37:31 +0200
+
tig (1.0-1) unstable; urgency=low
* New upstream release; thanks to Salvatore Bonaccorso and Romain Francoise
diff --git a/debian/patches/bts680442-broken-graph.patch b/debian/patches/bts680442-broken-graph.patch
--- /dev/null
@@ -0,0 +1,67 @@
+Description: Fixed regression breaking the graph when path spec is specified.
+ (cf. upstream commit 5579a6ff047c0d1b319b5452a8443000921d7da1)
+Author: Jonas Fonseca <fonseca@diku.dk>
+
+diff --git a/git.h b/git.h
+index 8179261..e237683 100644
+--- a/git.h
++++ b/git.h
+@@ -47,9 +47,8 @@
+ GIT_DIFF_INITIAL("", context_arg, space_arg, "/dev/null", new_name)
+
+ #define GIT_MAIN_LOG(diffargs, revargs, fileargs) \
+- "git", "log", ENCODING_ARG, "--no-color", "--date=raw", \
++ "git", "log", ENCODING_ARG, "--no-color", "--pretty=raw", "--parents", \
+ opt_commit_order_arg, (diffargs), (revargs), \
+- "--pretty=format:commit %m%H %P%nauthor %an <%ae> %ad%ntitle %s", \
+ "--", (fileargs), NULL
+
+ #endif
+diff --git a/tig.c b/tig.c
+index 69c3a56..3b26ba1 100644
+--- a/tig.c
++++ b/tig.c
+@@ -6949,6 +6949,7 @@ main_read(struct view *view, char *line)
+ struct graph *graph = view->private;
+ enum line_type type;
+ struct commit *commit;
++ static bool in_header;
+
+ if (!line) {
+ if (!view->lines && !view->prev)
+@@ -6970,6 +6971,7 @@ main_read(struct view *view, char *line)
+ if (type == LINE_COMMIT) {
+ bool is_boundary;
+
++ in_header = TRUE;
+ line += STRING_SIZE("commit ");
+ is_boundary = *line == '-';
+ if (is_boundary || !isalnum(*line))
+@@ -6985,6 +6987,10 @@ main_read(struct view *view, char *line)
+ return TRUE;
+ commit = view->line[view->lines - 1].data;
+
++ /* Empty line separates the commit header from the log itself. */
++ if (*line == '\0')
++ in_header = FALSE;
++
+ switch (type) {
+ case LINE_PARENT:
+ if (!graph->has_parents)
+@@ -7002,7 +7008,15 @@ main_read(struct view *view, char *line)
+ if (commit->title[0])
+ break;
+
+- line += STRING_SIZE("title ");
++ /* Skip lines in the commit header. */
++ if (in_header)
++ break;
++
++ /* Require titles to start with a non-space character at the
++ * offset used by git log. */
++ if (strncmp(line, " ", 4))
++ break;
++ line += 4;
+ /* Well, if the title starts with a whitespace character,
+ * try to be forgiving. Otherwise we end up with no title. */
+ while (isspace(*line))
diff --git a/debian/patches/series b/debian/patches/series
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+bts680442-broken-graph.patch