threads / patch / 4817

patchFix some doubled word typos

Subject: [PATCH] Fix some doubled word typos

## tl;dr

6 messages between Jul 9, 2006 and Jul 10, 2006. Diffs are folded; open one to read it.

replies: 5people: 2as markdown or json

Alp Toker· Jul 9, 2006, 09:36 UTC · lore
Signed-off-by: Alp Toker <alp@atoker.com>
---
 Documentation/git-svn.txt |    2 +-
 Documentation/urls.txt    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Show changes to 2 files +2 −2

Documentation/git-svn.txt, Documentation/urls.txt

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index f7d3de4..7d86809 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -224,7 +224,7 @@ Merge tracking in Subversion is lacking 
 with Subversion is cumbersome as a result.  git-svn completely forgoes
 any automated merge/branch tracking on the Subversion side and leaves it
 entirely up to the user on the git side.  It's simply not worth it to do
-a useful translation when the the original signal is weak.
+a useful translation when the original signal is weak.
 
 TRACKING MULTIPLE REPOSITORIES OR BRANCHES
 ------------------------------------------
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index 7477413..d60b371 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -47,7 +47,7 @@ Then such a short-hand is specified in p
 <repository> without <refspec> parameters on the command
 line, <refspec> specified on `Push:` lines or `Pull:`
 lines are used for `git-push` and `git-fetch`/`git-pull`,
-respectively.  Multiple `Push:` and and `Pull:` lines may
+respectively.  Multiple `Push:` and `Pull:` lines may
 be specified for additional branch mappings.
 
 The name of a file in `$GIT_DIR/branches` directory can be
-- 
1.4.1.gbe4c7
Alp Toker· Jul 9, 2006, 09:36 UTC · re: Alp Toker · lore

[PATCH] Fix typos involving the word 'commit'

Signed-off-by: Alp Toker <alp@atoker.com>
---
 Documentation/git-cvsexportcommit.txt |    2 +-
 refs.c                                |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 2 files +7 −7

Documentation/git-cvsexportcommit.txt, refs.c

diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt
index 56bd3e5..27ac72d 100644
--- a/Documentation/git-cvsexportcommit.txt
+++ b/Documentation/git-cvsexportcommit.txt
@@ -8,7 +8,7 @@ git-cvsexportcommit - Export a commit to
 
 SYNOPSIS
 --------
-'git-cvsexportcommmit' [-h] [-v] [-c] [-p] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
+'git-cvsexportcommit' [-h] [-v] [-c] [-p] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
 
 
 DESCRIPTION
diff --git a/refs.c b/refs.c
index 713ca46..2d9c1dc 100644
--- a/refs.c
+++ b/refs.c
@@ -362,7 +362,7 @@ static int log_ref_write(struct ref_lock
 	int logfd, written, oflags = O_APPEND | O_WRONLY;
 	unsigned maxlen, len;
 	char *logrec;
-	const char *comitter;
+	const char *committer;
 
 	if (log_all_ref_updates) {
 		if (safe_create_leading_directories(lock->log_file) < 0)
@@ -380,23 +380,23 @@ static int log_ref_write(struct ref_lock
 	}
 
 	setup_ident();
-	comitter = git_committer_info(1);
+	committer = git_committer_info(1);
 	if (msg) {
-		maxlen = strlen(comitter) + strlen(msg) + 2*40 + 5;
+		maxlen = strlen(committer) + strlen(msg) + 2*40 + 5;
 		logrec = xmalloc(maxlen);
 		len = snprintf(logrec, maxlen, "%s %s %s\t%s\n",
 			sha1_to_hex(lock->old_sha1),
 			sha1_to_hex(sha1),
-			comitter,
+			committer,
 			msg);
 	}
 	else {
-		maxlen = strlen(comitter) + 2*40 + 4;
+		maxlen = strlen(committer) + 2*40 + 4;
 		logrec = xmalloc(maxlen);
 		len = snprintf(logrec, maxlen, "%s %s %s\n",
 			sha1_to_hex(lock->old_sha1),
 			sha1_to_hex(sha1),
-			comitter);
+			committer);
 	}
 	written = len <= maxlen ? write(logfd, logrec, len) : -1;
 	free(logrec);
-- 
1.4.1.gbe4c7
Alp Toker· Jul 10, 2006, 00:32 UTC · re: Alp Toker · lore

Re: [PATCH] Fix some doubled word typos

Alp Toker wrote:
Show 5 quoted lines
> Signed-off-by: Alp Toker <alp@atoker.com>
> ---
>  Documentation/git-svn.txt |    2 +-
>  Documentation/urls.txt    |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

My patch was made against the 'next' branch, where the file had recently been moved to Documentation/git-svn.txt, but it was applied to the 'master' branch where the file still exists at contrib/git-svn/git-svn.txt as it has not yet been moved.

As a result, it seems that only the modification to Documentation/urls.txt in this patch made it into the repository, with the fix to Documentation/git-svn.txt having been silently omitted.

By the time the commit was merged from 'master' to 'next', it had permanently lost the modification to git-svn.txt, and even though the commit message claims to "Fix some doubled word typos" it only fixes one.

Could this situation have been avoided if the patch had mentioned that it was against the 'next' branch? Should/does git warn the user if a patch modifies files that don't exist? Would rename tracking have helped this patch to apply properly?

Junio C Hamano· Jul 10, 2006, 00:50 UTC · re: Alp Toker · lore

Re: [PATCH] Fix some doubled word typos

Alp Toker <alp@atoker.com> writes:
> My patch was made against the 'next' branch, where the file had
> recently been moved to Documentation/git-svn.txt, but it was applied
> to the 'master' branch where the file still exists at
> contrib/git-svn/git-svn.txt as it has not yet been moved.
Actually, I am a bit more careful than that ;-).

I have split your patch into two, and applied the part that applicable to "master" first. The tip of ew/svn topic branch (I do not publish topic branch tips) have two patches that are still not in even "pu", and one of these two patches is your Documentation/git-svn.txt patch. These two will appear in "next" hopefully soon -- I just haven't gotten around to them.

Alp Toker· Jul 10, 2006, 01:42 UTC · re: Junio C Hamano · lore

Re: [PATCH] Fix some doubled word typos

Junio C Hamano wrote:
Show 8 quoted lines
> Actually, I am a bit more careful than that ;-).
> 
> I have split your patch into two, and applied the part that
> applicable to "master" first.  The tip of ew/svn topic branch (I
> do not publish topic branch tips) have two patches that are
> still not in even "pu", and one of these two patches is your
> Documentation/git-svn.txt patch.  These two will appear in
> "next" hopefully soon -- I just haven't gotten around to them.

I hadn't realised that git-svn work was happening on a topic branch. In light of that, it makes perfect sense to split out the commit as you did. It's good to hear that git isn't just truncating patches.

Cheers.
Junio C Hamano· Jul 10, 2006, 02:04 UTC · re: Alp Toker · lore

Re: [PATCH] Fix some doubled word typos

Alp Toker <alp@atoker.com> writes:
> I hadn't realised that git-svn work was happening on a topic
> branch. In light of that, it makes perfect sense to split out the
> commit as you did. It's good to hear that git isn't just truncating
> patches.

No, what would happen (if I were not careful) if I try to apply it to "master" would be that "git am" would refuse to touch any file. IOW, it tries to apply the patches atomically. Not truncating or omitting patches is one of the most important things git needs to do correctly so it had better work right ;-).

← back to recent threads