mirror of
https://github.com/git/git.git
synced 2026-03-29 01:50:08 +01:00
Merge branch 'master' into next
* master: gitweb: move highlight config out of guess_file_syntax() SubmittingPatches: Cite the 50 char subject limit SubmittingPatches: Clarify the Signed-off-by rules upload-pack: remove unused "create_full_pack" code in do_rev_list Git 1.7.2.1 Git 1.7.1.2 Git 1.7.0.7 config --get --path: check for unset $HOME commit: remove full stop from usage help for -u Clarify help message when no remote is specified in fetch/pull. Makefile: add check-docs exception for gitrevisions Fix 'git' wrapper usage string
This commit is contained in:
16
Documentation/RelNotes-1.7.0.7.txt
Normal file
16
Documentation/RelNotes-1.7.0.7.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Git v1.7.0.7 Release Notes
|
||||
==========================
|
||||
|
||||
Fixes since v1.7.0.6
|
||||
--------------------
|
||||
|
||||
* "make NO_CURL=NoThanks install" was broken.
|
||||
|
||||
* An overlong line after ".gitdir: " in a git file caused out of bounds
|
||||
access to an array on the stack.
|
||||
|
||||
* "git config --path conf.var" to attempt to expand a variable conf.var
|
||||
that uses "~/" short-hand segfaulted when $HOME environment variable
|
||||
was not set.
|
||||
|
||||
And other minor fixes and documentation updates.
|
||||
@@ -17,3 +17,12 @@ Fixes since v1.7.1.1
|
||||
|
||||
* "git rev-parse --parseopt --stop-at-non-option" did not stop at non option
|
||||
when --keep-dashdash was in effect.
|
||||
|
||||
* An overlong line after ".gitdir: " in a git file caused out of bounds
|
||||
access to an array on the stack.
|
||||
|
||||
* "git config --path conf.var" to attempt to expand a variable conf.var
|
||||
that uses "~/" short-hand segfaulted when $HOME environment variable
|
||||
was not set.
|
||||
|
||||
And other minor fixes and documentation updates.
|
||||
|
||||
25
Documentation/RelNotes-1.7.2.1.txt
Normal file
25
Documentation/RelNotes-1.7.2.1.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
Git v1.7.2.1 Release Notes
|
||||
==========================
|
||||
|
||||
Fixes since v1.7.2
|
||||
------------------
|
||||
|
||||
* "git instaweb" wasn't useful when your Apache was installed under a
|
||||
name other than apache2 (e.g. "httpd").
|
||||
|
||||
* Similarly, "git web--browse" (invoked by "git help -w") learned that
|
||||
chrome browser is sometimes called google-chrome.
|
||||
|
||||
* An overlong line after ".gitdir: " in a git file caused out of bounds
|
||||
access to an array on the stack.
|
||||
|
||||
* "git config --path conf.var" to attempt to expand a variable conf.var
|
||||
that uses "~/" short-hand segfaulted when $HOME environment variable
|
||||
was not set.
|
||||
|
||||
* Documentation on Cygwin failed to build.
|
||||
|
||||
* The error message from "git pull blarg" when 'blarg' is an unknown
|
||||
remote name has been improved.
|
||||
|
||||
And other minor fixes and documentation updates.
|
||||
@@ -7,17 +7,16 @@ Checklist (and a short version for the impatient):
|
||||
before committing
|
||||
- do not check in commented out code or unneeded files
|
||||
- the first line of the commit message should be a short
|
||||
description and should skip the full stop
|
||||
description (50 characters is the soft limit, see DISCUSSION
|
||||
in git-commit(1)), and should skip the full stop
|
||||
- the body should provide a meaningful commit message, which:
|
||||
- uses the imperative, present tense: "change",
|
||||
not "changed" or "changes".
|
||||
- includes motivation for the change, and contrasts
|
||||
its implementation with previous behaviour
|
||||
- if you want your work included in git.git, add a
|
||||
"Signed-off-by: Your Name <you@example.com>" line to the
|
||||
commit message (or just use the option "-s" when
|
||||
committing) to confirm that you agree to the Developer's
|
||||
Certificate of Origin
|
||||
- add a "Signed-off-by: Your Name <you@example.com>" line to the
|
||||
commit message (or just use the option "-s" when committing)
|
||||
to confirm that you agree to the Developer's Certificate of Origin
|
||||
- make sure that you have tests for the bug you are fixing
|
||||
- make sure that the test suite passes after your commit
|
||||
|
||||
|
||||
@@ -44,20 +44,23 @@ unreleased) version of git, that is available from 'master'
|
||||
branch of the `git.git` repository.
|
||||
Documentation for older releases are available here:
|
||||
|
||||
* link:v1.7.2/git.html[documentation for release 1.7.2]
|
||||
* link:v1.7.2.1/git.html[documentation for release 1.7.2.1]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes-1.7.2.1.txt[1.7.2.1],
|
||||
link:RelNotes-1.7.2.txt[1.7.2].
|
||||
|
||||
* link:v1.7.1.1/git.html[documentation for release 1.7.1.1]
|
||||
* link:v1.7.1.2/git.html[documentation for release 1.7.1.2]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes-1.7.1.2.txt[1.7.1.2],
|
||||
link:RelNotes-1.7.1.1.txt[1.7.1.1],
|
||||
link:RelNotes-1.7.1.txt[1.7.1].
|
||||
|
||||
* link:v1.7.0.6/git.html[documentation for release 1.7.0.6]
|
||||
* link:v1.7.0.7/git.html[documentation for release 1.7.0.7]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes-1.7.0.7.txt[1.7.0.7],
|
||||
link:RelNotes-1.7.0.6.txt[1.7.0.6],
|
||||
link:RelNotes-1.7.0.5.txt[1.7.0.5],
|
||||
link:RelNotes-1.7.0.4.txt[1.7.0.4],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v1.7.2
|
||||
DEF_VER=v1.7.2.GIT
|
||||
|
||||
LF='
|
||||
'
|
||||
|
||||
1
Makefile
1
Makefile
@@ -2254,6 +2254,7 @@ check-docs::
|
||||
documented,gitglossary | \
|
||||
documented,githooks | \
|
||||
documented,gitrepository-layout | \
|
||||
documented,gitrevisions | \
|
||||
documented,gittutorial | \
|
||||
documented,gittutorial-2 | \
|
||||
documented,git-bisect-lk2009 | \
|
||||
|
||||
2
RelNotes
2
RelNotes
@@ -1 +1 @@
|
||||
Documentation/RelNotes-1.7.2.txt
|
||||
Documentation/RelNotes-1.7.2.1.txt
|
||||
@@ -147,7 +147,7 @@ static struct option builtin_commit_options[] = {
|
||||
"terminate entries with NUL"),
|
||||
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
|
||||
OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, "bypass post-rewrite hook"),
|
||||
{ OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
|
||||
{ OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
|
||||
/* end commit contents options */
|
||||
|
||||
{ OPTION_BOOLEAN, 0, "allow-empty", &allow_empty, NULL,
|
||||
|
||||
@@ -845,7 +845,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
|
||||
int exit_code;
|
||||
|
||||
if (!remote)
|
||||
die("Where do you want to fetch from today?");
|
||||
die("No remote repository specified. Please, specify either a URL or a\n"
|
||||
"remote name from which new revisions should be fetched.");
|
||||
|
||||
transport = transport_get(remote, NULL);
|
||||
transport_set_verbosity(transport, verbosity, progress);
|
||||
|
||||
4
git.c
4
git.c
@@ -8,8 +8,8 @@ const char git_usage_string[] =
|
||||
"git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n"
|
||||
" [-p|--paginate|--no-pager] [--no-replace-objects]\n"
|
||||
" [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n"
|
||||
" [-c name=value\n"
|
||||
" [--help] COMMAND [ARGS]";
|
||||
" [-c name=value] [--help]\n"
|
||||
" COMMAND [ARGS]";
|
||||
|
||||
const char git_more_info_string[] =
|
||||
"See 'git help COMMAND' for more information on a specific command.";
|
||||
|
||||
@@ -232,6 +232,29 @@ our %avatar_size = (
|
||||
# Leave it undefined (or set to 'undef') to turn off load checking.
|
||||
our $maxload = 300;
|
||||
|
||||
# configuration for 'highlight' (http://www.andre-simon.de/)
|
||||
# match by basename
|
||||
our %highlight_basename = (
|
||||
#'Program' => 'py',
|
||||
#'Library' => 'py',
|
||||
'SConstruct' => 'py', # SCons equivalent of Makefile
|
||||
'Makefile' => 'make',
|
||||
);
|
||||
# match by extension
|
||||
our %highlight_ext = (
|
||||
# main extensions, defining name of syntax;
|
||||
# see files in /usr/share/highlight/langDefs/ directory
|
||||
map { $_ => $_ }
|
||||
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl),
|
||||
# alternate extensions, see /etc/highlight/filetypes.conf
|
||||
'h' => 'c',
|
||||
map { $_ => 'cpp' } qw(cxx c++ cc),
|
||||
map { $_ => 'php' } qw(php3 php4),
|
||||
map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
|
||||
'mak' => 'make',
|
||||
map { $_ => 'xml' } qw(xhtml html htm),
|
||||
);
|
||||
|
||||
# You define site-wide feature defaults here; override them with
|
||||
# $GITWEB_CONFIG as necessary.
|
||||
our %feature = (
|
||||
@@ -3316,30 +3339,6 @@ sub blob_contenttype {
|
||||
sub guess_file_syntax {
|
||||
my ($highlight, $mimetype, $file_name) = @_;
|
||||
return undef unless ($highlight && defined $file_name);
|
||||
|
||||
# configuration for 'highlight' (http://www.andre-simon.de/)
|
||||
# match by basename
|
||||
my %highlight_basename = (
|
||||
#'Program' => 'py',
|
||||
#'Library' => 'py',
|
||||
'SConstruct' => 'py', # SCons equivalent of Makefile
|
||||
'Makefile' => 'make',
|
||||
);
|
||||
# match by extension
|
||||
my %highlight_ext = (
|
||||
# main extensions, defining name of syntax;
|
||||
# see files in /usr/share/highlight/langDefs/ directory
|
||||
map { $_ => $_ }
|
||||
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl),
|
||||
# alternate extensions, see /etc/highlight/filetypes.conf
|
||||
'h' => 'c',
|
||||
map { $_ => 'cpp' } qw(cxx c++ cc),
|
||||
map { $_ => 'php' } qw(php3 php4),
|
||||
map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
|
||||
'mak' => 'make',
|
||||
map { $_ => 'xml' } qw(xhtml html htm),
|
||||
);
|
||||
|
||||
my $basename = basename($file_name, '.in');
|
||||
return $highlight_basename{$basename}
|
||||
if exists $highlight_basename{$basename};
|
||||
|
||||
2
path.c
2
path.c
@@ -316,6 +316,8 @@ char *expand_user_path(const char *path)
|
||||
size_t username_len = first_slash - username;
|
||||
if (username_len == 0) {
|
||||
const char *home = getenv("HOME");
|
||||
if (!home)
|
||||
goto return_null;
|
||||
strbuf_add(&user_path, home, strlen(home));
|
||||
} else {
|
||||
struct passwd *pw = getpw_str(username, username_len);
|
||||
|
||||
@@ -707,19 +707,41 @@ test_expect_success 'set --path' '
|
||||
git config --path path.trailingtilde "foo~" &&
|
||||
test_cmp expect .git/config'
|
||||
|
||||
if test "${HOME+set}"
|
||||
then
|
||||
test_set_prereq HOMEVAR
|
||||
fi
|
||||
|
||||
cat >expect <<EOF
|
||||
$HOME/
|
||||
/dev/null
|
||||
foo~
|
||||
EOF
|
||||
|
||||
test_expect_success 'get --path' '
|
||||
test_expect_success HOMEVAR 'get --path' '
|
||||
git config --get --path path.home > result &&
|
||||
git config --get --path path.normal >> result &&
|
||||
git config --get --path path.trailingtilde >> result &&
|
||||
test_cmp expect result
|
||||
'
|
||||
|
||||
cat >expect <<\EOF
|
||||
/dev/null
|
||||
foo~
|
||||
EOF
|
||||
|
||||
test_expect_success 'get --path copes with unset $HOME' '
|
||||
(
|
||||
unset HOME;
|
||||
test_must_fail git config --get --path path.home \
|
||||
>result 2>msg &&
|
||||
git config --get --path path.normal >>result &&
|
||||
git config --get --path path.trailingtilde >>result
|
||||
) &&
|
||||
grep "[Ff]ailed to expand.*~/" msg &&
|
||||
test_cmp expect result
|
||||
'
|
||||
|
||||
rm .git/config
|
||||
|
||||
git config quote.leading " test"
|
||||
|
||||
@@ -105,7 +105,7 @@ static void show_edge(struct commit *commit)
|
||||
fprintf(pack_pipe, "-%s\n", sha1_to_hex(commit->object.sha1));
|
||||
}
|
||||
|
||||
static int do_rev_list(int in, int out, void *create_full_pack)
|
||||
static int do_rev_list(int in, int out, void *user_data)
|
||||
{
|
||||
int i;
|
||||
struct rev_info revs;
|
||||
@@ -118,23 +118,18 @@ static int do_rev_list(int in, int out, void *create_full_pack)
|
||||
if (use_thin_pack)
|
||||
revs.edge_hint = 1;
|
||||
|
||||
if (create_full_pack) {
|
||||
const char *args[] = {"rev-list", "--all", NULL};
|
||||
setup_revisions(2, args, &revs, NULL);
|
||||
} else {
|
||||
for (i = 0; i < want_obj.nr; i++) {
|
||||
struct object *o = want_obj.objects[i].item;
|
||||
/* why??? */
|
||||
o->flags &= ~UNINTERESTING;
|
||||
add_pending_object(&revs, o, NULL);
|
||||
}
|
||||
for (i = 0; i < have_obj.nr; i++) {
|
||||
struct object *o = have_obj.objects[i].item;
|
||||
o->flags |= UNINTERESTING;
|
||||
add_pending_object(&revs, o, NULL);
|
||||
}
|
||||
setup_revisions(0, NULL, &revs, NULL);
|
||||
for (i = 0; i < want_obj.nr; i++) {
|
||||
struct object *o = want_obj.objects[i].item;
|
||||
/* why??? */
|
||||
o->flags &= ~UNINTERESTING;
|
||||
add_pending_object(&revs, o, NULL);
|
||||
}
|
||||
for (i = 0; i < have_obj.nr; i++) {
|
||||
struct object *o = have_obj.objects[i].item;
|
||||
o->flags |= UNINTERESTING;
|
||||
add_pending_object(&revs, o, NULL);
|
||||
}
|
||||
setup_revisions(0, NULL, &revs, NULL);
|
||||
if (prepare_revision_walk(&revs))
|
||||
die("revision walk setup failed");
|
||||
mark_edges_uninteresting(revs.commits, &revs, show_edge);
|
||||
|
||||
Reference in New Issue
Block a user