git-checkout is also adapted to make use of this new option instead of the handcrafted command sequence. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> --- All tests pass, except the recently added cvsserver tests, but they fail without this patch too. Documentation/git-update-ref.txt | 5 ++++- builtin-branch.c | 2 +- builtin-fetch--tool.c | 2 +- builtin-reflog.c | 2 +- builtin-update-ref.c | 11 ++++++++--- fast-import.c | 2 +- git-checkout.sh | 10 +--------- receive-pack.c | 2 +- refs.c | 30 +++++++++++++++++++----------- refs.h | 3 ++- 10 files changed, 39 insertions(+), 30 deletions(-) diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 9424fea..f222616 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -7,7 +7,7 @@ git-update-ref - Update the object name stored in a ref safely SYNOPSIS -------- -'git-update-ref' [-m <reason>] (-d <ref> <oldvalue> | <ref> <newvalue> [<oldvalue>]) +'git-update-ref' [-m <reason>] (-d <ref> <oldvalue> | [--no-deref] <ref> <newvalue> [<oldvalue>]) DESCRIPTION ----------- @@ -36,6 +36,9 @@ them and update them as a regular file (i.e. it will allow the filesystem to follow them, but will overwrite such a symlink to somewhere else with a regular filename). +If --no-deref is given, <ref> itself is overwritten, rather than +the result of following the symbolic pointers. + In general, using git-update-ref HEAD "$head" diff --git a/builtin-branch.c b/builtin-branch.c index 7408285..6bd5843 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -462,7 +462,7 @@ static void create_branch(const char *name, const char *start_name, die("Not a valid branch point: '%s'.", start_name); hashcpy(sha1, commit->object.sha1); - lock = ...
Isn't this what git-symbolic-ref is about? -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Ever try. Ever fail. No matter. // Try again. Fail again. Fail better. -- Samuel Beckett -
You certainly can't use git-symbolic-ref now to overwrite a symbolic ref by a non-symbolic ref. It allows you to do the equivalent of symlink/readlink, while we want to _remove_ the link here. skimo -
Can you retry after installing libdbi and libdbd-sqlite-perl? -
I'd rather spend my (limited) time on the submodules thing.
Shouldn't these tests be skipped if I don't have all that stuff installed?
There doesn't even seem to be an option to turn off these tests.
Your hunch was correct, btw:
bash-3.00$ sh t9400-git-cvsserver-server.sh --verbose --immediate
* expecting success: cvs -Q co -d cvswork master &&
test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/"
install_driver(SQLite) failed: Can't locate DBD/SQLite.pm in @INC (@INC contains: /home/skimo/src/git/t/../perl/blib/lib /home/skimo/src/git/t/../perl/blib/arch/auto/Git /usr/lib/perl5/5.8.0/i686-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at (eval 2) line 3, <STDIN> line 16.
Perhaps the DBD::SQLite perl module hasn't been fully installed,
or perhaps the capitalisation of 'SQLite' isn't right.
Available drivers: ExampleP, Proxy.
at /home/skimo/src/git/t/../git-cvsserver line 2212
cvs [checkout aborted]: end of file from server (consult above messages if any)
* FAIL 1: basic checkout
cvs -Q co -d cvswork master &&
test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/"
skimo
-
I agree. We would need something like this, but I have no easy
way to test it myself, short of uninstalling what I need on the
box. As you do not have them, maybe you can give it a quick
whirl?
Thanks.
---
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index f17be6b..98d6bb4 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -17,6 +17,11 @@ then
test_done
exit
fi
+perl -e 'use DBI; use DBD::SQLite' 2>&1 || {
+ test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :
+ test_done
+ exit
+}
unset GIT_DIR GIT_CONFIG
WORKDIR=$(pwd)
-
Seems to work, albeit with a nasty warning, bash-3.00$ sh t9400-git-cvsserver-server.sh Can't locate DBD/SQLite.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i686-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. * ok 1: skipping git-cvsserver tests, Perl SQLite interface unavailable * passed all 1 test(s) skimo -
Yeah, I totally forgot add such a check, even though I added one for Maybe there is a >/dev/null missing here? I personally would prefer "perl -MDBI -MDBD::SQLite" stylewise, but I Gruesse, -- Frank Lichtenheld <frank@lichtenheld.de> www: http://www.djpig.de/ -
Yes, I have it in the committed version. I wanted to make sure Sven gets the expected error message from Perl in this test patch. -
Hi, We have quite a few tests which are ignored when the prerequisites are not installed. I wonder if we could do the same with t9400... Ciao, Dscho -
