Compare commits
38 Commits
v1.8.4-rc0
...
v1.8.4-rc1
Author | SHA1 | Date | |
---|---|---|---|
304852fc77 | |||
d50cb7569c | |||
898bbe9664 | |||
baa2e93699 | |||
a5203a3f04 | |||
400bf4c46b | |||
c2980866b7 | |||
8dc84fdc48 | |||
c8686e510f | |||
2ed8ecaf57 | |||
af77c0b1cf | |||
652d2bfa83 | |||
5ecc4b53f7 | |||
f1093b0f60 | |||
35f5eaa2ee | |||
3717c73f62 | |||
1ddc11a6fd | |||
8e943c248a | |||
98e023dea4 | |||
ac1998dedd | |||
19c3c5fdcb | |||
d7a1d629c3 | |||
c17592a7a2 | |||
29d55538b7 | |||
5ff0c0e875 | |||
4acbe91a82 | |||
658ff473cf | |||
8f6a3e5d71 | |||
6083861305 | |||
309422e033 | |||
78910462ce | |||
69fb96037f | |||
af608260f6 | |||
9354b9a4f0 | |||
9a621ad085 | |||
e78095c3d0 | |||
1611eed6e5 | |||
d0cf51e940 |
4
.mailmap
4
.mailmap
@ -26,6 +26,8 @@ Bryan Larsen <bryan@larsen.st> <bryanlarsen@yahoo.com>
|
||||
Cheng Renquan <crquan@gmail.com>
|
||||
Chris Shoemaker <c.shoemaker@cox.net>
|
||||
Chris Wright <chrisw@sous-sol.org> <chrisw@osdl.org>
|
||||
Cord Seele <cowose@gmail.com> <cowose@googlemail.com>
|
||||
Christian Stimming <stimming@tuhh.de> <chs@ckiste.goetheallee>
|
||||
Csaba Henk <csaba@gluster.com> <csaba@lowlife.hu>
|
||||
Dan Johnson <computerdruid@gmail.com>
|
||||
Dana L. How <danahow@gmail.com> <how@deathvalley.cswitch.com>
|
||||
@ -74,6 +76,7 @@ Johannes Schindelin <Johannes.Schindelin@gmx.de> <johannes.schindelin@gmx.de>
|
||||
Johannes Sixt <j6t@kdbg.org> <J.Sixt@eudaptics.com>
|
||||
Johannes Sixt <j6t@kdbg.org> <j.sixt@viscovery.net>
|
||||
Johannes Sixt <j6t@kdbg.org> <johannes.sixt@telecom.at>
|
||||
John 'Warthog9' Hawley <warthog9@kernel.org> <warthog9@eaglescrag.net>
|
||||
Jon Loeliger <jdl@jdl.com> <jdl@freescale.com>
|
||||
Jon Loeliger <jdl@jdl.com> <jdl@freescale.org>
|
||||
Jon Seymour <jon.seymour@gmail.com> <jon@blackcubes.dyndns.org>
|
||||
@ -181,6 +184,7 @@ Simon Hausmann <hausmann@kde.org> <shausman@trolltech.com>
|
||||
Stefan Naewe <stefan.naewe@gmail.com> <stefan.naewe@atlas-elektronik.com>
|
||||
Stefan Naewe <stefan.naewe@gmail.com> <stefan.naewe@googlemail.com>
|
||||
Stefan Sperling <stsp@elego.de> <stsp@stsp.name>
|
||||
Štěpán Němec <stepnem@gmail.com> <stepan.nemec@gmail.com>
|
||||
Stephen Boyd <bebarino@gmail.com> <sboyd@codeaurora.org>
|
||||
Steven Drake <sdrake@xnet.co.nz> <sdrake@ihug.co.nz>
|
||||
Steven Grimm <koreth@midwinter.com> <sgrimm@sgrimm-mbp.local>
|
||||
|
@ -111,7 +111,7 @@ select by numbers::
|
||||
'>>' like this, you can make more than one selection, concatenated
|
||||
with whitespace or comma. Also you can say ranges. E.g. "2-5 7,9"
|
||||
to choose 2,3,4,5,7,9 from the list. If the second number in a
|
||||
range is omitted, all remaining patches are taken. E.g. "7-" to
|
||||
range is omitted, all remaining items are selected. E.g. "7-" to
|
||||
choose 7,8,9 from the list. You can say '*' to choose everything.
|
||||
Also when you are satisfied with the filtered result, press ENTER
|
||||
(empty) back to the main menu.
|
||||
|
@ -96,29 +96,31 @@ OPTIONS
|
||||
names are not.
|
||||
|
||||
--global::
|
||||
For writing options: write to global ~/.gitconfig file rather than
|
||||
the repository .git/config, write to $XDG_CONFIG_HOME/git/config file
|
||||
if this file exists and the ~/.gitconfig file doesn't.
|
||||
For writing options: write to global `~/.gitconfig` file
|
||||
rather than the repository `.git/config`, write to
|
||||
`$XDG_CONFIG_HOME/git/config` file if this file exists and the
|
||||
`~/.gitconfig` file doesn't.
|
||||
+
|
||||
For reading options: read only from global ~/.gitconfig and from
|
||||
$XDG_CONFIG_HOME/git/config rather than from all available files.
|
||||
For reading options: read only from global `~/.gitconfig` and from
|
||||
`$XDG_CONFIG_HOME/git/config` rather than from all available files.
|
||||
+
|
||||
See also <<FILES>>.
|
||||
|
||||
--system::
|
||||
For writing options: write to system-wide $(prefix)/etc/gitconfig
|
||||
rather than the repository .git/config.
|
||||
For writing options: write to system-wide
|
||||
`$(prefix)/etc/gitconfig` rather than the repository
|
||||
`.git/config`.
|
||||
+
|
||||
For reading options: read only from system-wide $(prefix)/etc/gitconfig
|
||||
For reading options: read only from system-wide `$(prefix)/etc/gitconfig`
|
||||
rather than from all available files.
|
||||
+
|
||||
See also <<FILES>>.
|
||||
|
||||
--local::
|
||||
For writing options: write to the repository .git/config file.
|
||||
For writing options: write to the repository `.git/config` file.
|
||||
This is the default behavior.
|
||||
+
|
||||
For reading options: read only from the repository .git/config rather than
|
||||
For reading options: read only from the repository `.git/config` rather than
|
||||
from all available files.
|
||||
+
|
||||
See also <<FILES>>.
|
||||
@ -218,9 +220,9 @@ $(prefix)/etc/gitconfig::
|
||||
|
||||
$XDG_CONFIG_HOME/git/config::
|
||||
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
|
||||
or empty, $HOME/.config/git/config will be used. Any single-valued
|
||||
or empty, `$HOME/.config/git/config` will be used. Any single-valued
|
||||
variable set in this file will be overwritten by whatever is in
|
||||
~/.gitconfig. It is a good idea not to create this file if
|
||||
`~/.gitconfig`. It is a good idea not to create this file if
|
||||
you sometimes use older versions of Git, as support for this
|
||||
file was added fairly recently.
|
||||
|
||||
|
@ -42,6 +42,17 @@ committer identity for the current user is used to find the
|
||||
GnuPG key for signing. The configuration variable `gpg.program`
|
||||
is used to specify custom GnuPG binary.
|
||||
|
||||
Tag objects (created with `-a`, `s`, or `-u`) are called "annotated"
|
||||
tags; they contain a creation date, the tagger name and e-mail, a
|
||||
tagging message, and an optional GnuPG signature. Whereas a
|
||||
"lightweight" tag is simply a name for an object (usually a commit
|
||||
object).
|
||||
|
||||
Annotated tags are meant for release while lightweight tags are meant
|
||||
for private or temporary object labels. For this reason, some git
|
||||
commands for naming objects (like `git describe`) will ignore
|
||||
lightweight tags by default.
|
||||
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
@ -94,7 +94,7 @@ your language, document it in the INSTALL file.
|
||||
6. There is a file command-list.txt in the distribution main directory
|
||||
that categorizes commands by type, so they can be listed in appropriate
|
||||
subsections in the documentation's summary command list. Add an entry
|
||||
for yours. To understand the categories, look at git-cmmands.txt
|
||||
for yours. To understand the categories, look at git-commands.txt
|
||||
in the main directory.
|
||||
|
||||
7. Give the maintainer one paragraph to include in the RelNotes file
|
||||
|
@ -59,7 +59,7 @@ function.
|
||||
`reset_revision_walk`::
|
||||
|
||||
Reset the flags used by the revision walking api. You can use
|
||||
this to do multiple sequencial revision walks.
|
||||
this to do multiple sequential revision walks.
|
||||
|
||||
Data structures
|
||||
---------------
|
||||
|
@ -18,11 +18,12 @@ was sent. Server MUST NOT ignore capabilities that client requested
|
||||
and server advertised. As a consequence of these rules, server MUST
|
||||
NOT advertise capabilities it does not understand.
|
||||
|
||||
The 'report-status' and 'delete-refs' capabilities are sent and
|
||||
The 'report-status', 'delete-refs', and 'quiet' capabilities are sent and
|
||||
recognized by the receive-pack (push to server) process.
|
||||
|
||||
The 'ofs-delta' capability is sent and recognized by both upload-pack
|
||||
and receive-pack protocols.
|
||||
The 'ofs-delta' and 'side-band-64k' capabilities are sent and recognized
|
||||
by both upload-pack and receive-pack protocols. The 'agent' capability
|
||||
may optionally be sent in both protocols.
|
||||
|
||||
All other capabilities are only recognized by the upload-pack (fetch
|
||||
from server) process.
|
||||
@ -123,6 +124,20 @@ Server can send, and client understand PACKv2 with delta referring to
|
||||
its base by position in pack rather than by an obj-id. That is, they can
|
||||
send/read OBJ_OFS_DELTA (aka type 6) in a packfile.
|
||||
|
||||
agent
|
||||
-----
|
||||
|
||||
The server may optionally send a capability of the form `agent=X` to
|
||||
notify the client that the server is running version `X`. The client may
|
||||
optionally return its own agent string by responding with an `agent=Y`
|
||||
capability (but it MUST NOT do so if the server did not mention the
|
||||
agent capability). The `X` and `Y` strings may contain any printable
|
||||
ASCII characters except space (i.e., the byte range 32 < x < 127), and
|
||||
are typically of the form "package/version" (e.g., "git/1.8.3.1"). The
|
||||
agent strings are purely informative for statistics and debugging
|
||||
purposes, and MUST NOT be used to programatically assume the presence
|
||||
or absence of particular features.
|
||||
|
||||
shallow
|
||||
-------
|
||||
|
||||
@ -168,7 +183,7 @@ of whether or not there are tags available.
|
||||
report-status
|
||||
-------------
|
||||
|
||||
The upload-pack process can receive a 'report-status' capability,
|
||||
The receive-pack process can receive a 'report-status' capability,
|
||||
which tells it that the client wants a report of what happened after
|
||||
a packfile upload and reference update. If the pushing client requests
|
||||
this capability, after unpacking and updating references the server
|
||||
@ -185,3 +200,20 @@ it is capable of accepting a zero-id value as the target
|
||||
value of a reference update. It is not sent back by the client, it
|
||||
simply informs the client that it can be sent zero-id values
|
||||
to delete references.
|
||||
|
||||
quiet
|
||||
-----
|
||||
|
||||
If the receive-pack server advertises the 'quiet' capability, it is
|
||||
capable of silencing human-readable progress output which otherwise may
|
||||
be shown when processing the received pack. A send-pack client should
|
||||
respond with the 'quiet' capability to suppress server-side progress
|
||||
reporting if the local progress reporting is also being suppressed
|
||||
(e.g., via `push -q`, or if stderr does not go to a tty).
|
||||
|
||||
allow-tip-sha1-in-want
|
||||
----------------------
|
||||
|
||||
If the upload-pack server advertises this capability, fetch-pack may
|
||||
send "want" lines with SHA-1s that exist at the server but are not
|
||||
advertised by upload-pack.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v1.8.4-rc0
|
||||
DEF_VER=v1.8.4-rc1
|
||||
|
||||
LF='
|
||||
'
|
||||
|
2
advice.c
2
advice.c
@ -35,7 +35,7 @@ static struct {
|
||||
{ "implicitidentity", &advice_implicit_identity },
|
||||
{ "detachedhead", &advice_detached_head },
|
||||
{ "setupstreamfailure", &advice_set_upstream_failure },
|
||||
{ "object_name_warning", &advice_object_name_warning },
|
||||
{ "objectnamewarning", &advice_object_name_warning },
|
||||
{ "rmhints", &advice_rm_hints },
|
||||
|
||||
/* make this an alias for backward compatibility */
|
||||
|
@ -365,6 +365,56 @@ static void print_highlight_menu_stuff(struct menu_stuff *stuff, int **chosen)
|
||||
string_list_clear(&menu_list, 0);
|
||||
}
|
||||
|
||||
static int find_unique(const char *choice, struct menu_stuff *menu_stuff)
|
||||
{
|
||||
struct menu_item *menu_item;
|
||||
struct string_list_item *string_list_item;
|
||||
int i, len, found = 0;
|
||||
|
||||
len = strlen(choice);
|
||||
switch (menu_stuff->type) {
|
||||
default:
|
||||
die("Bad type of menu_stuff when parse choice");
|
||||
case MENU_STUFF_TYPE_MENU_ITEM:
|
||||
|
||||
menu_item = (struct menu_item *)menu_stuff->stuff;
|
||||
for (i = 0; i < menu_stuff->nr; i++, menu_item++) {
|
||||
if (len == 1 && *choice == menu_item->hotkey) {
|
||||
found = i + 1;
|
||||
break;
|
||||
}
|
||||
if (!strncasecmp(choice, menu_item->title, len)) {
|
||||
if (found) {
|
||||
if (len == 1) {
|
||||
/* continue for hotkey matching */
|
||||
found = -1;
|
||||
} else {
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
found = i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MENU_STUFF_TYPE_STRING_LIST:
|
||||
string_list_item = ((struct string_list *)menu_stuff->stuff)->items;
|
||||
for (i = 0; i < menu_stuff->nr; i++, string_list_item++) {
|
||||
if (!strncasecmp(choice, string_list_item->string, len)) {
|
||||
if (found) {
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
found = i + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Parse user input, and return choice(s) for menu (menu_stuff).
|
||||
*
|
||||
@ -392,8 +442,6 @@ static int parse_choice(struct menu_stuff *menu_stuff,
|
||||
int **chosen)
|
||||
{
|
||||
struct strbuf **choice_list, **ptr;
|
||||
struct menu_item *menu_item;
|
||||
struct string_list_item *string_list_item;
|
||||
int nr = 0;
|
||||
int i;
|
||||
|
||||
@ -457,32 +505,8 @@ static int parse_choice(struct menu_stuff *menu_stuff,
|
||||
bottom = 1;
|
||||
top = menu_stuff->nr;
|
||||
} else {
|
||||
switch (menu_stuff->type) {
|
||||
default:
|
||||
die("Bad type of menu_stuff when parse choice");
|
||||
case MENU_STUFF_TYPE_MENU_ITEM:
|
||||
menu_item = (struct menu_item *)menu_stuff->stuff;
|
||||
for (i = 0; i < menu_stuff->nr; i++, menu_item++) {
|
||||
if (((*ptr)->len == 1 &&
|
||||
*(*ptr)->buf == menu_item->hotkey) ||
|
||||
!strcasecmp((*ptr)->buf, menu_item->title)) {
|
||||
bottom = i + 1;
|
||||
top = bottom;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MENU_STUFF_TYPE_STRING_LIST:
|
||||
string_list_item = ((struct string_list *)menu_stuff->stuff)->items;
|
||||
for (i = 0; i < menu_stuff->nr; i++, string_list_item++) {
|
||||
if (!strcasecmp((*ptr)->buf, string_list_item->string)) {
|
||||
bottom = i + 1;
|
||||
top = bottom;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
bottom = find_unique((*ptr)->buf, menu_stuff);
|
||||
top = bottom;
|
||||
}
|
||||
|
||||
if (top <= 0 || bottom <= 0 || top > menu_stuff->nr || bottom > top ||
|
||||
|
@ -63,8 +63,18 @@ N_("The previous cherry-pick is now empty, possibly due to conflict resolution.\
|
||||
"If you wish to commit it anyway, use:\n"
|
||||
"\n"
|
||||
" git commit --allow-empty\n"
|
||||
"\n");
|
||||
|
||||
static const char empty_cherry_pick_advice_single[] =
|
||||
N_("Otherwise, please use 'git reset'\n");
|
||||
|
||||
static const char empty_cherry_pick_advice_multi[] =
|
||||
N_("If you wish to skip this commit, use:\n"
|
||||
"\n"
|
||||
"Otherwise, please use 'git reset'\n");
|
||||
" git reset\n"
|
||||
"\n"
|
||||
"Then \"git cherry-pick --continue\" will resume cherry-picking\n"
|
||||
"the remaining commits.\n");
|
||||
|
||||
static const char *use_message_buffer;
|
||||
static const char commit_editmsg[] = "COMMIT_EDITMSG";
|
||||
@ -107,6 +117,7 @@ static enum {
|
||||
static const char *cleanup_arg;
|
||||
|
||||
static enum commit_whence whence;
|
||||
static int sequencer_in_use;
|
||||
static int use_editor = 1, include_status = 1;
|
||||
static int show_ignored_in_status, have_option_m;
|
||||
static const char *only_include_assumed;
|
||||
@ -141,8 +152,11 @@ static void determine_whence(struct wt_status *s)
|
||||
{
|
||||
if (file_exists(git_path("MERGE_HEAD")))
|
||||
whence = FROM_MERGE;
|
||||
else if (file_exists(git_path("CHERRY_PICK_HEAD")))
|
||||
else if (file_exists(git_path("CHERRY_PICK_HEAD"))) {
|
||||
whence = FROM_CHERRY_PICK;
|
||||
if (file_exists(git_path("sequencer")))
|
||||
sequencer_in_use = 1;
|
||||
}
|
||||
else
|
||||
whence = FROM_COMMIT;
|
||||
if (s)
|
||||
@ -810,8 +824,13 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
|
||||
run_status(stdout, index_file, prefix, 0, s);
|
||||
if (amend)
|
||||
fputs(_(empty_amend_advice), stderr);
|
||||
else if (whence == FROM_CHERRY_PICK)
|
||||
else if (whence == FROM_CHERRY_PICK) {
|
||||
fputs(_(empty_cherry_pick_advice), stderr);
|
||||
if (!sequencer_in_use)
|
||||
fputs(_(empty_cherry_pick_advice_single), stderr);
|
||||
else
|
||||
fputs(_(empty_cherry_pick_advice_multi), stderr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ static void handle_tag(const char *name, struct tag *tag)
|
||||
int tagged_mark;
|
||||
struct commit *p;
|
||||
|
||||
/* Trees have no identifer in fast-export output, thus we have no way
|
||||
/* Trees have no identifier in fast-export output, thus we have no way
|
||||
* to output tags of trees, tags of tags of trees, etc. Simply omit
|
||||
* such tags.
|
||||
*/
|
||||
|
@ -92,7 +92,7 @@ static NORETURN int die_push_simple(struct branch *branch, struct remote *remote
|
||||
if (!short_upstream)
|
||||
short_upstream = branch->merge[0]->src;
|
||||
/*
|
||||
* Don't show advice for people who explicitely set
|
||||
* Don't show advice for people who explicitly set
|
||||
* push.default.
|
||||
*/
|
||||
if (push_default == PUSH_DEFAULT_UNSPECIFIED)
|
||||
|
41
builtin/rm.c
41
builtin/rm.c
@ -58,6 +58,21 @@ static void print_error_files(struct string_list *files_list,
|
||||
}
|
||||
}
|
||||
|
||||
static void error_removing_concrete_submodules(struct string_list *files, int *errs)
|
||||
{
|
||||
print_error_files(files,
|
||||
Q_("the following submodule (or one of its nested "
|
||||
"submodules)\n"
|
||||
"uses a .git directory:",
|
||||
"the following submodules (or one of its nested "
|
||||
"submodules)\n"
|
||||
"use a .git directory:", files->nr),
|
||||
_("\n(use 'rm -rf' if you really want to remove "
|
||||
"it including all of its history)"),
|
||||
errs);
|
||||
string_list_clear(files, 0);
|
||||
}
|
||||
|
||||
static int check_submodules_use_gitfiles(void)
|
||||
{
|
||||
int i;
|
||||
@ -86,16 +101,8 @@ static int check_submodules_use_gitfiles(void)
|
||||
if (!submodule_uses_gitfile(name))
|
||||
string_list_append(&files, name);
|
||||
}
|
||||
print_error_files(&files,
|
||||
Q_("the following submodule (or one of its nested "
|
||||
"submodules)\n uses a .git directory:",
|
||||
"the following submodules (or one of its nested "
|
||||
"submodules)\n use a .git directory:",
|
||||
files.nr),
|
||||
_("\n(use 'rm -rf' if you really want to remove "
|
||||
"it including all of its history)"),
|
||||
&errs);
|
||||
string_list_clear(&files, 0);
|
||||
|
||||
error_removing_concrete_submodules(&files, &errs);
|
||||
|
||||
return errs;
|
||||
}
|
||||
@ -237,17 +244,9 @@ static int check_local_mod(unsigned char *head, int index_only)
|
||||
" or -f to force removal)"),
|
||||
&errs);
|
||||
string_list_clear(&files_cached, 0);
|
||||
print_error_files(&files_submodule,
|
||||
Q_("the following submodule (or one of its nested "
|
||||
"submodule)\nuses a .git directory:",
|
||||
"the following submodules (or one of its nested "
|
||||
"submodule)\nuse a .git directory:",
|
||||
files_submodule.nr),
|
||||
_("\n(use 'rm -rf' if you really "
|
||||
"want to remove it including all "
|
||||
"of its history)"),
|
||||
&errs);
|
||||
string_list_clear(&files_submodule, 0);
|
||||
|
||||
error_removing_concrete_submodules(&files_submodule, &errs);
|
||||
|
||||
print_error_files(&files_local,
|
||||
Q_("the following file has local modifications:",
|
||||
"the following files have local modifications:",
|
||||
|
2
cache.h
2
cache.h
@ -491,7 +491,7 @@ extern void *read_blob_data_from_index(struct index_state *, const char *, unsig
|
||||
extern int ie_match_stat(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
|
||||
extern int ie_modified(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
|
||||
|
||||
#define PATHSPEC_ONESTAR 1 /* the pathspec pattern sastisfies GFNM_ONESTAR */
|
||||
#define PATHSPEC_ONESTAR 1 /* the pathspec pattern satisfies GFNM_ONESTAR */
|
||||
|
||||
struct pathspec {
|
||||
const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
|
||||
|
@ -165,7 +165,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
|
||||
|
||||
/*
|
||||
* Coalesce new lines into base by finding the LCS
|
||||
* - Create the table to run dynamic programing
|
||||
* - Create the table to run dynamic programming
|
||||
* - Compute the LCS
|
||||
* - Then reverse read the direction structure:
|
||||
* - If we have MATCH, assign parent to base flag, and consume
|
||||
|
@ -48,7 +48,7 @@ static void init_ ##slabname## _with_stride(struct slabname *s, \
|
||||
if (!stride) \
|
||||
stride = 1; \
|
||||
s->stride = stride; \
|
||||
elem_size = sizeof(struct slabname) * stride; \
|
||||
elem_size = sizeof(elemtype) * stride; \
|
||||
s->slab_size = COMMIT_SLAB_SIZE / elem_size; \
|
||||
s->slab_count = 0; \
|
||||
s->slab = NULL; \
|
||||
@ -72,11 +72,10 @@ static void clear_ ##slabname(struct slabname *s) \
|
||||
static elemtype *slabname## _at(struct slabname *s, \
|
||||
const struct commit *c) \
|
||||
{ \
|
||||
int nth_slab, nth_slot, ix; \
|
||||
int nth_slab, nth_slot; \
|
||||
\
|
||||
ix = c->index * s->stride; \
|
||||
nth_slab = ix / s->slab_size; \
|
||||
nth_slot = ix % s->slab_size; \
|
||||
nth_slab = c->index / s->slab_size; \
|
||||
nth_slot = c->index % s->slab_size; \
|
||||
\
|
||||
if (s->slab_count <= nth_slab) { \
|
||||
int i; \
|
||||
@ -89,8 +88,8 @@ static elemtype *slabname## _at(struct slabname *s, \
|
||||
} \
|
||||
if (!s->slab[nth_slab]) \
|
||||
s->slab[nth_slab] = xcalloc(s->slab_size, \
|
||||
sizeof(**s->slab)); \
|
||||
return &s->slab[nth_slab][nth_slot]; \
|
||||
sizeof(**s->slab) * s->stride); \
|
||||
return &s->slab[nth_slab][nth_slot * s->stride]; \
|
||||
} \
|
||||
\
|
||||
static int stat_ ##slabname## realloc
|
||||
|
2
commit.h
2
commit.h
@ -102,8 +102,6 @@ struct pretty_print_context {
|
||||
* Fields below here are manipulated internally by pp_* functions and
|
||||
* should not be counted on by callers.
|
||||
*/
|
||||
|
||||
/* Manipulated by the pp_* functions internally. */
|
||||
struct string_list in_body_headers;
|
||||
};
|
||||
|
||||
|
@ -70,7 +70,7 @@ tinyifier = "http://tinyurl.com/api-create.php?url="
|
||||
|
||||
# The template used to generate the XML messages to CIA. You can make
|
||||
# visible changes to the IRC-bot notification lines by hacking this.
|
||||
# The default will produce a notfication line that looks like this:
|
||||
# The default will produce a notification line that looks like this:
|
||||
#
|
||||
# ${project}: ${author} ${repo}:${branch} * ${rev} ${files}: ${logmsg} ${url}
|
||||
#
|
||||
|
@ -39,7 +39,7 @@
|
||||
# done
|
||||
#
|
||||
# The reason for the tac call is that git rev-list emits commits from
|
||||
# most recent to least - better to ship notifactions from oldest to newest.
|
||||
# most recent to least - better to ship notifications from oldest to newest.
|
||||
#
|
||||
# Configuration variables affecting this script:
|
||||
#
|
||||
@ -64,7 +64,7 @@
|
||||
# down. It is unknown whether this is still an issue in 2010, but
|
||||
# XML-RPC would be annoying to do from sh in any case. (XML-RPC does
|
||||
# have the advantage that it guarantees notification of multiple commits
|
||||
# shpped from an update in their actual order.)
|
||||
# shipped from an update in their actual order.)
|
||||
#
|
||||
|
||||
# The project as known to CIA. You can set this with a -p option,
|
||||
|
@ -2581,7 +2581,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
--*=*|*.) ;;
|
||||
*) c="$c " ;;
|
||||
esac
|
||||
array+=("$c")
|
||||
array[$#array+1]="$c"
|
||||
done
|
||||
compset -P '*[=:]'
|
||||
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
|
||||
|
@ -225,7 +225,7 @@ for cset in range(int(tip) + 1):
|
||||
os.system('git ls-files -x .hg --deleted | git update-index --remove --stdin')
|
||||
|
||||
# commit
|
||||
os.system(getgitenv(user, date) + 'git commit --allow-empty -a -F %s' % filecomment)
|
||||
os.system(getgitenv(user, date) + 'git commit --allow-empty --allow-empty-message -a -F %s' % filecomment)
|
||||
os.unlink(filecomment)
|
||||
|
||||
# tag
|
||||
|
@ -30,6 +30,7 @@ $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
|
||||
doc: $(GIT_SUBTREE_DOC)
|
||||
|
||||
install: $(GIT_SUBTREE)
|
||||
$(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
|
||||
$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(libexecdir)
|
||||
|
||||
install-doc: install-man
|
||||
|
@ -311,7 +311,7 @@ copy_commit()
|
||||
GIT_COMMITTER_NAME \
|
||||
GIT_COMMITTER_EMAIL \
|
||||
GIT_COMMITTER_DATE
|
||||
(echo -n "$annotate"; cat ) |
|
||||
(printf "%s" "$annotate"; cat ) |
|
||||
git commit-tree "$2" $3 # reads the rest of stdin
|
||||
) || die "Can't copy commit $1"
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ git-extensions repository in ~/git-extensions/:
|
||||
name
|
||||
|
||||
You can omit the --squash flag, but doing so will increase the number
|
||||
of commits that are incldued in your local repository.
|
||||
of commits that are included in your local repository.
|
||||
|
||||
We now have a ~/git-extensions/git-subtree directory containing code
|
||||
from the master branch of git://github.com/apenwarr/git-subtree.git
|
||||
|
@ -182,9 +182,9 @@ test_expect_success 'merge new subproj history into subdir' '
|
||||
test_expect_success 'Check that prefix argument is required for split' '
|
||||
echo "You must provide the --prefix option." > expected &&
|
||||
test_must_fail git subtree split > actual 2>&1 &&
|
||||
test_debug "echo -n expected: " &&
|
||||
test_debug "printf '"'"'expected: '"'"'" &&
|
||||
test_debug "cat expected" &&
|
||||
test_debug "echo -n actual: " &&
|
||||
test_debug "printf '"'"'actual: '"'"'" &&
|
||||
test_debug "cat actual" &&
|
||||
test_cmp expected actual &&
|
||||
rm -f expected actual
|
||||
@ -193,9 +193,9 @@ test_expect_success 'Check that prefix argument is required for split' '
|
||||
test_expect_success 'Check that the <prefix> exists for a split' '
|
||||
echo "'"'"'non-existent-directory'"'"'" does not exist\; use "'"'"'git subtree add'"'"'" > expected &&
|
||||
test_must_fail git subtree split --prefix=non-existent-directory > actual 2>&1 &&
|
||||
test_debug "echo -n expected: " &&
|
||||
test_debug "printf '"'"'expected: '"'"'" &&
|
||||
test_debug "cat expected" &&
|
||||
test_debug "echo -n actual: " &&
|
||||
test_debug "printf '"'"'actual: '"'"'" &&
|
||||
test_debug "cat actual" &&
|
||||
test_cmp expected actual
|
||||
# rm -f expected actual
|
||||
|
@ -144,7 +144,7 @@ setup_user_tool () {
|
||||
setup_tool () {
|
||||
tool="$1"
|
||||
|
||||
# Fallback definitions, to be overriden by tools.
|
||||
# Fallback definitions, to be overridden by tools.
|
||||
can_merge () {
|
||||
return 0
|
||||
}
|
||||
|
@ -1786,7 +1786,7 @@ class P4Submit(Command, P4UserMap):
|
||||
missingGitTags = gitTags - p4Labels
|
||||
self.exportGitTags(missingGitTags)
|
||||
|
||||
# exit with error unless everything applied perfecly
|
||||
# exit with error unless everything applied perfectly
|
||||
if len(commits) != len(applied):
|
||||
sys.exit(1)
|
||||
|
||||
|
@ -159,7 +159,7 @@ finish_rebase () {
|
||||
die "$(eval_gettext "Cannot store \$stash_sha1")"
|
||||
gettext 'Applying autostash resulted in conflicts.
|
||||
Your changes are safe in the stash.
|
||||
You can run "git stash pop" or "git stash drop" it at any time.
|
||||
You can run "git stash pop" or "git stash drop" at any time.
|
||||
'
|
||||
fi
|
||||
fi
|
||||
|
2
notes.h
2
notes.h
@ -77,7 +77,7 @@ const char *default_notes_ref(void);
|
||||
* variable is used, and if that is missing, the default notes ref is used
|
||||
* ("refs/notes/commits").
|
||||
*
|
||||
* If you need to re-intialize a notes_tree structure (e.g. when switching from
|
||||
* If you need to re-initialize a notes_tree structure (e.g. when switching from
|
||||
* one notes ref to another), you must first de-initialize the notes_tree
|
||||
* structure by calling free_notes(struct notes_tree *).
|
||||
*
|
||||
|
@ -489,7 +489,7 @@ int remove_index_entry_at(struct index_state *istate, int pos)
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove all cache ententries marked for removal, that is where
|
||||
* Remove all cache entries marked for removal, that is where
|
||||
* CE_REMOVE is set in ce_flags. This is much more effective than
|
||||
* calling remove_index_entry_at() for each entry to be removed.
|
||||
*/
|
||||
@ -1760,7 +1760,7 @@ static int has_racy_timestamp(struct index_state *istate)
|
||||
}
|
||||
|
||||
/*
|
||||
* Opportunisticly update the index but do not complain if we can't
|
||||
* Opportunistically update the index but do not complain if we can't
|
||||
*/
|
||||
void update_index_if_able(struct index_state *istate, struct lock_file *lockfile)
|
||||
{
|
||||
|
6
refs.c
6
refs.c
@ -634,7 +634,9 @@ struct ref_entry_cb {
|
||||
static int do_one_ref(struct ref_entry *entry, void *cb_data)
|
||||
{
|
||||
struct ref_entry_cb *data = cb_data;
|
||||
struct ref_entry *old_current_ref;
|
||||
int retval;
|
||||
|
||||
if (prefixcmp(entry->name, data->base))
|
||||
return 0;
|
||||
|
||||
@ -642,10 +644,12 @@ static int do_one_ref(struct ref_entry *entry, void *cb_data)
|
||||
!ref_resolves_to_object(entry))
|
||||
return 0;
|
||||
|
||||
/* Store the old value, in case this is a recursive call: */
|
||||
old_current_ref = current_ref;
|
||||
current_ref = entry;
|
||||
retval = data->fn(entry->name + data->trim, entry->u.value.sha1,
|
||||
entry->flag, data->cb_data);
|
||||
current_ref = NULL;
|
||||
current_ref = old_current_ref;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
|
||||
"\n"
|
||||
"where \"$br\" is somehow empty and a 40-hex ref is created. Please\n"
|
||||
"examine these refs and maybe delete them. Turn this message off by\n"
|
||||
"running \"git config advice.object_name_warning false\"");
|
||||
"running \"git config advice.objectNameWarning false\"");
|
||||
unsigned char tmp_sha1[20];
|
||||
char *real_ref = NULL;
|
||||
int refs_found = 0;
|
||||
|
@ -36,7 +36,7 @@ EOF
|
||||
|
||||
# You can set the GITWEB_TEST_INSTALLED environment variable to
|
||||
# the gitwebdir (the directory where gitweb is installed / deployed to)
|
||||
# of an existing gitweb instalation to test that installation,
|
||||
# of an existing gitweb installation to test that installation,
|
||||
# or simply to pathname of installed gitweb script.
|
||||
if test -n "$GITWEB_TEST_INSTALLED" ; then
|
||||
if test -d $GITWEB_TEST_INSTALLED; then
|
||||
|
@ -34,7 +34,7 @@ save_tag () {
|
||||
mv sed.script.tmp sed.script
|
||||
}
|
||||
|
||||
# Replace unhelpful sha1 hashses with their symbolic equivalents
|
||||
# Replace unhelpful sha1 hashes with their symbolic equivalents
|
||||
entag () {
|
||||
sed -f sed.script
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ test_perf () {
|
||||
echo "$test_count" >>"$perf_results_dir"/$base.subtests
|
||||
echo "$1" >"$perf_results_dir"/$base.$test_count.descr
|
||||
if test -z "$verbose"; then
|
||||
echo -n "perf $test_count - $1:"
|
||||
printf "%s" "perf $test_count - $1:"
|
||||
else
|
||||
echo "perf $test_count - $1:"
|
||||
fi
|
||||
@ -170,7 +170,7 @@ test_perf () {
|
||||
if test_run_perf_ "$2"
|
||||
then
|
||||
if test -z "$verbose"; then
|
||||
echo -n " $i"
|
||||
printf " %s" "$i"
|
||||
else
|
||||
echo "* timing run $i/$GIT_PERF_REPEAT_COUNT:"
|
||||
fi
|
||||
|
@ -17,7 +17,7 @@ test_expect_success 'setup' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'git clean -i (clean)' '
|
||||
test_expect_success 'git clean -i (c: clean hotkey)' '
|
||||
|
||||
mkdir -p build docs &&
|
||||
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
|
||||
@ -38,12 +38,33 @@ test_expect_success 'git clean -i (clean)' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'git clean -i (cl: clean prefix)' '
|
||||
|
||||
mkdir -p build docs &&
|
||||
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
|
||||
docs/manual.txt obj.o build/lib.so &&
|
||||
echo cl | git clean -i &&
|
||||
test -f Makefile &&
|
||||
test -f README &&
|
||||
test -f src/part1.c &&
|
||||
test -f src/part2.c &&
|
||||
test ! -f a.out &&
|
||||
test -f docs/manual.txt &&
|
||||
test ! -f src/part3.c &&
|
||||
test ! -f src/part3.h &&
|
||||
test ! -f src/part4.c &&
|
||||
test ! -f src/part4.h &&
|
||||
test -f obj.o &&
|
||||
test -f build/lib.so
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'git clean -i (quit)' '
|
||||
|
||||
mkdir -p build docs &&
|
||||
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
|
||||
docs/manual.txt obj.o build/lib.so &&
|
||||
echo q | git clean -i &&
|
||||
echo quit | git clean -i &&
|
||||
test -f Makefile &&
|
||||
test -f README &&
|
||||
test -f src/part1.c &&
|
||||
@ -256,6 +277,21 @@ test_expect_success 'git clean -id (select - number 3)' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'git clean -id (select - filenames)' '
|
||||
|
||||
mkdir -p build docs &&
|
||||
touch a.out foo.txt bar.txt baz.txt &&
|
||||
(echo s; echo a.out fo ba bar; echo; echo c) | \
|
||||
git clean -id &&
|
||||
test -f Makefile &&
|
||||
test ! -f a.out &&
|
||||
test ! -f foo.txt &&
|
||||
test ! -f bar.txt &&
|
||||
test -f baz.txt &&
|
||||
rm baz.txt
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'git clean -id (select - range)' '
|
||||
|
||||
mkdir -p build docs &&
|
||||
|
@ -109,7 +109,7 @@ test_expect_success 'setup conflicted merge' '
|
||||
'
|
||||
|
||||
# First do the merge with resolve and recursive then verify that
|
||||
# recusive is chosen.
|
||||
# recursive is chosen.
|
||||
|
||||
test_expect_success 'merge picks up the best result' '
|
||||
git config --unset-all pull.twohead &&
|
||||
|
@ -24,7 +24,7 @@ init_git () {
|
||||
rm -fr .git &&
|
||||
git init &&
|
||||
#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
|
||||
# let's reuse an exisiting dump file!?
|
||||
# let's reuse an existing dump file!?
|
||||
git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
|
||||
git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ test_description='test that git handles an svn repository with missing md5sums'
|
||||
# Loading a node from a svn dumpfile without a Text-Content-Length
|
||||
# field causes svn to neglect to store or report an md5sum. (it will
|
||||
# calculate one if you had put Text-Content-Length: 0). This showed
|
||||
# up in a repository creted with cvs2svn.
|
||||
# up in a repository created with cvs2svn.
|
||||
|
||||
cat > dumpfile.svn <<EOF
|
||||
SVN-fs-dump-format-version: 1
|
||||
|
@ -28,7 +28,7 @@ test_expect_success 'p4 client newlines, unix' '
|
||||
test_cmp f-unix-orig f-unix &&
|
||||
|
||||
# make sure stored in repo as unix newlines
|
||||
# use sed to eat python-appened newline
|
||||
# use sed to eat python-appended newline
|
||||
p4 -G print //depot/f-unix | marshal_dump data 2 |\
|
||||
sed \$d >f-unix-p4-print &&
|
||||
test_cmp f-unix-orig f-unix-p4-print &&
|
||||
|
@ -1132,7 +1132,7 @@ static void *udt_copy_task_routine(void *udt)
|
||||
#ifndef NO_PTHREADS
|
||||
|
||||
/*
|
||||
* Join thread, with apporiate errors on failure. Name is name for the
|
||||
* Join thread, with appropriate errors on failure. Name is name for the
|
||||
* thread (for error messages). Returns 0 on success, 1 on failure.
|
||||
*/
|
||||
static int tloop_join(pthread_t thread, const char *name)
|
||||
@ -1198,7 +1198,7 @@ static void udt_kill_transfer(struct unidirectional_transfer *t)
|
||||
}
|
||||
|
||||
/*
|
||||
* Join process, with apporiate errors on failure. Name is name for the
|
||||
* Join process, with appropriate errors on failure. Name is name for the
|
||||
* process (for error messages). Returns 0 on success, 1 on failure.
|
||||
*/
|
||||
static int tloop_join(pid_t pid, const char *name)
|
||||
|
Reference in New Issue
Block a user