threads / patch / 21070

patchgitweb: fix spelling errors in comments

Subject: [PATCH] gitweb: fix spelling errors in comments

## tl;dr

3 messages between Sep 26, 2009 and Sep 27, 2009. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Miklos Vajna· Sep 26, 2009, 23:32 UTC · lore
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 gitweb/gitweb.perl |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
The plural form of "id" is "ids", not "id's", right?
Show changes to gitweb/gitweb.perl +5 −5
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 24b2193..b66c4d0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4949,7 +4949,7 @@ sub git_blob_plain {
 			die_error(400, "No file name defined");
 		}
 	} elsif ($hash =~ m/^[0-9a-fA-F]{40}$/) {
-		# blobs defined by non-textual hash id's can be cached
+		# blobs defined by non-textual hash ids can be cached
 		$expires = "+1d";
 	}
 
@@ -5001,7 +5001,7 @@ sub git_blob {
 			die_error(400, "No file name defined");
 		}
 	} elsif ($hash =~ m/^[0-9a-fA-F]{40}$/) {
-		# blobs defined by non-textual hash id's can be cached
+		# blobs defined by non-textual hash ids can be cached
 		$expires = "+1d";
 	}
 
@@ -5346,7 +5346,7 @@ sub git_commit {
 	@difftree = map { chomp; $_ } <$fd>;
 	close $fd or die_error(404, "Reading git-diff-tree failed");
 
-	# non-textual hash id's can be cached
+	# non-textual hash ids can be cached
 	my $expires;
 	if ($hash =~ m/^[0-9a-fA-F]{40}$/) {
 		$expires = "+1d";
@@ -5513,7 +5513,7 @@ sub git_blobdiff {
 		$hash_parent ||= $diffinfo{'from_id'};
 		$hash        ||= $diffinfo{'to_id'};
 
-		# non-textual hash id's can be cached
+		# non-textual hash ids can be cached
 		if ($hash_base =~ m/^[0-9a-fA-F]{40}$/ &&
 		    $hash_parent_base =~ m/^[0-9a-fA-F]{40}$/) {
 			$expires = '+1d';
@@ -5733,7 +5733,7 @@ sub git_commitdiff {
 		die_error(400, "Unknown commitdiff format");
 	}
 
-	# non-textual hash id's can be cached
+	# non-textual hash ids can be cached
 	my $expires;
 	if ($hash =~ m/^[0-9a-fA-F]{40}$/) {
 		$expires = "+1d";
-- 
1.6.5.rc1.44.ga1675.dirty
Jeff King· Sep 27, 2009, 08:35 UTC · re: Miklos Vajna · lore

Re: [PATCH] gitweb: fix spelling errors in comments

On Sun, Sep 27, 2009 at 01:32:33AM +0200, Miklos Vajna wrote:
Show 6 quoted lines
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>  gitweb/gitweb.perl |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> The plural form of "id" is "ids", not "id's", right?

It is a matter of some debate, actually. As an abbreviation, it should rightly be "ID", and therefore "IDs". Most style manuals indicate that no apostrophe should be used these days, unless it is an abbreviation separated by dots (e.g., "I.D.'s").

Some disagree, and some indicate that you should use an apostrophe where it may be visually more clear (for example, in single-letter abbreviations like "A's").

There is a nice summary of some style guides here:
  http://answers.google.com/answers/threadview?id=499296

Honestly, for such an informal bit of text as a code comment, I'm not sure it is worth nit-picking the grammar (e.g., we should be writing SHA-1 everywhere, and we obviously don't). I'll let Shawn decide whether he wants to apply or not.

-Peff
Miklos Vajna· Sep 27, 2009, 08:54 UTC · re: Jeff King · lore

Re: [PATCH] gitweb: fix spelling errors in comments

On Sun, Sep 27, 2009 at 04:35:07AM -0400, Jeff King <peff@peff.net> wrote:
Show 19 quoted lines
> > The plural form of "id" is "ids", not "id's", right?
> 
> It is a matter of some debate, actually. As an abbreviation, it should
> rightly be "ID", and therefore "IDs". Most style manuals indicate that
> no apostrophe should be used these days, unless it is an abbreviation
> separated by dots (e.g., "I.D.'s").
> 
> Some disagree, and some indicate that you should use an apostrophe where
> it may be visually more clear (for example, in single-letter
> abbreviations like "A's").
> 
> There is a nice summary of some style guides here:
> 
>   http://answers.google.com/answers/threadview?id=499296
> 
> Honestly, for such an informal bit of text as a code comment, I'm not
> sure it is worth nit-picking the grammar (e.g., we should be
> writing SHA-1 everywhere, and we obviously don't). I'll let Shawn decide
> whether he wants to apply or not.

As a non-native I did not know to resolve "id's" to "id is" or "id has", and once I figured it out, I thought about sending a patch.

Though, if that helps, I can resend it with "Blobs defined by non-textual hash IDs can be cached" to be more readable.

← back to recent threads