threads / patch / 5750

patchgitweb: Remove redundant "commit" link from shortlog

Subject: [PATCH] gitweb: Remove redundant "commit" link from shortlog

## tl;dr

5 messages between Sep 28, 2006 and Oct 6, 2006. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Luben Tuikov· Sep 28, 2006, 23:48 UTC · lore

Remove the redundant "commit" link from shortlog. It can be had by simply clicking on the entry title of the row.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
---
 gitweb/gitweb.perl |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Show changes to gitweb/gitweb.perl +0 −1
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 79c8052..f3f22c2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2013,7 +2013,6 @@ sub git_shortlog_body {
 		                          href(action=>"commit", hash=>$commit), $ref);
 		print "</td>\n" .
 		      "<td class=\"link\">" .
-		      $cgi->a({-href => href(action=>"commit", hash=>$commit)}, "commit") . " | " .
 		      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " .
 		      $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree");
 		print "</td>\n" .
-- 
1.4.2.1.g05f0f
Petr Baudis· Oct 6, 2006, 13:55 UTC · re: Luben Tuikov · lore

Re: [PATCH] gitweb: Remove redundant "commit" link from shortlog

Dear diary, on Fri, Sep 29, 2006 at 01:48:40AM CEST, I got a letter where Luben Tuikov <ltuikov@yahoo.com> said that...

Show 5 quoted lines
> Remove the redundant "commit" link from shortlog.
> It can be had by simply clicking on the entry title
> of the row.
> 
> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
And what if the commit message is empty?
Witness at http://repo.or.cz/?p=test;a=summary
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
Jakub Narebski· Oct 6, 2006, 15:08 UTC · re: Petr Baudis · lore

Re: [PATCH] gitweb: Remove redundant "commit" link from shortlog

Petr Baudis wrote:
Show 11 quoted lines
> Dear diary, on Fri, Sep 29, 2006 at 01:48:40AM CEST, I got a letter
> where Luben Tuikov <ltuikov@yahoo.com> said that...
>> Remove the redundant "commit" link from shortlog.
>> It can be had by simply clicking on the entry title
>> of the row.
>> 
>> Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> 
> And what if the commit message is empty?
> 
> Witness at http://repo.or.cz/?p=test;a=summary

By the way, commitdiff view in this case also looks strange. I think that simplyfying the git_difftree_body went too far, Luben.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Petr Baudis· Oct 6, 2006, 16:55 UTC · re: Petr Baudis · lore

[PATCH] gitweb: Handle commits with empty commit messages more reasonably

Currently those look very weird, you can't get easily at the commit view etc. This patch makes their title '(no commit message)'.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 gitweb/gitweb.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Show changes to gitweb/gitweb.perl +3 −0
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ea159e9..56e5231 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1115,6 +1115,9 @@ sub parse_commit {
 			last;
 		}
 	}
+	if ($co{'title'} eq "") {
+		$co{'title'} = $co{'title_short'} = '(no commit message)';
+	}
 	# remove added spaces
 	foreach my $line (@commit_lines) {
 		$line =~ s/^    //;
Luben Tuikov· Oct 6, 2006, 18:27 UTC · re: Petr Baudis · lore

Re: [PATCH] gitweb: Remove redundant "commit" link from shortlog

--- Petr Baudis <pasky@suse.cz> wrote:
Show 11 quoted lines
> Dear diary, on Fri, Sep 29, 2006 at 01:48:40AM CEST, I got a letter
> where Luben Tuikov <ltuikov@yahoo.com> said that...
> > Remove the redundant "commit" link from shortlog.
> > It can be had by simply clicking on the entry title
> > of the row.
> > 
> > Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
> 
> And what if the commit message is empty?
> 
> Witness at http://repo.or.cz/?p=test;a=summary

Clearly a pathological case. Who or why would anyone do this? I don't think we should worry about such pathological cases.

Commits without commit messages do not question GIT. They question the committer... (that's the morning chuckle)

    Luben
Show 12 quoted lines
> 
> -- 
> 				Petr "Pasky" Baudis
> Stuff: http://pasky.or.cz/
> #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
> $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
> lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

← back to recent threads