Merge branch 'maint'
* maint: http.c: Fix problem with repeated calls of http_init Add missing reference to GIT_COMMITTER_DATE in git-commit-tree documentation Fix import-tars fix. Update .mailmap with "Michael" Do not barf on too long action description Catch empty pathnames in trees during fsck Don't allow empty pathnames in fast-import import-tars: be nice to wrong directory modes git-svn: Added 'find-rev' command git shortlog documentation: add long options and fix a typo
This commit is contained in:
commit
39231b1c32
1
.mailmap
1
.mailmap
@ -23,6 +23,7 @@ Lars Doelle <lars.doelle@on-line.de>
|
|||||||
Lars Doelle <lars.doelle@on-line ! de>
|
Lars Doelle <lars.doelle@on-line ! de>
|
||||||
Lukas Sandström <lukass@etek.chalmers.se>
|
Lukas Sandström <lukass@etek.chalmers.se>
|
||||||
Martin Langhoff <martin@catalyst.net.nz>
|
Martin Langhoff <martin@catalyst.net.nz>
|
||||||
|
Michele Ballabio <barra_cuda@katamail.com>
|
||||||
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
|
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
|
||||||
Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
|
Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
|
||||||
René Scharfe <rene.scharfe@lsrfire.ath.cx>
|
René Scharfe <rene.scharfe@lsrfire.ath.cx>
|
||||||
|
@ -60,6 +60,7 @@ either `.git/config` file, or using the following environment variables.
|
|||||||
GIT_AUTHOR_DATE
|
GIT_AUTHOR_DATE
|
||||||
GIT_COMMITTER_NAME
|
GIT_COMMITTER_NAME
|
||||||
GIT_COMMITTER_EMAIL
|
GIT_COMMITTER_EMAIL
|
||||||
|
GIT_COMMITTER_DATE
|
||||||
|
|
||||||
(nb "<", ">" and "\n"s are stripped)
|
(nb "<", ">" and "\n"s are stripped)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ SYNOPSIS
|
|||||||
--------
|
--------
|
||||||
[verse]
|
[verse]
|
||||||
git-log --pretty=short | 'git-shortlog' [-h] [-n] [-s]
|
git-log --pretty=short | 'git-shortlog' [-h] [-n] [-s]
|
||||||
git-shortlog [-n|--number] [-s|--summary] [<committish>...]
|
git-shortlog [-n|--numbered] [-s|--summary] [<committish>...]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
@ -22,14 +22,14 @@ Additionally, "[PATCH]" will be stripped from the commit description.
|
|||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
|
|
||||||
-h::
|
-h, \--help::
|
||||||
Print a short usage message and exit.
|
Print a short usage message and exit.
|
||||||
|
|
||||||
-n::
|
-n, \--numbered::
|
||||||
Sort output according to the number of commits per author instead
|
Sort output according to the number of commits per author instead
|
||||||
of author alphabetic order.
|
of author alphabetic order.
|
||||||
|
|
||||||
-s::
|
-s, \--summary::
|
||||||
Suppress commit description and provide a commit count summary only.
|
Suppress commit description and provide a commit count summary only.
|
||||||
|
|
||||||
FILES
|
FILES
|
||||||
|
@ -159,6 +159,11 @@ New features:
|
|||||||
Any other arguments are passed directly to `git log'
|
Any other arguments are passed directly to `git log'
|
||||||
|
|
||||||
--
|
--
|
||||||
|
'find-rev'::
|
||||||
|
When given an SVN revision number of the form 'rN', returns the
|
||||||
|
corresponding git commit hash. When given a tree-ish, returns the
|
||||||
|
corresponding SVN revision number.
|
||||||
|
|
||||||
'set-tree'::
|
'set-tree'::
|
||||||
You should consider using 'dcommit' instead of this command.
|
You should consider using 'dcommit' instead of this command.
|
||||||
Commit specified commit or tree objects to SVN. This relies on
|
Commit specified commit or tree objects to SVN. This relies on
|
||||||
|
@ -344,6 +344,7 @@ git Commits
|
|||||||
'GIT_AUTHOR_DATE'::
|
'GIT_AUTHOR_DATE'::
|
||||||
'GIT_COMMITTER_NAME'::
|
'GIT_COMMITTER_NAME'::
|
||||||
'GIT_COMMITTER_EMAIL'::
|
'GIT_COMMITTER_EMAIL'::
|
||||||
|
'GIT_COMMITTER_DATE'::
|
||||||
see gitlink:git-commit-tree[1]
|
see gitlink:git-commit-tree[1]
|
||||||
|
|
||||||
git Diffs
|
git Diffs
|
||||||
|
@ -35,16 +35,13 @@ static int update_ref(const char *action,
|
|||||||
unsigned char *sha1,
|
unsigned char *sha1,
|
||||||
unsigned char *oldval)
|
unsigned char *oldval)
|
||||||
{
|
{
|
||||||
int len;
|
|
||||||
char msg[1024];
|
char msg[1024];
|
||||||
char *rla = getenv("GIT_REFLOG_ACTION");
|
char *rla = getenv("GIT_REFLOG_ACTION");
|
||||||
static struct ref_lock *lock;
|
static struct ref_lock *lock;
|
||||||
|
|
||||||
if (!rla)
|
if (!rla)
|
||||||
rla = "(reflog update)";
|
rla = "(reflog update)";
|
||||||
len = snprintf(msg, sizeof(msg), "%s: %s", rla, action);
|
snprintf(msg, sizeof(msg), "%s: %s", rla, action);
|
||||||
if (sizeof(msg) <= len)
|
|
||||||
die("insanely long action");
|
|
||||||
lock = lock_any_ref_for_update(refname, oldval);
|
lock = lock_any_ref_for_update(refname, oldval);
|
||||||
if (!lock)
|
if (!lock)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -219,6 +219,7 @@ static int fsck_tree(struct tree *item)
|
|||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
int has_full_path = 0;
|
int has_full_path = 0;
|
||||||
|
int has_empty_name = 0;
|
||||||
int has_zero_pad = 0;
|
int has_zero_pad = 0;
|
||||||
int has_bad_modes = 0;
|
int has_bad_modes = 0;
|
||||||
int has_dup_entries = 0;
|
int has_dup_entries = 0;
|
||||||
@ -242,6 +243,8 @@ static int fsck_tree(struct tree *item)
|
|||||||
|
|
||||||
if (strchr(name, '/'))
|
if (strchr(name, '/'))
|
||||||
has_full_path = 1;
|
has_full_path = 1;
|
||||||
|
if (!*name)
|
||||||
|
has_empty_name = 1;
|
||||||
has_zero_pad |= *(char *)desc.buffer == '0';
|
has_zero_pad |= *(char *)desc.buffer == '0';
|
||||||
update_tree_entry(&desc);
|
update_tree_entry(&desc);
|
||||||
|
|
||||||
@ -291,6 +294,9 @@ static int fsck_tree(struct tree *item)
|
|||||||
if (has_full_path) {
|
if (has_full_path) {
|
||||||
objwarning(&item->object, "contains full pathnames");
|
objwarning(&item->object, "contains full pathnames");
|
||||||
}
|
}
|
||||||
|
if (has_empty_name) {
|
||||||
|
objwarning(&item->object, "contains empty pathname");
|
||||||
|
}
|
||||||
if (has_zero_pad) {
|
if (has_zero_pad) {
|
||||||
objwarning(&item->object, "contains zero-padded file modes");
|
objwarning(&item->object, "contains zero-padded file modes");
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
Z8 Z1 Z100 Z6
|
Z8 Z1 Z100 Z6
|
||||||
Z2 Z32 Z32 Z8 Z8 Z*', $_;
|
Z2 Z32 Z32 Z8 Z8 Z*', $_;
|
||||||
last unless $name;
|
last unless $name;
|
||||||
|
next if $name =~ m{/\z};
|
||||||
$mode = oct $mode;
|
$mode = oct $mode;
|
||||||
$size = oct $size;
|
$size = oct $size;
|
||||||
$mtime = oct $mtime;
|
$mtime = oct $mtime;
|
||||||
|
@ -1199,6 +1199,8 @@ static int tree_content_set(
|
|||||||
n = slash1 - p;
|
n = slash1 - p;
|
||||||
else
|
else
|
||||||
n = strlen(p);
|
n = strlen(p);
|
||||||
|
if (!n)
|
||||||
|
die("Empty path component found in input");
|
||||||
|
|
||||||
for (i = 0; i < t->entry_count; i++) {
|
for (i = 0; i < t->entry_count; i++) {
|
||||||
e = t->entries[i];
|
e = t->entries[i];
|
||||||
|
24
git-svn.perl
24
git-svn.perl
@ -141,6 +141,8 @@ BEGIN
|
|||||||
'color' => \$Git::SVN::Log::color,
|
'color' => \$Git::SVN::Log::color,
|
||||||
'pager=s' => \$Git::SVN::Log::pager,
|
'pager=s' => \$Git::SVN::Log::pager,
|
||||||
} ],
|
} ],
|
||||||
|
'find-rev' => [ \&cmd_find_rev, "Translate between SVN revision numbers and tree-ish",
|
||||||
|
{ } ],
|
||||||
'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory",
|
'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory",
|
||||||
{ 'merge|m|M' => \$_merge,
|
{ 'merge|m|M' => \$_merge,
|
||||||
'verbose|v' => \$_verbose,
|
'verbose|v' => \$_verbose,
|
||||||
@ -428,6 +430,28 @@ sub cmd_dcommit {
|
|||||||
command_noisy(@finish, $gs->refname);
|
command_noisy(@finish, $gs->refname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub cmd_find_rev {
|
||||||
|
my $revision_or_hash = shift;
|
||||||
|
my $result;
|
||||||
|
if ($revision_or_hash =~ /^r\d+$/) {
|
||||||
|
my $desired_revision = substr($revision_or_hash, 1);
|
||||||
|
my ($fh, $ctx) = command_output_pipe('rev-list', 'HEAD');
|
||||||
|
while (my $hash = <$fh>) {
|
||||||
|
chomp($hash);
|
||||||
|
my (undef, $rev, undef) = cmt_metadata($hash);
|
||||||
|
if ($rev && $rev eq $desired_revision) {
|
||||||
|
$result = $hash;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
command_close_pipe($fh, $ctx);
|
||||||
|
} else {
|
||||||
|
my (undef, $rev, undef) = cmt_metadata($revision_or_hash);
|
||||||
|
$result = $rev;
|
||||||
|
}
|
||||||
|
print "$result\n" if $result;
|
||||||
|
}
|
||||||
|
|
||||||
sub cmd_rebase {
|
sub cmd_rebase {
|
||||||
command_noisy(qw/update-index --refresh/);
|
command_noisy(qw/update-index --refresh/);
|
||||||
my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
|
my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
|
||||||
|
1
http.c
1
http.c
@ -300,6 +300,7 @@ void http_cleanup(void)
|
|||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
|
||||||
curl_slist_free_all(pragma_header);
|
curl_slist_free_all(pragma_header);
|
||||||
|
pragma_header = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct active_request_slot *get_active_slot(void)
|
struct active_request_slot *get_active_slot(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user