diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2007-10-31 18:32:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2007-10-31 18:32:22 -0400 |
commit | 3506f4ba07b612312f7b892c73f5d486f320974e (patch) | |
tree | 75e73129b4d660828925ca9c3229b3568c7bffc8 | |
parent | 61c2030b2db03d2a83a210b2784fe25246c0be42 (diff) |
* Improve the RecentChanges display for git merges, by passing -c instead
of -m to git-log, and by skipping display of commits that change no
pages.
-rw-r--r-- | IkiWiki/Rcs/git.pm | 4 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | doc/todo/git_recentchanges_should_not_show_merges.mdwn | 11 |
3 files changed, 17 insertions, 3 deletions
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm index a9efbb092..68b573fb9 100644 --- a/IkiWiki/Rcs/git.pm +++ b/IkiWiki/Rcs/git.pm @@ -258,7 +258,7 @@ sub git_commit_info ($;$) { #{{{ $num ||= 1; my @raw_lines = run_or_die('git', 'log', "--max-count=$num", - '--pretty=raw', '--raw', '--abbrev=40', '--always', '-m', + '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c', '-r', $sha1, '--', '.'); my ($prefix) = run_or_die('git', 'rev-parse', '--show-prefix'); @@ -412,7 +412,7 @@ sub rcs_recentchanges ($) { #{{{ when => $when, message => [@messages], pages => [@pages], - }; + } if @pages; last if @rets >= $num; } diff --git a/debian/changelog b/debian/changelog index 14ace4193..8326de6ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,11 @@ ikiwiki (2.12) UNRELEASED; urgency=low stay the same for the duration of the function. * Avoid using commands like git-diff and instead use "git diff". In some configurations, only the main git command is in the path. + * Improve the RecentChanges display for git merges, by passing -c instead + of -m to git-log, and by skipping display of commits that change no + pages. - -- Joey Hess <joeyh@debian.org> Wed, 31 Oct 2007 17:34:59 -0400 + -- Joey Hess <joeyh@debian.org> Wed, 31 Oct 2007 18:30:54 -0400 ikiwiki (2.11) unstable; urgency=low diff --git a/doc/todo/git_recentchanges_should_not_show_merges.mdwn b/doc/todo/git_recentchanges_should_not_show_merges.mdwn index 22cf1c08f..e65efdc81 100644 --- a/doc/todo/git_recentchanges_should_not_show_merges.mdwn +++ b/doc/todo/git_recentchanges_should_not_show_merges.mdwn @@ -7,3 +7,14 @@ A merge in general is a commit with two parents, right? But such a merge might be what gitweb calls a "simple merge", that is I think, just a fast-forward. Or it could be a merge that includes manual conflict resolution, and should be shown in recentchanges. + +Seems that the problem is that it's calling git-log with the -m option, +which makes merges be listed with the diff from the perspective of each +parent. I think it would be better to not use that (or possibly to use the +-c option instead?). The -m makes it show the merge from the POV of +each of the parents. If the -m is left off, none of the changes in the +merge are shown, even if it includes changes not in any of the parents +(manual conflict resolution). With -c, it seems to show only the unique +changes introduced by the merge. + +[[done]], using -c, hope that was the right choice --[[Joey]] |