Compare commits
41 Commits
v2.10.0-rc
...
v2.10.0
Author | SHA1 | Date | |
---|---|---|---|
6ebdac1bab | |||
dd39dfcf8a | |||
e8e349249c | |||
5b18e70009 | |||
934b1caa7a | |||
58e72a2179 | |||
4762bf36d9 | |||
9010077be2 | |||
7841c4801c | |||
5c57d7622e | |||
ba67504fa8 | |||
bc6b13a7d2 | |||
63b8265402 | |||
b67e63067d | |||
800d88e2b3 | |||
8ed2d3fb15 | |||
b30eec1a69 | |||
5bd166d8af | |||
fe1280decc | |||
b9252573c4 | |||
d5cb9cbd64 | |||
e28eae3184 | |||
5cb0d5ad05 | |||
0fd6c99bdf | |||
3dc01702df | |||
a8998453be | |||
13e11ff707 | |||
a1f0b4e286 | |||
41a616dada | |||
9d83143621 | |||
587dae416d | |||
078fe30523 | |||
8aa6dc1d9e | |||
cd3e4677cf | |||
ae1f7094f7 | |||
05d1ed6148 | |||
ec584cd69a | |||
6db5967d4e | |||
ad65f7e3b7 | |||
175d38ca23 | |||
9fa976fffe |
@ -77,7 +77,8 @@ UI, Workflows & Features
|
||||
* "git archive" learned to handle files that are larger than 8GB and
|
||||
commits far in the future than expressible by the traditional US-TAR
|
||||
format.
|
||||
(merge 5caeeb8 jk/big-and-future-archive-tar later to maint).
|
||||
(merge 560b0e8 jk/big-and-future-archive-tar later to maint).
|
||||
|
||||
|
||||
* A new configuration variable core.sshCommand has been added to
|
||||
specify what value for GIT_SSH_COMMAND to use per repository.
|
||||
@ -179,7 +180,7 @@ Performance, Internal Implementation, Development Support etc.
|
||||
the standard output and the standard error of an external process,
|
||||
which is cumbersome to hand-roll correctly without deadlocking.
|
||||
|
||||
The codepath to sign data in a prepared buffer with GPG has been
|
||||
* The codepath to sign data in a prepared buffer with GPG has been
|
||||
updated to use this API to read from the status-fd to check for
|
||||
errors (instead of relying on GPG's exit status).
|
||||
(merge efee955 jk/gpg-interface-cleanup later to maint).
|
||||
@ -252,6 +253,9 @@ Performance, Internal Implementation, Development Support etc.
|
||||
combination has been fixed to be equivalent to doing
|
||||
$ git config core.autocrlf true
|
||||
|
||||
* Documentation has been updated to show better example usage
|
||||
of the updated "text=auto" attribute.
|
||||
|
||||
* A few tests that specifically target "git rebase -i" have been
|
||||
added.
|
||||
|
||||
@ -303,11 +307,15 @@ Performance, Internal Implementation, Development Support etc.
|
||||
changes and attempts to find matches. This has been optimized by
|
||||
lazily computing the full patch-id (which is expensive) to be
|
||||
compared only for changes that touch the same set of paths.
|
||||
(merge b3dfeeb kw/patch-ids-optim later to maint).
|
||||
(merge ba67504 kw/patch-ids-optim later to maint).
|
||||
|
||||
* A handful of tests that were broken under gettext-poison build have
|
||||
been fixed.
|
||||
|
||||
* The recent i18n patch we added during this cycle did a bit too much
|
||||
refactoring of the messages to avoid word-legos; the repetition has
|
||||
been reduced to help translators.
|
||||
|
||||
|
||||
Also contains various documentation updates and code clean-ups.
|
||||
|
||||
@ -563,7 +571,7 @@ notes for details).
|
||||
caused tests in t7063 to fail because it wanted to verify the
|
||||
behaviour of the fast-path.
|
||||
|
||||
* Squelch compiler warnings for netmalloc (in compat/) library.
|
||||
* Squelch compiler warnings for nedmalloc (in compat/) library.
|
||||
|
||||
* A small memory leak in the command line parsing of "git blame"
|
||||
has been plugged.
|
||||
@ -631,6 +639,32 @@ notes for details).
|
||||
taught to notice these exit status codes.
|
||||
(merge 45a4f5d jk/difftool-command-not-found later to maint).
|
||||
|
||||
* On Windows, help.browser configuration variable used to be ignored,
|
||||
which has been corrected.
|
||||
(merge 6db5967 js/no-html-bypass-on-windows later to maint).
|
||||
|
||||
* The "git -c var[=val] cmd" facility to append a configuration
|
||||
variable definition at the end of the search order was described in
|
||||
git(1) manual page, but not in git-config(1), which was more likely
|
||||
place for people to look for when they ask "can I make a one-shot
|
||||
override, and if so how?"
|
||||
(merge ae1f709 dg/document-git-c-in-git-config-doc later to maint).
|
||||
|
||||
* The tempfile (hence its user lockfile) API lets the caller to open
|
||||
a file descriptor to a temporary file, write into it and then
|
||||
finalize it by first closing the filehandle and then either
|
||||
removing or renaming the temporary file. When the process spawns a
|
||||
subprocess after obtaining the file descriptor, and if the
|
||||
subprocess has not exited when the attempt to remove or rename is
|
||||
made, the last step fails on Windows, because the subprocess has
|
||||
the file descriptor still open. Open tempfile with O_CLOEXEC flag
|
||||
to avoid this (on Windows, this is mapped to O_NOINHERIT).
|
||||
(merge 05d1ed6 bw/mingw-avoid-inheriting-fd-to-lockfile later to maint).
|
||||
|
||||
* Correct an age-old calco (is that a typo-like word for calc)
|
||||
in the documentation.
|
||||
(merge 7841c48 ls/packet-line-protocol-doc-fix later to maint).
|
||||
|
||||
* Other minor clean-ups and documentation updates
|
||||
(merge 02a8cfa rs/merge-add-strategies-simplification later to maint).
|
||||
(merge af4941d rs/merge-recursive-string-list-init later to maint).
|
||||
@ -638,3 +672,4 @@ notes for details).
|
||||
(merge ddd0bfa jk/tighten-alloc later to maint).
|
||||
(merge ecf30b2 rs/mailinfo-lib later to maint).
|
||||
(merge 0eb75ce sg/reflog-past-root later to maint).
|
||||
(merge 4369523 hv/doc-commit-reference-style later to maint).
|
||||
|
@ -121,6 +121,11 @@ its behaviour. Try to make sure your explanation can be understood
|
||||
without external resources. Instead of giving a URL to a mailing list
|
||||
archive, summarize the relevant points of the discussion.
|
||||
|
||||
If you want to reference a previous commit in the history of a stable
|
||||
branch use the format "abbreviated sha1 (subject, date)". So for example
|
||||
like this: "Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)
|
||||
noticed [...]".
|
||||
|
||||
|
||||
(3) Generate your patch using Git tools out of your commits.
|
||||
|
||||
|
@ -263,6 +263,9 @@ The files are read in the order given above, with last value found taking
|
||||
precedence over values read earlier. When multiple values are taken then all
|
||||
values of a key from all files will be used.
|
||||
|
||||
You may override individual configuration parameters when running any git
|
||||
command by using the `-c` option. See linkgit:git[1] for details.
|
||||
|
||||
All writing options will per default write to the repository specific
|
||||
configuration file. Note that this also affects options like `--replace-all`
|
||||
and `--unset`. *'git config' will only ever change one file at a time*.
|
||||
|
@ -159,8 +159,7 @@ not accessible in the working tree.
|
||||
+
|
||||
<eolattr> is the attribute that is used when checking out or committing,
|
||||
it is either "", "-text", "text", "text=auto", "text eol=lf", "text eol=crlf".
|
||||
Note: Currently Git does not support "text=auto eol=lf" or "text=auto eol=crlf",
|
||||
that may change in the future.
|
||||
Since Git 2.10 "text=auto eol=lf" and "text=auto eol=crlf" are supported.
|
||||
+
|
||||
Both the <eolinfo> in the index ("i/<eolinfo>")
|
||||
and in the working tree ("w/<eolinfo>") are shown for regular files,
|
||||
|
@ -43,6 +43,11 @@ unreleased) version of Git, that is available from the 'master'
|
||||
branch of the `git.git` repository.
|
||||
Documentation for older releases are available here:
|
||||
|
||||
* link:v2.10.0/git.html[documentation for release 2.10]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes/2.10.0.txt[2.10].
|
||||
|
||||
* link:v2.9.3/git.html[documentation for release 2.9.3]
|
||||
|
||||
* release notes for
|
||||
|
@ -182,6 +182,30 @@ While Git normally leaves file contents alone, it can be configured to
|
||||
normalize line endings to LF in the repository and, optionally, to
|
||||
convert them to CRLF when files are checked out.
|
||||
|
||||
If you simply want to have CRLF line endings in your working directory
|
||||
regardless of the repository you are working with, you can set the
|
||||
config variable "core.autocrlf" without using any attributes.
|
||||
|
||||
------------------------
|
||||
[core]
|
||||
autocrlf = true
|
||||
------------------------
|
||||
|
||||
This does not force normalization of text files, but does ensure
|
||||
that text files that you introduce to the repository have their line
|
||||
endings normalized to LF when they are added, and that files that are
|
||||
already normalized in the repository stay normalized.
|
||||
|
||||
If you want to ensure that text files that any contributor introduces to
|
||||
the repository have their line endings normalized, you can set the
|
||||
`text` attribute to "auto" for _all_ files.
|
||||
|
||||
------------------------
|
||||
* text=auto
|
||||
------------------------
|
||||
|
||||
The attributes allow a fine-grained control, how the line endings
|
||||
are converted.
|
||||
Here is an example that will make Git normalize .txt, .vcproj and .sh
|
||||
files, ensure that .vcproj files have CRLF and .sh files have LF in
|
||||
the working directory, and prevent .jpg files from being normalized
|
||||
@ -195,48 +219,14 @@ regardless of their content.
|
||||
*.jpg -text
|
||||
------------------------
|
||||
|
||||
Other source code management systems normalize all text files in their
|
||||
repositories, and there are two ways to enable similar automatic
|
||||
normalization in Git.
|
||||
NOTE: When `text=auto` conversion is enabled in a cross-platform
|
||||
project using push and pull to a central repository the text files
|
||||
containing CRLFs should be normalized.
|
||||
|
||||
If you simply want to have CRLF line endings in your working directory
|
||||
regardless of the repository you are working with, you can set the
|
||||
config variable "core.autocrlf" without using any attributes.
|
||||
|
||||
------------------------
|
||||
[core]
|
||||
autocrlf = true
|
||||
------------------------
|
||||
|
||||
This does not force normalization of all text files, but does ensure
|
||||
that text files that you introduce to the repository have their line
|
||||
endings normalized to LF when they are added, and that files that are
|
||||
already normalized in the repository stay normalized.
|
||||
|
||||
If you want to interoperate with a source code management system that
|
||||
enforces end-of-line normalization, or you simply want all text files
|
||||
in your repository to be normalized, you should instead set the `text`
|
||||
attribute to "auto" for _all_ files.
|
||||
|
||||
------------------------
|
||||
* text=auto
|
||||
------------------------
|
||||
|
||||
This ensures that all files that Git considers to be text will have
|
||||
normalized (LF) line endings in the repository. The `core.eol`
|
||||
configuration variable controls which line endings Git will use for
|
||||
normalized files in your working directory; the default is to use the
|
||||
native line ending for your platform, or CRLF if `core.autocrlf` is
|
||||
set.
|
||||
|
||||
NOTE: When `text=auto` normalization is enabled in an existing
|
||||
repository, any text files containing CRLFs should be normalized. If
|
||||
they are not they will be normalized the next time someone tries to
|
||||
change them, causing unfortunate misattribution. From a clean working
|
||||
directory:
|
||||
From a clean working directory:
|
||||
|
||||
-------------------------------------------------
|
||||
$ echo "* text=auto" >>.gitattributes
|
||||
$ echo "* text=auto" >.gitattributes
|
||||
$ rm .git/index # Remove the index to force Git to
|
||||
$ git reset # re-scan the working directory
|
||||
$ git status # Show files that will be normalized
|
||||
|
@ -67,9 +67,9 @@ with non-binary data the same whether or not they contain the trailing
|
||||
LF (stripping the LF if present, and not complaining when it is
|
||||
missing).
|
||||
|
||||
The maximum length of a pkt-line's data component is 65520 bytes.
|
||||
Implementations MUST NOT send pkt-line whose length exceeds 65524
|
||||
(65520 bytes of payload + 4 bytes of length data).
|
||||
The maximum length of a pkt-line's data component is 65516 bytes.
|
||||
Implementations MUST NOT send pkt-line whose length exceeds 65520
|
||||
(65516 bytes of payload + 4 bytes of length data).
|
||||
|
||||
Implementations SHOULD NOT send an empty pkt-line ("0004").
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v2.10.0-rc1
|
||||
DEF_VER=v2.10.0
|
||||
|
||||
LF='
|
||||
'
|
||||
|
@ -2244,7 +2244,8 @@ static void verify_working_tree_path(struct commit *work_tree, const char *path)
|
||||
pos = cache_name_pos(path, strlen(path));
|
||||
if (pos >= 0)
|
||||
; /* path is in the index */
|
||||
else if (!strcmp(active_cache[-1 - pos]->name, path))
|
||||
else if (-1 - pos < active_nr &&
|
||||
!strcmp(active_cache[-1 - pos]->name, path))
|
||||
; /* path is in the index, unmerged */
|
||||
else
|
||||
die("no such path '%s' in HEAD", path);
|
||||
|
@ -379,17 +379,10 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)
|
||||
free(to_free);
|
||||
}
|
||||
|
||||
/*
|
||||
* If open_html is not defined in a platform-specific way (see for
|
||||
* example compat/mingw.h), we use the script web--browse to display
|
||||
* HTML.
|
||||
*/
|
||||
#ifndef open_html
|
||||
static void open_html(const char *path)
|
||||
{
|
||||
execl_git_cmd("web--browse", "-c", "help.browser", path, (char *)NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void show_html_page(const char *git_cmd)
|
||||
{
|
||||
|
@ -1930,48 +1930,6 @@ int mingw_raise(int sig)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static const char *make_backslash_path(const char *path)
|
||||
{
|
||||
static char buf[PATH_MAX + 1];
|
||||
char *c;
|
||||
|
||||
if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
|
||||
die("Too long path: %.*s", 60, path);
|
||||
|
||||
for (c = buf; *c; c++) {
|
||||
if (*c == '/')
|
||||
*c = '\\';
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
void mingw_open_html(const char *unixpath)
|
||||
{
|
||||
const char *htmlpath = make_backslash_path(unixpath);
|
||||
typedef HINSTANCE (WINAPI *T)(HWND, const char *,
|
||||
const char *, const char *, const char *, INT);
|
||||
T ShellExecute;
|
||||
HMODULE shell32;
|
||||
int r;
|
||||
|
||||
shell32 = LoadLibrary("shell32.dll");
|
||||
if (!shell32)
|
||||
die("cannot load shell32.dll");
|
||||
ShellExecute = (T)GetProcAddress(shell32, "ShellExecuteA");
|
||||
if (!ShellExecute)
|
||||
die("cannot run browser");
|
||||
|
||||
printf("Launching default browser to display HTML ...\n");
|
||||
r = HCAST(int, ShellExecute(NULL, "open", htmlpath,
|
||||
NULL, "\\", SW_SHOWNORMAL));
|
||||
FreeLibrary(shell32);
|
||||
/* see the MSDN documentation referring to the result codes here */
|
||||
if (r <= 32) {
|
||||
die("failed to launch browser for %.*s", MAX_PATH, unixpath);
|
||||
}
|
||||
}
|
||||
|
||||
int link(const char *oldpath, const char *newpath)
|
||||
{
|
||||
typedef BOOL (WINAPI *T)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES);
|
||||
|
@ -67,6 +67,10 @@ typedef int pid_t;
|
||||
#define F_SETFD 2
|
||||
#define FD_CLOEXEC 0x1
|
||||
|
||||
#if !defined O_CLOEXEC && defined O_NOINHERIT
|
||||
#define O_CLOEXEC O_NOINHERIT
|
||||
#endif
|
||||
|
||||
#ifndef EAFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#endif
|
||||
@ -417,9 +421,6 @@ int mingw_offset_1st_component(const char *path);
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
void mingw_open_html(const char *path);
|
||||
#define open_html mingw_open_html
|
||||
|
||||
/**
|
||||
* Converts UTF-8 encoded string to UTF-16LE.
|
||||
*
|
||||
|
44
config.c
44
config.c
@ -652,46 +652,34 @@ int git_parse_ulong(const char *value, unsigned long *ret)
|
||||
NORETURN
|
||||
static void die_bad_number(const char *name, const char *value)
|
||||
{
|
||||
const char * error_type = (errno == ERANGE)? _("out of range"):_("invalid unit");
|
||||
|
||||
if (!value)
|
||||
value = "";
|
||||
|
||||
if (!(cf && cf->name))
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s': out of range")
|
||||
: _("bad numeric config value '%s' for '%s': invalid unit"),
|
||||
value, name);
|
||||
die(_("bad numeric config value '%s' for '%s': %s"),
|
||||
value, name, error_type);
|
||||
|
||||
switch (cf->origin_type) {
|
||||
case CONFIG_ORIGIN_BLOB:
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s' in blob %s: out of range")
|
||||
: _("bad numeric config value '%s' for '%s' in blob %s: invalid unit"),
|
||||
value, name, cf->name);
|
||||
die(_("bad numeric config value '%s' for '%s' in blob %s: %s"),
|
||||
value, name, cf->name, error_type);
|
||||
case CONFIG_ORIGIN_FILE:
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s' in file %s: out of range")
|
||||
: _("bad numeric config value '%s' for '%s' in file %s: invalid unit"),
|
||||
value, name, cf->name);
|
||||
die(_("bad numeric config value '%s' for '%s' in file %s: %s"),
|
||||
value, name, cf->name, error_type);
|
||||
case CONFIG_ORIGIN_STDIN:
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s' in standard input: out of range")
|
||||
: _("bad numeric config value '%s' for '%s' in standard input: invalid unit"),
|
||||
value, name);
|
||||
die(_("bad numeric config value '%s' for '%s' in standard input: %s"),
|
||||
value, name, error_type);
|
||||
case CONFIG_ORIGIN_SUBMODULE_BLOB:
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s' in submodule-blob %s: out of range")
|
||||
: _("bad numeric config value '%s' for '%s' in submodule-blob %s: invalid unit"),
|
||||
value, name, cf->name);
|
||||
die(_("bad numeric config value '%s' for '%s' in submodule-blob %s: %s"),
|
||||
value, name, cf->name, error_type);
|
||||
case CONFIG_ORIGIN_CMDLINE:
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s' in command line %s: out of range")
|
||||
: _("bad numeric config value '%s' for '%s' in command line %s: invalid unit"),
|
||||
value, name, cf->name);
|
||||
die(_("bad numeric config value '%s' for '%s' in command line %s: %s"),
|
||||
value, name, cf->name, error_type);
|
||||
default:
|
||||
die(errno == ERANGE
|
||||
? _("bad numeric config value '%s' for '%s' in %s: out of range")
|
||||
: _("bad numeric config value '%s' for '%s' in %s: invalid unit"),
|
||||
value, name, cf->name);
|
||||
die(_("bad numeric config value '%s' for '%s' in %s: %s"),
|
||||
value, name, cf->name, error_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -667,6 +667,10 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
|
||||
#define getpagesize() sysconf(_SC_PAGESIZE)
|
||||
#endif
|
||||
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 0
|
||||
#endif
|
||||
|
||||
#ifdef FREAD_READS_DIRECTORIES
|
||||
#ifdef fopen
|
||||
#undef fopen
|
||||
|
@ -404,51 +404,12 @@ pick_one_preserving_merges () {
|
||||
|
||||
this_nth_commit_message () {
|
||||
n=$1
|
||||
case "$n" in
|
||||
1) gettext "This is the 1st commit message:";;
|
||||
2) gettext "This is the 2nd commit message:";;
|
||||
3) gettext "This is the 3rd commit message:";;
|
||||
4) gettext "This is the 4th commit message:";;
|
||||
5) gettext "This is the 5th commit message:";;
|
||||
6) gettext "This is the 6th commit message:";;
|
||||
7) gettext "This is the 7th commit message:";;
|
||||
8) gettext "This is the 8th commit message:";;
|
||||
9) gettext "This is the 9th commit message:";;
|
||||
10) gettext "This is the 10th commit message:";;
|
||||
# TRANSLATORS: if the language you are translating into
|
||||
# doesn't allow you to compose a sentence in this fashion,
|
||||
# consider translating as if this and the following few strings
|
||||
# were "This is the commit message ${n}:"
|
||||
*1[0-9]|*[04-9]) eval_gettext "This is the \${n}th commit message:";;
|
||||
*1) eval_gettext "This is the \${n}st commit message:";;
|
||||
*2) eval_gettext "This is the \${n}nd commit message:";;
|
||||
*3) eval_gettext "This is the \${n}rd commit message:";;
|
||||
*) eval_gettext "This is the commit message \${n}:";;
|
||||
esac
|
||||
eval_gettext "This is the commit message #\${n}:"
|
||||
}
|
||||
|
||||
skip_nth_commit_message () {
|
||||
n=$1
|
||||
case "$n" in
|
||||
1) gettext "The 1st commit message will be skipped:";;
|
||||
2) gettext "The 2nd commit message will be skipped:";;
|
||||
3) gettext "The 3rd commit message will be skipped:";;
|
||||
4) gettext "The 4th commit message will be skipped:";;
|
||||
5) gettext "The 5th commit message will be skipped:";;
|
||||
6) gettext "The 6th commit message will be skipped:";;
|
||||
7) gettext "The 7th commit message will be skipped:";;
|
||||
8) gettext "The 8th commit message will be skipped:";;
|
||||
9) gettext "The 9th commit message will be skipped:";;
|
||||
10) gettext "The 10th commit message will be skipped:";;
|
||||
# TRANSLATORS: if the language you are translating into
|
||||
# doesn't allow you to compose a sentence in this fashion,
|
||||
# consider translating as if this and the following few strings
|
||||
# were "The commit message ${n} will be skipped:"
|
||||
*1[0-9]|*[04-9]) eval_gettext "The \${n}th commit message will be skipped:";;
|
||||
*1) eval_gettext "The \${n}st commit message will be skipped:";;
|
||||
*2) eval_gettext "The \${n}nd commit message will be skipped:";;
|
||||
*3) eval_gettext "The \${n}rd commit message will be skipped:";;
|
||||
*) eval_gettext "The commit message \${n} will be skipped:";;
|
||||
esac
|
||||
eval_gettext "The commit message #\${n} will be skipped:"
|
||||
}
|
||||
|
||||
update_squash_messages () {
|
||||
|
@ -55,6 +55,10 @@
|
||||
* * calling `fdopen_lock_file()` to get a `FILE` pointer for the
|
||||
* open file and writing to the file using stdio.
|
||||
*
|
||||
* Note that the file descriptor returned by hold_lock_file_for_update()
|
||||
* is marked O_CLOEXEC, so the new contents must be written by the
|
||||
* current process, not a spawned one.
|
||||
*
|
||||
* When finished writing, the caller can:
|
||||
*
|
||||
* * Close the file descriptor and rename the lockfile to its final
|
||||
|
4521
po/git.pot
4521
po/git.pot
File diff suppressed because it is too large
Load Diff
5083
po/pt_PT.po
5083
po/pt_PT.po
File diff suppressed because it is too large
Load Diff
4617
po/zh_CN.po
4617
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -702,7 +702,7 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts *
|
||||
if (action != opts->action) {
|
||||
if (action == REPLAY_REVERT)
|
||||
error((opts->action == REPLAY_REVERT)
|
||||
? _("Cannot revert during a another revert.")
|
||||
? _("Cannot revert during another revert.")
|
||||
: _("Cannot revert during a cherry-pick."));
|
||||
else
|
||||
error((opts->action == REPLAY_REVERT)
|
||||
|
0
t/perf/p3400-rebase.sh
Normal file → Executable file
0
t/perf/p3400-rebase.sh
Normal file → Executable file
@ -181,4 +181,17 @@ test_expect_success 'up-to-date merge without common ancestor' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'custom merge does not lock index' '
|
||||
git reset --hard anchor &&
|
||||
write_script sleep-one-second.sh <<-\EOF &&
|
||||
sleep 1 &
|
||||
EOF
|
||||
|
||||
test_write_lines >.gitattributes \
|
||||
"* merge=ours" "text merge=sleep-one-second" &&
|
||||
test_config merge.ours.driver true &&
|
||||
test_config merge.sleep-one-second.driver ./sleep-one-second.sh &&
|
||||
git merge master
|
||||
'
|
||||
|
||||
test_done
|
||||
|
@ -6,6 +6,11 @@ test_description='git blame'
|
||||
PROG='git blame -c'
|
||||
. "$TEST_DIRECTORY"/annotate-tests.sh
|
||||
|
||||
test_expect_success 'blame untracked file in empty repo' '
|
||||
>untracked &&
|
||||
test_must_fail git blame untracked
|
||||
'
|
||||
|
||||
PROG='git blame -c -e'
|
||||
test_expect_success 'blame --show-email' '
|
||||
check_count \
|
||||
|
@ -120,7 +120,12 @@ int create_tempfile(struct tempfile *tempfile, const char *path)
|
||||
prepare_tempfile_object(tempfile);
|
||||
|
||||
strbuf_add_absolute_path(&tempfile->filename, path);
|
||||
tempfile->fd = open(tempfile->filename.buf, O_RDWR | O_CREAT | O_EXCL, 0666);
|
||||
tempfile->fd = open(tempfile->filename.buf,
|
||||
O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC, 0666);
|
||||
if (O_CLOEXEC && tempfile->fd < 0 && errno == EINVAL)
|
||||
/* Try again w/o O_CLOEXEC: the kernel might not support it */
|
||||
tempfile->fd = open(tempfile->filename.buf,
|
||||
O_RDWR | O_CREAT | O_EXCL, 0666);
|
||||
if (tempfile->fd < 0) {
|
||||
strbuf_reset(&tempfile->filename);
|
||||
return -1;
|
||||
|
@ -33,6 +33,10 @@
|
||||
* * calling `fdopen_tempfile()` to get a `FILE` pointer for the
|
||||
* open file and writing to the file using stdio.
|
||||
*
|
||||
* Note that the file descriptor returned by create_tempfile()
|
||||
* is marked O_CLOEXEC, so the new contents must be written by
|
||||
* the current process, not any spawned one.
|
||||
*
|
||||
* When finished writing, the caller can:
|
||||
*
|
||||
* * Close the file descriptor and remove the temporary file by
|
||||
|
Reference in New Issue
Block a user