Merge branch 'master' into next
* master: (148 commits) GIT 1.4.0 v267 prepend '--' to filelist when calling git-diff-tree v266 remove Christian's email address v265 handle utf8 characters from /etc/passwd v264 fix: Use of uninitialized value v263 allow working in repositories with textual symref HEAD resolve textual hashes when looking up "refs" v262 define default colors v261 fix leading whitespace in commit text more tags v260 attach tag to the link v259 ...
This commit is contained in:
commit
ada5853c98
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v1.3.GIT
|
||||
DEF_VER=v1.4.GIT
|
||||
|
||||
# First try git-describe, then see if there is a version file
|
||||
# (included in release tarballs), then default
|
||||
|
4
Makefile
4
Makefile
@ -144,7 +144,7 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
|
||||
|
||||
# The ones that do not have to link with lcrypto, lz nor xdiff.
|
||||
SIMPLE_PROGRAMS = \
|
||||
git-get-tar-commit-id$X git-mailsplit$X \
|
||||
git-mailsplit$X \
|
||||
git-stripspace$X git-daemon$X
|
||||
|
||||
# ... and all the rest that could be moved out of bindir to gitexecdir
|
||||
@ -169,7 +169,7 @@ BUILT_INS = git-log$X git-whatchanged$X git-show$X \
|
||||
git-grep$X git-add$X git-rm$X git-rev-list$X \
|
||||
git-check-ref-format$X git-rev-parse$X \
|
||||
git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X \
|
||||
git-ls-files$X git-ls-tree$X \
|
||||
git-ls-files$X git-ls-tree$X git-get-tar-commit-id$X \
|
||||
git-read-tree$X git-commit-tree$X \
|
||||
git-apply$X git-show-branch$X git-diff-files$X \
|
||||
git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X
|
||||
|
@ -402,3 +402,28 @@ int cmd_tar_tree(int argc, const char **argv, char **envp)
|
||||
return remote_tar(argc, argv);
|
||||
return generate_tar(argc, argv, envp);
|
||||
}
|
||||
|
||||
/* ustar header + extended global header content */
|
||||
#define HEADERSIZE (2 * RECORDSIZE)
|
||||
|
||||
int cmd_get_tar_commit_id(int argc, const char **argv, char **envp)
|
||||
{
|
||||
char buffer[HEADERSIZE];
|
||||
struct ustar_header *header = (struct ustar_header *)buffer;
|
||||
char *content = buffer + RECORDSIZE;
|
||||
ssize_t n;
|
||||
|
||||
n = xread(0, buffer, HEADERSIZE);
|
||||
if (n < HEADERSIZE)
|
||||
die("git-get-tar-commit-id: read error");
|
||||
if (header->typeflag[0] != 'g')
|
||||
return 1;
|
||||
if (memcmp(content, "52 comment=", 11))
|
||||
return 1;
|
||||
|
||||
n = xwrite(1, content + 11, 41);
|
||||
if (n < 41)
|
||||
die("git-get-tar-commit-id: write error");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ extern int cmd_check_ref_format(int argc, const char **argv, char **envp);
|
||||
extern int cmd_init_db(int argc, const char **argv, char **envp);
|
||||
extern int cmd_tar_tree(int argc, const char **argv, char **envp);
|
||||
extern int cmd_upload_tar(int argc, const char **argv, char **envp);
|
||||
extern int cmd_get_tar_commit_id(int argc, const char **argv, char **envp);
|
||||
extern int cmd_ls_files(int argc, const char **argv, char **envp);
|
||||
extern int cmd_ls_tree(int argc, const char **argv, char **envp);
|
||||
extern int cmd_read_tree(int argc, const char **argv, char **envp);
|
||||
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Rene Scharfe
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define HEADERSIZE 1024
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char buffer[HEADERSIZE];
|
||||
ssize_t n;
|
||||
|
||||
n = read(0, buffer, HEADERSIZE);
|
||||
if (n < HEADERSIZE) {
|
||||
fprintf(stderr, "read error\n");
|
||||
return 3;
|
||||
}
|
||||
if (buffer[156] != 'g')
|
||||
return 1;
|
||||
if (memcmp(&buffer[512], "52 comment=", 11))
|
||||
return 1;
|
||||
n = write(1, &buffer[523], 41);
|
||||
if (n < 41) {
|
||||
fprintf(stderr, "write error\n");
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
2
git.c
2
git.c
@ -163,7 +163,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
|
||||
{ "add", cmd_add },
|
||||
{ "rev-list", cmd_rev_list },
|
||||
{ "init-db", cmd_init_db },
|
||||
{ "tar-tree", cmd_tar_tree },
|
||||
{ "get-tar-commit-id", cmd_get_tar_commit_id },
|
||||
{ "upload-tar", cmd_upload_tar },
|
||||
{ "check-ref-format", cmd_check_ref_format },
|
||||
{ "ls-files", cmd_ls_files },
|
||||
|
16
gitweb/README
Normal file
16
gitweb/README
Normal file
@ -0,0 +1,16 @@
|
||||
GIT web Interface
|
||||
|
||||
The one working on:
|
||||
http://www.kernel.org/git/
|
||||
|
||||
Get the gitweb.cgi by ftp:
|
||||
ftp://ftp.kernel.org/pub/software/scm/gitweb/
|
||||
|
||||
It reqires the git-core binaries installed on the system:
|
||||
http://www.kernel.org/git/?p=git/git.git;a=summary
|
||||
|
||||
The gitweb repository is here:
|
||||
http://www.kernel.org/git/?p=git/gitweb.git;a=summary
|
||||
|
||||
Any comment/question/concern to:
|
||||
Kay Sievers <kay.sievers@vrfy.org>
|
2407
gitweb/gitweb.cgi
Executable file
2407
gitweb/gitweb.cgi
Executable file
File diff suppressed because it is too large
Load Diff
2
gitweb/test/Märchen
Normal file
2
gitweb/test/Märchen
Normal file
@ -0,0 +1,2 @@
|
||||
Märchen
|
||||
Märchen
|
4
gitweb/test/file with spaces
Normal file
4
gitweb/test/file with spaces
Normal file
@ -0,0 +1,4 @@
|
||||
This
|
||||
filename
|
||||
contains
|
||||
spaces.
|
6
gitweb/test/file+plus+sign
Normal file
6
gitweb/test/file+plus+sign
Normal file
@ -0,0 +1,6 @@
|
||||
This
|
||||
filename
|
||||
contains
|
||||
+
|
||||
plus
|
||||
chars.
|
Loading…
Reference in New Issue
Block a user