* maint:
  cvsserver: Fix some typos in asciidoc documentation
  cvsserver: Note that CVS_SERVER can also be specified as method variable
  cvsserver: Correct inetd.conf example in asciidoc documentation
  user-manual: fixed typo in example
  Add test case for $Id$ expanded in the repository
  git-svn: avoid md5 calculation entirely if SVN doesn't provide one
  Makefile: Remove git-fsck and git-verify-pack from PROGRAMS
  Fix stupid typo in lookup_tag()
  git-gui: Guess our share/git-gui/lib path at runtime if possible
  Correct key bindings to Control-<foo>
  git-gui: Tighten internal pattern match for lib/ directory
This commit is contained in:
Junio C Hamano 2007-05-29 00:27:24 -07:00
Родитель 24a97d84ad a192a909c0
Коммит 79d5576a4f
8 изменённых файлов: 87 добавлений и 26 удалений

Просмотреть файл

@ -46,16 +46,28 @@ INSTALLATION
cvspserver stream tcp nowait nobody git-cvsserver pserver cvspserver stream tcp nowait nobody git-cvsserver pserver
------ ------
Note: In some cases, you need to pass the 'pserver' argument twice for Note: Some inetd servers let you specify the name of the executable
git-cvsserver to see it. So the line would look like independently of the value of argv[0] (i.e. the name the program assumes
it was executed with). In this case the correct line in /etc/inetd.conf
looks like
------ ------
cvspserver stream tcp nowait nobody git-cvsserver pserver pserver cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver
------ ------
No special setup is needed for SSH access, other than having GIT tools No special setup is needed for SSH access, other than having GIT tools
in the PATH. If you have clients that do not accept the CVS_SERVER in the PATH. If you have clients that do not accept the CVS_SERVER
env variable, you can rename git-cvsserver to cvs. environment variable, you can rename git-cvsserver to cvs.
Note: Newer cvs versions (>= 1.12.11) also support specifying
CVS_SERVER directly in CVSROOT like
------
cvs -d ":ext;CVS_SERVER=git-cvsserver:user@server/path/repo.git" co <HEAD_name>
------
This has the advantage that it will be saved in your 'CVS/Root' files and
you don't need to worry about always setting the correct environment
variable.
-- --
2. For each repo that you want accessible from CVS you need to edit config in 2. For each repo that you want accessible from CVS you need to edit config in
the repo and add the following section. the repo and add the following section.
@ -74,7 +86,7 @@ write access to the log file and to the database (see
SSH, the users of course also need write access to the git repository itself. SSH, the users of course also need write access to the git repository itself.
[[configaccessmethod]] [[configaccessmethod]]
All configuration variables can also be overriden for a specific method of All configuration variables can also be overridden for a specific method of
access. Valid method names are "ext" (for SSH access) and "pserver". The access. Valid method names are "ext" (for SSH access) and "pserver". The
following example configuration would disable pserver access while still following example configuration would disable pserver access while still
allowing access over SSH. allowing access over SSH.
@ -116,7 +128,7 @@ Database Backend
git-cvsserver uses one database per git head (i.e. CVS module) to git-cvsserver uses one database per git head (i.e. CVS module) to
store information about the repository for faster access. The store information about the repository for faster access. The
database doesn't contain any persitent data and can be completly database doesn't contain any persistent data and can be completely
regenerated from the git repository at any time. The database regenerated from the git repository at any time. The database
needs to be updated (i.e. written to) after every commit. needs to be updated (i.e. written to) after every commit.

Просмотреть файл

@ -872,7 +872,7 @@ Obviously, endless variations are possible; for example, to see all
commits reachable from some head but not from any tag in the repository: commits reachable from some head but not from any tag in the repository:
------------------------------------------------- -------------------------------------------------
$ gitk ($ git show-ref --heads ) --not $( git show-ref --tags ) $ gitk $( git show-ref --heads ) --not $( git show-ref --tags )
------------------------------------------------- -------------------------------------------------
(See gitlink:git-rev-parse[1] for explanations of commit-selecting (See gitlink:git-rev-parse[1] for explanations of commit-selecting

Просмотреть файл

@ -235,7 +235,7 @@ endif
# ... and all the rest that could be moved out of bindir to gitexecdir # ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS = \ PROGRAMS = \
git-convert-objects$X git-fetch-pack$X git-fsck$X \ git-convert-objects$X git-fetch-pack$X \
git-hash-object$X git-index-pack$X git-local-fetch$X \ git-hash-object$X git-index-pack$X git-local-fetch$X \
git-fast-import$X \ git-fast-import$X \
git-merge-base$X \ git-merge-base$X \
@ -246,7 +246,7 @@ PROGRAMS = \
git-show-index$X git-ssh-fetch$X \ git-show-index$X git-ssh-fetch$X \
git-ssh-upload$X git-unpack-file$X \ git-ssh-upload$X git-unpack-file$X \
git-update-server-info$X \ git-update-server-info$X \
git-upload-pack$X git-verify-pack$X \ git-upload-pack$X \
git-pack-redundant$X git-var$X \ git-pack-redundant$X git-var$X \
git-merge-tree$X git-imap-send$X \ git-merge-tree$X git-imap-send$X \
git-merge-recursive$X \ git-merge-recursive$X \

Просмотреть файл

@ -22,7 +22,7 @@ ifndef gitexecdir
endif endif
ifndef sharedir ifndef sharedir
sharedir := $(dir $(gitexecdir))/share sharedir := $(dir $(gitexecdir))share
endif endif
ifndef INSTALL ifndef INSTALL
@ -53,12 +53,19 @@ TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
libdir ?= $(sharedir)/git-gui/lib libdir ?= $(sharedir)/git-gui/lib
libdir_SQ = $(subst ','\'',$(libdir)) libdir_SQ = $(subst ','\'',$(libdir))
exedir = $(dir $(gitexecdir))share/git-gui/lib
exedir_SQ = $(subst ','\'',$(exedir))
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)rm -f $@ $@+ && \ $(QUIET_GEN)rm -f $@ $@+ && \
if test '$(exedir_SQ)' = '$(libdir_SQ)'; then \
GITGUI_RELATIVE=1; \
fi && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \ -e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \ -e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
-e 's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \ -e 's|@@GITGUI_RELATIVE@@|'$$GITGUI_RELATIVE'|' \
-e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \
$@.sh >$@+ && \ $@.sh >$@+ && \
chmod +x $@+ && \ chmod +x $@+ && \
mv $@+ $@ mv $@+ $@
@ -88,6 +95,7 @@ TRACK_VARS = \
$(subst ','\'',SHELL_PATH='$(SHELL_PATH_SQ)') \ $(subst ','\'',SHELL_PATH='$(SHELL_PATH_SQ)') \
$(subst ','\'',TCL_PATH='$(TCL_PATH_SQ)') \ $(subst ','\'',TCL_PATH='$(TCL_PATH_SQ)') \
$(subst ','\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \ $(subst ','\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \
$(subst ','\'',gitexecdir='$(gitexecdir_SQ)') \
$(subst ','\'',libdir='$(libdir_SQ)') \ $(subst ','\'',libdir='$(libdir_SQ)') \
#end TRACK_VARS #end TRACK_VARS

Просмотреть файл

@ -25,7 +25,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}
## configure our library ## configure our library
set oguilib {@@GITGUI_LIBDIR@@} set oguilib {@@GITGUI_LIBDIR@@}
if {[string match @@* $oguilib]} { set oguirel {@@GITGUI_RELATIVE@@}
if {$oguirel eq {1}} {
set oguilib [file dirname [file dirname [file normalize $argv0]]]
set oguilib [file join $oguilib share git-gui lib]
} elseif {[string match @@* $oguirel]} {
set oguilib [file join [file dirname [file normalize $argv0]] lib] set oguilib [file join [file dirname [file normalize $argv0]] lib]
} }
set idx [file join $oguilib tclIndex] set idx [file join $oguilib tclIndex]
@ -55,7 +59,7 @@ if {$idx ne {}} {
} else { } else {
set auto_path [concat [list $oguilib] $auto_path] set auto_path [concat [list $oguilib] $auto_path]
} }
unset -nocomplain fd idx unset -nocomplain oguilib oguirel idx fd
if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} { if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
unset _verbose unset _verbose
@ -1206,15 +1210,12 @@ foreach class {Button Checkbutton Entry Label
} }
unset class unset class
if {[is_Windows]} { if {[is_MacOSX]} {
set M1B Control
set M1T Ctrl
} elseif {[is_MacOSX]} {
set M1B M1 set M1B M1
set M1T Cmd set M1T Cmd
} else { } else {
set M1B M1 set M1B Control
set M1T M1 set M1T Ctrl
} }
proc apply_config {} { proc apply_config {} {

Просмотреть файл

@ -2472,12 +2472,16 @@ sub close_file {
my $hash; my $hash;
my $path = $self->git_path($fb->{path}); my $path = $self->git_path($fb->{path});
if (my $fh = $fb->{fh}) { if (my $fh = $fb->{fh}) {
seek($fh, 0, 0) or croak $!; if (defined $exp) {
my $md5 = Digest::MD5->new; seek($fh, 0, 0) or croak $!;
$md5->addfile($fh); my $md5 = Digest::MD5->new;
my $got = $md5->hexdigest; $md5->addfile($fh);
die "Checksum mismatch: $path\n", my $got = $md5->hexdigest;
"expected: $exp\n got: $got\n" if (defined $exp && $got ne $exp); if ($got ne $exp) {
die "Checksum mismatch: $path\n",
"expected: $exp\n got: $got\n";
}
}
sysseek($fh, 0, 0) or croak $!; sysseek($fh, 0, 0) or croak $!;
if ($fb->{mode_b} == 120000) { if ($fb->{mode_b} == 120000) {
sysread($fh, my $buf, 5) == 5 or croak $!; sysread($fh, my $buf, 5) == 5 or croak $!;

Просмотреть файл

@ -45,4 +45,40 @@ test_expect_success check '
test "z$id" = "z$embedded" test "z$id" = "z$embedded"
' '
# If an expanded ident ever gets into the repository, we want to make sure that
# it is collapsed before being expanded again on checkout
test_expect_success expanded_in_repo '
{
echo "File with expanded keywords"
echo "\$Id\$"
echo "\$Id:\$"
echo "\$Id: 0000000000000000000000000000000000000000 \$"
echo "\$Id: NoSpaceAtEnd\$"
echo "\$Id:NoSpaceAtFront \$"
echo "\$Id:NoSpaceAtEitherEnd\$"
echo "\$Id: NoTerminatingSymbol"
} > expanded-keywords &&
{
echo "File with expanded keywords"
echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
echo "\$Id: 4f21723e7b15065df7de95bd46c8ba6fb1818f4c \$"
echo "\$Id: NoTerminatingSymbol"
} > expected-output &&
git add expanded-keywords &&
git commit -m "File with keywords expanded" &&
echo "expanded-keywords ident" >> .gitattributes &&
rm -f expanded-keywords &&
git checkout -- expanded-keywords &&
cat expanded-keywords &&
cmp expanded-keywords expected-output
'
test_done test_done

2
tag.c
Просмотреть файл

@ -26,7 +26,7 @@ struct tag *lookup_tag(const unsigned char *sha1)
if (!obj->type) if (!obj->type)
obj->type = OBJ_TAG; obj->type = OBJ_TAG;
if (obj->type != OBJ_TAG) { if (obj->type != OBJ_TAG) {
error("Object %s is a %s, not a tree", error("Object %s is a %s, not a tag",
sha1_to_hex(sha1), typename(obj->type)); sha1_to_hex(sha1), typename(obj->type));
return NULL; return NULL;
} }