Skip to contentSkip to conversation

Fix some doubled word typos

PATCH In review Alp Toker 2 participants 6 messages Jun 15, 2016 Documentation

lore
Share & tools
lore

Alp Toker

author
#0 lore raw

PATCH 1/1 Fix some doubled word typos

---
 Documentation/git-svn.txt |    2 +-
 Documentation/urls.txt    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/git-svn.txt +1 -1
index f7d3de4..7d86809 100644
@@ -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
 ------------------------------------------
Documentation/urls.txt +1 -1
index 7477413..d60b371 100644
@@ -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
Signature · 1 line
1.4.1.gbe4c7
author
#1 lore raw

PATCH 1/1 Fix typos involving the word 'commit'

---
 Documentation/git-cvsexportcommit.txt |    2 +-
 refs.c                                |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
Documentation/git-cvsexportcommit.txt +1 -1
index 56bd3e5..27ac72d 100644
@@ -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
refs.c +6 -6
index 713ca46..2d9c1dc 100644
@@ -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);
Signature · 1 line
1.4.1.gbe4c7
author
#2 lore raw
In reply to Alp Toker
Quoted 5 lines · Alp Toker
---
 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?

#3 lore raw
Quoted 4 lines · Alp Toker

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.

author
#4 lore raw
Quoted 8 lines · Junio C Hamano

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.

#5 lore raw
Quoted 4 lines · Alp Toker

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 ;-).