From 655e8515f279c01f525745d443f509f97cd805ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Fri, 7 Mar 2008 21:22:17 +0100 Subject: [PATCH 1/4] Really make the LF after reset in fast-import optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cmd_from() ends with a call to read_next_command(), which is needed when using cmd_from() from commands where from is not the last element. With reset, however, "from" is the last command, after which the flow returns to the main loop, which calls read_next_command() again. Because of this, always set unread_command_buf in cmd_reset_branch(), even if cmd_from() was successful. Add a test case for this in t9300-fast-import.sh. Signed-off-by: Adeodato Simó Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- fast-import.c | 3 ++- t/t9300-fast-import.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index 9b71ccc479..32ec159915 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2261,7 +2261,8 @@ static void cmd_reset_branch(void) else b = new_branch(sp); read_next_command(); - if (!cmd_from(b) && command_buf.len > 0) + cmd_from(b); + if (command_buf.len > 0) unread_command_buf = 1; } diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 0595041af5..142d42f3b3 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -869,6 +869,8 @@ zcommits COMMIT reset refs/tags/O3-2nd from :5 +reset refs/tags/O3-3rd +from :5 INPUT_END cat >expect < Date: Sat, 8 Mar 2008 16:04:05 -0600 Subject: [PATCH 2/4] Fix dcommit, rebase when rewriteRoot is in use When the rewriteRoot setting is used with git-svn, it causes the svn IDs added to commit messages to bear a different URL than is actually used to retrieve Subversion data. It is common for Subversion repositories to be available multiple ways: for instance, HTTP to the public, and svn+ssh to people with commit access. The need to switch URLs for access is fairly common as well -- perhaps someone was just given commit access. To switch URLs without having to rewrite history, one can use the old url as a rewriteRoot, and use the new one in the svn-remote url setting. This works well for svn fetching and general git commands. However, git-svn dcommit, rebase, and perhaps other commands do not work in this scenario. They scan the svn ID lines in commit messages and attempt to match them up with url lines in [svn-remote] sections in the git config. This patch allows them to match rewriteRoot options, if such options are present. Signed-off-by: John Goerzen Acked-by: Eric Wong --- git-svn.perl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index a4ab05155d..29f39c0831 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1535,9 +1535,14 @@ sub find_by_url { # repos_root and, path are optional $remotes->{$repo_id}->{$_}); } my $p = $path; + my $rwr = rewrite_root({repo_id => $repo_id}); unless (defined $p) { $p = $full_url; - $p =~ s#^\Q$u\E(?:/|$)## or next; + my $z = $u; + if ($rwr) { + $z = $rwr; + } + $p =~ s#^\Q$z\E(?:/|$)## or next; } foreach my $f (keys %$fetch) { next if $f ne $p; From 6c293d408dbbd0206e80df3ecda7f1620cadaa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santi=20B=C3=A9jar?= Date: Sat, 8 Mar 2008 12:30:04 +0100 Subject: [PATCH 3/4] ident.c: reword error message when the user name cannot be determined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "config --global" suggested in the message is a valid one-shot fix, and hopefully one-shot across machines that NFS mounts the home directories. This knowledge can hopefully be reused when you are forced to use git on Windows, but the fix based on GECOS would not be applicable, so it is not such a useful hint to mention the exact reason why the name cannot be determined. Signed-off-by: Santi Béjar Signed-off-by: Junio C Hamano --- ident.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ident.c b/ident.c index b839dcf5f0..ed44a5345a 100644 --- a/ident.c +++ b/ident.c @@ -171,7 +171,7 @@ static const char au_env[] = "GIT_AUTHOR_NAME"; static const char co_env[] = "GIT_COMMITTER_NAME"; static const char *env_hint = "\n" -"*** Your name cannot be determined from your system services (gecos).\n" +"*** Please tell me who you are.\n" "\n" "Run\n" "\n" From 56d5fe285583b5177ffc65dbe7df636ed5b8cc6b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 8 Mar 2008 19:34:47 -0800 Subject: [PATCH 4/4] GIT 1.5.4.4 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.4.4.txt | 32 ++++++++++++++++++++++++------ GIT-VERSION-GEN | 2 +- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Documentation/RelNotes-1.5.4.4.txt b/Documentation/RelNotes-1.5.4.4.txt index 5635977c93..89fa6d03bc 100644 --- a/Documentation/RelNotes-1.5.4.4.txt +++ b/Documentation/RelNotes-1.5.4.4.txt @@ -37,10 +37,30 @@ Fixes since v1.5.4.3 * "git revert" did not properly fail when attempting to run with a dirty index. -Also included are a handful documentation updates. + * "git merge --no-commit --no-ff " incorrectly made commits. ---- -exec >/var/tmp/1 -echo O=$(git describe maint) -O=v1.5.4.3-32-g0f2d447 -git shortlog --no-merges $O..maint + * "git merge --squash --no-ff ", which is a nonsense combination + of options, was not rejected. + + * "git ls-remote" and "git remote show" against an empty repository + failed, instead of just giving an empty result (regression). + + * "git fast-import" did not handle a renamed path whose name needs to be + quoted, due to a bug in unquote_c_style() function. + + * "git cvsexportcommit" was confused when multiple files with the same + basename needed to be pushed out in the same commit. + + * "git daemon" did not send early errors to syslog. + + * "git log --merge" did not work well with --left-right option. + + * "git svn" promprted for client cert password every time it accessed the + server. + + * The reset command in "git fast-import" data stream was documented to + end with an optional LF, but it actually required one. + + * "git svn dcommit/rebase" did not honor --rewrite-root option. + +Also included are a handful documentation updates. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 0d4c2f79c5..33dc1ab222 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.4.3.GIT +DEF_VER=v1.5.4.4.GIT LF=' '