Commit 2b0371e2 authored by Duy Nguyen's avatar Duy Nguyen

Merge remote-tracking branch 'origin/next' into HEAD

parents d54ac2cb e745c3d2
......@@ -67,6 +67,38 @@ UI, Workflows & Features
* "git submodule" learns "set-branch" subcommand that allows the
submodule.*.branch settings to be modified.
* "git merge-recursive" backend recently learned a new heuristics to
infer file movement based on how other files in the same directory
moved. As this is inherently less robust heuristics than the one
based on the content similarity of the file itself (rather than
based on what its neighbours are doing), it sometimes gives an
outcome unexpected by the end users. This has been toned down to
leave the renamed paths in higher/conflicted stages in the index so
that the user can examine and confirm the result.
* "git tag" learned to give an advice suggesting it might be a
mistake when creating an annotated or signed tag that points at
another tag.
* The "git pack-objects" command learned to report the number of
objects it packed via the trace2 mechanism.
* The list of conflicted paths shown in the editor while concluding a
conflicted merge was shown above the scissors line when the
clean-up mode is set to "scissors", even though it was commented
out just like the list of updated paths and other information to
help the user explain the merge better.
* The trace2 tracing facility learned to auto-generate a filename
when told to log to a directory.
* "git clone" learned a new --server-option option when talking over
the protocol version 2.
* The connectivity bitmaps are created by default in bare
repositories now; also the pathname hash-cache is created by
default to avoid making crappy deltas when repacking.
Performance, Internal Implementation, Development Support etc.
......@@ -130,6 +162,22 @@ Performance, Internal Implementation, Development Support etc.
achieve better performance by batching the request for these
promised blobs.
* During an initial "git clone --depth=..." partial clone, it is
pointless to spend cycles for a large portion of the connectivity
check that enumerates and skips promisor objects (which by
definition is all objects fetched from the other side). This has
been optimized out.
* Mechanically and systematically drop "extern" from function
declarlation.
* The script to aggregate perf result unconditionally depended on
libjson-perl even though it did not have to, which has been
corrected.
* The internal implementation of "git rebase -i" has been updated to
avoid forking a separate "rebase--interactive" process.
Fixes since v2.21
-----------------
......@@ -347,10 +395,85 @@ Fixes since v2.21
eager and considered nonsense strings as if they can be legitimate
beginning of *-by: trailer. This has been tightened.
* Build with gettext breaks on recent macOS w/ Homebrew when
/usr/local/bin is not on PATH, which has been corrected.
* Builds with gettext broke on recent macOS w/ Homebrew, which
seems to have stopped including from /usr/local/include; this
has been corrected.
(merge 92a1377a2a js/macos-gettext-build later to maint).
* Running "git add" on a repository created inside the current
repository is an explicit indication that the user wants to add it
as a submodule, but when the HEAD of the inner repository is on an
unborn branch, it cannot be added as a submodule. Worse, the files
in its working tree can be added as if they are a part of the outer
repository, which is not what the user wants. These problems are
being addressed.
(merge f937bc2f86 km/empty-repo-is-still-a-repo later to maint).
* "git cherry-pick" run with the "-x" or the "--signoff" option used
to (and more importantly, ought to) clean up the commit log message
with the --cleanup=space option by default, but this has been
broken since late 2017. This has been fixed.
* When given a tag that points at a commit-ish, "git replace --graft"
failed to peel the tag before writing a replace ref, which did not
make sense because the old graft mechanism the feature wants to
mimick only allowed to replace one commit object with another.
This has been fixed.
(merge ee521ec4cb cc/replace-graft-peel-tags later to maint).
* Code tightening against a "wrong" object appearing where an object
of a different type is expected, instead of blindly assuming that
the connection between objects are correctly made.
(merge 97dd512af7 tb/unexpected later to maint).
* An earlier update for MinGW and Cygwin accidentally broke MSVC build,
which has been fixed.
(merge 22c3634c0f ss/msvc-path-utils-fix later to maint).
* %(push:track) token used in the --format option to "git
for-each-ref" and friends was not showing the right branch, which
has been fixed.
(merge c646d0934e dr/ref-filter-push-track-fix later to maint).
* "make check-docs", "git help -a", etc. did not account for cases
where a particular build may deliberately omit some subcommands,
which has been corrected.
* The logic to tell if a Git repository has a working tree protects
"git branch -D" from removing the branch that is currently checked
out by mistake. The implementation of this logic was broken for
repositories with unusual name, which unfortunately is the norm for
submodules these days. This has been fixed.
(merge f3534c98e4 jt/submodule-repo-is-with-worktree later to maint).
* AIX shared the same build issues with other BSDs around fileno(fp),
which has been corrected.
(merge ee662bf5c6 cc/aix-has-fileno-as-a-macro later to maint).
* The autoconf generated configure script failed to use the right
gettext() implementations from -libintl by ignoring useless stub
implementations shipped in some C library, which has been
corrected.
(merge b71e56a683 vk/autoconf-gettext later to maint).
* Fix index-pack perf test so that the repeated invocations always
run in an empty repository, which emulates the initial clone
situation better.
(merge 775c71e16d jk/p5302-avoid-collision-check-cost later to maint).
* A "ls-files" that emulates "find" to enumerate files in the working
tree resulted in duplicated Makefile rules that caused the build to
issue an unnecessary warning during a trial build after merge
conflicts are resolved in working tree *.h files but before the
resolved results are added to the index. This has been corrected.
* "git chery-pick" (and "revert" that shares the same runtime engine)
that deals with multiple commits got confused when the final step
gets stopped with a conflict and the user concluded the sequence
with "git commit". Attempt to fix it by cleaning up the state
files used by these commands in such a situation.
(merge 4a72486de9 pw/clean-sequencer-state-upon-final-commit later to maint).
* Code cleanup, docfix, build fix, etc.
(merge 11f470aee7 jc/test-yes-doc later to maint).
(merge 90503a240b js/doc-symref-in-proto-v1 later to maint).
......@@ -385,3 +508,5 @@ Fixes since v2.21
(merge f64a21bd82 tz/doc-apostrophe-no-longer-needed later to maint).
(merge dbe7b41019 js/t3301-unbreak-notes-test later to maint).
(merge d8083e4180 km/t3000-retitle later to maint).
(merge 9e4cbccbd7 tz/git-svn-doc-markup-fix later to maint).
(merge da9ca955a7 jk/ls-files-doc-markup-fix later to maint).
......@@ -124,6 +124,4 @@ pack.writeBitmapHashCache::
bitmapped and non-bitmapped objects (e.g., when serving a fetch
between an older, bitmapped pack and objects that have been
pushed since the last gc). The downside is that it consumes 4
bytes per object of disk space, and that JGit's bitmap
implementation does not understand it, causing it to complain if
Git and JGit are used on the same repository. Defaults to false.
bytes per object of disk space. Defaults to true.
......@@ -24,4 +24,4 @@ repack.writeBitmaps::
packs created for clones and fetches, at the cost of some disk
space and extra time spent on the initial repack. This has
no effect if multiple packfiles are created.
Defaults to false.
Defaults to true on bare repos, false otherwise.
......@@ -45,7 +45,11 @@ argument is missing it defaults to `HEAD` (i.e. the tip of the current
branch).
The command's second form creates a new branch head named <branchname>
which points to the current `HEAD`, or <start-point> if given.
which points to the current `HEAD`, or <start-point> if given. As a
special case, for <start-point>, you may use `"A...B"` as a shortcut for
the merge base of `A` and `B` if there is exactly one merge base. You
can leave out at most one of `A` and `B`, in which case it defaults to
`HEAD`.
Note that this will create the new branch, but it will not switch the
working tree to it; use "git switch <newbranch>" to switch to the
......
......@@ -330,6 +330,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
<start_point>::
The name of a commit at which to start the new branch; see
linkgit:git-branch[1] for details. Defaults to `HEAD`.
+
As a special case, you may use `"A...B"` as a shortcut for the
merge base of `A` and `B` if there is exactly one merge base. You can
leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
<tree-ish>::
Tree to checkout from (when paths are given). If not specified,
......
......@@ -123,6 +123,7 @@ OPTIONS
linkgit:git-status[1] `--short` or linkgit:git-diff[1]
`--name-status` for more user-friendly alternatives.
+
--
This option identifies the file status with the following tags (followed by
a space) at the start of each line:
......@@ -133,6 +134,7 @@ a space) at the start of each line:
C:: modified/changed
K:: to be killed
?:: other
--
-v::
Similar to `-t`, but use lowercase letters for files
......
......@@ -65,7 +65,7 @@ some output processing may assume ref names in UTF-8.
'@'::
'@' alone is a shortcut for `HEAD`.
'<refname>@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
'[<refname>]@{<date>}', e.g. 'master@\{yesterday\}', 'HEAD@{5 minutes ago}'::
A ref followed by the suffix '@' with a date specification
enclosed in a brace
pair (e.g. '\{yesterday\}', '{1 month 2 weeks 3 days 1 hour 1
......@@ -95,7 +95,7 @@ some output processing may assume ref names in UTF-8.
The construct '@{-<n>}' means the <n>th branch/commit checked out
before the current one.
'<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
'[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
refers to the branch that the branch specified by branchname is set to build on
top of (configured with `branch.<name>.remote` and
......@@ -103,7 +103,7 @@ some output processing may assume ref names in UTF-8.
current one. These suffixes are also accepted when spelled in uppercase, and
they mean the same thing no matter the case.
'<branchname>@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
'[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
The suffix '@\{push}' reports the branch "where we would push to" if
`git push` were run while `branchname` was checked out (or the current
`HEAD` if no branchname is specified). Since our push destination is
......@@ -131,7 +131,7 @@ from one location and push to another. In a non-triangular workflow,
This suffix is also accepted when spelled in uppercase, and means the same
thing no matter the case.
'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
'<rev>{caret}[<n>]', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
A suffix '{caret}' to a revision parameter means the first parent of
that commit object. '{caret}<n>' means the <n>th parent (i.e.
'<rev>{caret}'
......@@ -139,7 +139,9 @@ thing no matter the case.
'<rev>{caret}0' means the commit itself and is used when '<rev>' is the
object name of a tag object that refers to a commit object.
'<rev>{tilde}<n>', e.g. 'master{tilde}3'::
'<rev>{tilde}[<n>]', e.g. 'HEAD{tilde}, master{tilde}3'::
A suffix '{tilde}' to a revision parameter means the first parent of
that commit object.
A suffix '{tilde}<n>' to a revision parameter means the commit
object that is the <n>th generation ancestor of the named
commit object, following only the first parents. I.e. '<rev>{tilde}3' is
......@@ -159,12 +161,12 @@ thing no matter the case.
'<rev>{caret}0'
is a short-hand for '<rev>{caret}\{commit\}'.
+
'rev{caret}\{object\}' can be used to make sure 'rev' names an
object that exists, without requiring 'rev' to be a tag, and
without dereferencing 'rev'; because a tag is already an object,
'<rev>{caret}\{object\}' can be used to make sure '<rev>' names an
object that exists, without requiring '<rev>' to be a tag, and
without dereferencing '<rev>'; because a tag is already an object,
it does not have to be dereferenced even once to get to an object.
+
'rev{caret}\{tag\}' can be used to ensure that 'rev' identifies an
'<rev>{caret}\{tag\}' can be used to ensure that '<rev>' identifies an
existing tag object.
'<rev>{caret}{}', e.g. 'v0.99.8{caret}{}'::
......@@ -194,19 +196,16 @@ existing tag object.
Depending on the given text, the shell's word splitting rules might
require additional quoting.
'<rev>:<path>', e.g. 'HEAD:README', ':README', 'master:./README'::
'<rev>:<path>', e.g. 'HEAD:README', 'master:./README'::
A suffix ':' followed by a path names the blob or tree
at the given path in the tree-ish object named by the part
before the colon.
':path' (with an empty part before the colon)
is a special case of the syntax described next: content
recorded in the index at the given path.
A path starting with './' or '../' is relative to the current working directory.
The given path will be converted to be relative to the working tree's root directory.
This is most useful to address a blob or tree from a commit or tree that has
the same tree structure as the working tree.
':<n>:<path>', e.g. ':0:README', ':README'::
':[<n>:]<path>', e.g. ':0:README', ':README'::
A colon, optionally followed by a stage number (0 to 3) and a
colon, followed by a path, names a blob object in the
index at the given path. A missing stage number (and the colon
......@@ -302,7 +301,7 @@ The 'r1{caret}@' notation means all parents of 'r1'.
The 'r1{caret}!' notation includes commit 'r1' but excludes all of its parents.
By itself, this notation denotes the single commit 'r1'.
The '<rev>{caret}-<n>' notation includes '<rev>' but excludes the <n>th
The '<rev>{caret}-[<n>]' notation includes '<rev>' but excludes the <n>th
parent (i.e. a shorthand for '<rev>{caret}<n>..<rev>'), with '<n>' = 1 if
not given. This is typically useful for merge commits where you
can just pass '<commit>{caret}-' to get all the commits in the branch
......
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=v2.21.GIT
DEF_VER=v2.22.0-rc0
LF='
'
......
......@@ -439,6 +439,9 @@ all::
#
# Define FILENO_IS_A_MACRO if fileno() is a macro, not a real function.
#
# Define NEED_ACCESS_ROOT_HANDLER if access() under root may success for X_OK
# even if execution permission isn't granted for any user.
#
# Define PAGER_ENV to a SP separated VAR=VAL pairs to define
# default environment variables to be passed when a pager is spawned, e.g.
#
......@@ -819,12 +822,12 @@ VCSSVN_LIB = vcs-svn/lib.a
GENERATED_H += command-list.h
LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
LIB_H := $(sort $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
$(FIND) . \
-name .git -prune -o \
-name t -prune -o \
-name Documentation -prune -o \
-name '*.h' -print)
-name '*.h' -print))
LIB_OBJS += abspath.o
LIB_OBJS += advice.o
......@@ -1110,7 +1113,6 @@ BUILTIN_OBJS += builtin/push.o
BUILTIN_OBJS += builtin/range-diff.o
BUILTIN_OBJS += builtin/read-tree.o
BUILTIN_OBJS += builtin/rebase.o
BUILTIN_OBJS += builtin/rebase--interactive.o
BUILTIN_OBJS += builtin/receive-pack.o
BUILTIN_OBJS += builtin/reflog.o
BUILTIN_OBJS += builtin/remote.o
......@@ -1173,8 +1175,11 @@ PTHREAD_CFLAGS =
SPARSE_FLAGS ?=
SP_EXTRA_FLAGS =
# For the 'coccicheck' target
# For the 'coccicheck' target; setting SPATCH_BATCH_SIZE higher will
# usually result in less CPU usage at the cost of higher peak memory.
# Setting it to 0 will feed all files in a single spatch invocation.
SPATCH_FLAGS = --all-includes --patch .
SPATCH_BATCH_SIZE = 1
include config.mak.uname
-include config.mak.autogen
......@@ -1838,6 +1843,11 @@ ifdef FILENO_IS_A_MACRO
COMPAT_OBJS += compat/fileno.o
endif
ifdef NEED_ACCESS_ROOT_HANDLER
COMPAT_CFLAGS += -DNEED_ACCESS_ROOT_HANDLER
COMPAT_OBJS += compat/access.o
endif
ifeq ($(TCLTK_PATH),)
NO_TCLTK = NoThanks
endif
......@@ -2804,12 +2814,14 @@ endif
%.cocci.patch: %.cocci $(COCCI_SOURCES)
@echo ' ' SPATCH $<; \
ret=0; \
for f in $(COCCI_SOURCES); do \
$(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS) || \
{ ret=$$?; break; }; \
done >$@+ 2>$@.log; \
if test $$ret != 0; \
if test $(SPATCH_BATCH_SIZE) = 0; then \
limit=; \
else \
limit='-n $(SPATCH_BATCH_SIZE)'; \
fi; \
if ! echo $(COCCI_SOURCES) | xargs $$limit \
$(SPATCH) --sp-file $< $(SPATCH_FLAGS) \
>$@+ 2>$@.log; \
then \
cat $@.log; \
exit 1; \
......
......@@ -32,7 +32,7 @@ int git_default_advice_config(const char *var, const char *value);
__attribute__((format (printf, 1, 2)))
void advise(const char *advice, ...);
int error_resolve_conflict(const char *me);
extern void NORETURN die_resolve_conflict(const char *me);
void NORETURN die_resolve_conflict(const char *me);
void NORETURN die_conclude_merge(void);
void detach_advice(const char *new_name);
......
......@@ -23,9 +23,9 @@ struct archiver_args {
/* main api */
extern int write_archive(int argc, const char **argv, const char *prefix,
struct repository *repo,
const char *name_hint, int remote);
int write_archive(int argc, const char **argv, const char *prefix,
struct repository *repo,
const char *name_hint, int remote);
const char *archive_format_from_filename(const char *filename);
......@@ -39,21 +39,21 @@ struct archiver {
unsigned flags;
void *data;
};
extern void register_archiver(struct archiver *);
void register_archiver(struct archiver *);
extern void init_tar_archiver(void);
extern void init_zip_archiver(void);
extern void init_archivers(void);
void init_tar_archiver(void);
void init_zip_archiver(void);
void init_archivers(void);
typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
const struct object_id *oid,
const char *path, size_t pathlen,
unsigned int mode);
extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
extern void *object_file_to_archive(const struct archiver_args *args,
const char *path, const struct object_id *oid,
unsigned int mode, enum object_type *type,
unsigned long *sizep);
int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
void *object_file_to_archive(const struct archiver_args *args,
const char *path, const struct object_id *oid,
unsigned int mode, enum object_type *type,
unsigned long *sizep);
#endif /* ARCHIVE_H */
......@@ -11,14 +11,14 @@ struct repository;
* Otherwise, it will be either all non-SAMETREE commits or the single
* best commit, as chosen by `find_all`.
*/
extern void find_bisection(struct commit_list **list, int *reaches, int *all,
int find_all);
void find_bisection(struct commit_list **list, int *reaches, int *all,
int find_all);
extern struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
int show_all,
int *count,
int *skipped_first);
struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
int show_all,
int *count,
int *skipped_first);
#define BISECT_SHOW_ALL (1<<0)
#define REV_LIST_QUIET (1<<1)
......@@ -31,14 +31,14 @@ struct rev_list_info {
const char *header_prefix;
};
extern int bisect_next_all(struct repository *r,
const char *prefix,
int no_checkout);
int bisect_next_all(struct repository *r,
const char *prefix,
int no_checkout);
extern int estimate_bisect_steps(int all);
int estimate_bisect_steps(int all);
extern void read_bisect_terms(const char **bad, const char **good);
void read_bisect_terms(const char **bad, const char **good);
extern int bisect_clean_state(void);
int bisect_clean_state(void);
#endif
......@@ -177,6 +177,6 @@ struct blame_entry *blame_entry_prepend(struct blame_entry *head,
long start, long end,
struct blame_origin *o);
extern struct blame_origin *get_blame_suspects(struct commit *commit);
struct blame_origin *get_blame_suspects(struct commit *commit);
#endif /* BLAME_H */
......@@ -5,6 +5,7 @@
#include "refs.h"
#include "refspec.h"
#include "remote.h"
#include "sequencer.h"
#include "commit.h"
#include "worktree.h"
......@@ -268,7 +269,7 @@ void create_branch(struct repository *r,
}
real_ref = NULL;
if (get_oid(start_name, &oid)) {
if (get_oid_mb(start_name, &oid)) {
if (explicit_tracking) {
if (advice_set_upstream_failure) {
error(_(upstream_missing), start_name);
......@@ -339,10 +340,7 @@ void create_branch(struct repository *r,
void remove_branch_state(struct repository *r, int verbose)
{
if (!unlink(git_path_cherry_pick_head(r)) && verbose)
warning(_("cancelling a cherry picking in progress"));
if (!unlink(git_path_revert_head(r)) && verbose)
warning(_("cancelling a revert in progress"));
sequencer_post_commit_cleanup(r, verbose);
if (!unlink(git_path_merge_head(r)) && verbose)
warning(_("cancelling a merge in progress"));
unlink(git_path_merge_rr(r));
......
......@@ -50,7 +50,7 @@ void create_branch(struct repository *r,
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
extern int validate_branchname(const char *name, struct strbuf *ref);
int validate_branchname(const char *name, struct strbuf *ref);
/*
* Check if a branch 'name' can be created as a new branch; die otherwise.
......@@ -58,7 +58,7 @@ extern int validate_branchname(const char *name, struct strbuf *ref);
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
extern int validate_new_branchname(const char *name, struct strbuf *ref, int force);
int validate_new_branchname(const char *name, struct strbuf *ref, int force);
/*
* Remove information about the state of working on the current
......@@ -72,26 +72,26 @@ void remove_branch_state(struct repository *r, int verbose);
* Returns 0 on success.
*/
#define BRANCH_CONFIG_VERBOSE 01
extern int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
/*
* Read branch description
*/
extern int read_branch_desc(struct strbuf *, const char *branch_name);
int read_branch_desc(struct strbuf *, const char *branch_name);
/*
* Check if a branch is checked out in the main worktree or any linked
* worktree and die (with a message describing its checkout location) if
* it is.
*/
extern void die_if_checked_out(const char *branch, int ignore_current_worktree);
void die_if_checked_out(const char *branch, int ignore_current_worktree);
/*
* Update all per-worktree HEADs pointing at the old ref to point the new ref.
* This will be used when renaming a branch. Returns 0 if successful, non-zero
* otherwise.
*/
extern int replace_each_worktree_head_symref(const char *oldref, const char *newref,
const char *logmsg);
int replace_each_worktree_head_symref(const char *oldref, const char *newref,
const char *logmsg);
#endif
This diff is collapsed.
......@@ -99,10 +99,7 @@ static struct option builtin_clone_options[] = {
N_("don't use local hardlinks, always copy")),
OPT_BOOL('s', "shared", &option_shared,
N_("setup as shared repository")),
{ OPTION_CALLBACK, 0, "recursive", &option_recurse_submodules,
N_("pathspec"), N_("initialize submodules in the clone"),
PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, recurse_submodules_cb,
(intptr_t)"." },
OPT_ALIAS(0, "recursive", "recurse-submodules"),
{ OPTION_CALLBACK, 0, "recurse-submodules", &option_recurse_submodules,
N_("pathspec"), N_("initialize submodules in the clone"),
PARSE_OPT_OPTARG, recurse_submodules_cb, (intptr_t)"." },
......
......@@ -1664,8 +1664,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
die("%s", err.buf);
}
unlink(git_path_cherry_pick_head(the_repository));
unlink(git_path_revert_head(the_repository));
sequencer_post_commit_cleanup(the_repository, 0);
unlink(git_path_merge_head(the_repository));
unlink(git_path_merge_msg(the_repository));
unlink(git_path_merge_mode(the_repository));
......
......@@ -97,7 +97,7 @@ static off_t reuse_packfile_offset;
static int use_bitmap_index_default = 1;
static int use_bitmap_index = -1;
static int write_bitmap_index;
static uint16_t write_bitmap_options;
static uint16_t write_bitmap_options = BITMAP_OPT_HASH_CACHE;
static int exclude_promisor_objects;
......
This diff is collapsed.
This diff is collapsed.
......@@ -14,7 +14,7 @@
static int delta_base_offset = 1;
static int pack_kept_objects = -1;
static int write_bitmaps;
static int write_bitmaps = -1;
static int use_delta_islands;
static char *packdir, *packtmp;
......@@ -343,6 +343,9 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
(unpack_unreachable || (pack_everything & LOOSEN_UNREACHABLE)))
die(_("--keep-unreachable and -A are incompatible"));
if (write_bitmaps < 0)
write_bitmaps = (pack_everything & ALL_INTO_ONE) &&
is_bare_repository();
if (pack_kept_objects < 0)
pack_kept_objects = write_bitmaps;
......
......@@ -1316,7 +1316,7 @@ static int add_possible_reference_from_superproject(
die(_("submodule '%s' cannot add alternate: %s"),
sas->submodule_name, err.buf);
case SUBMODULE_ALTERNATE_ERROR_INFO:
fprintf(stderr, _("submodule '%s' cannot add alternate: %s"),
fprintf_ln(stderr, _("submodule '%s' cannot add alternate: %s"),
sas->submodule_name, err.buf);
case SUBMODULE_ALTERNATE_ERROR_IGNORE:
; /* nothing */
......
......@@ -207,7 +207,7 @@ struct create_tag_options {
};
static const char message_advice_nested_tag[] =
N_("You have created a nested tag. The object referred to by your new is\n"
N_("You have created a nested tag. The object referred to by your new tag is\n"
"already a tag. If you meant to tag the object that it points to, use:\n"
"\n"
"\tgit tag -f %s %s^{}");
......
......@@ -6,11 +6,11 @@
#include "cache.h"
extern int index_bulk_checkin(struct object_id *oid,
int fd, size_t size, enum object_type type,
const char *path, unsigned flags);
int index_bulk_checkin(struct object_id *oid,
int fd, size_t size, enum object_type type,
const char *path, unsigned flags);
extern void plug_bulk_checkin(void);
extern void unplug_bulk_checkin(void);
void plug_bulk_checkin(void);
void unplug_bulk_checkin(void);
#endif
This diff is collapsed.
......@@ -8,8 +8,8 @@
* tracking branch. Return the name of the remote if such a branch
* exists, NULL otherwise.
*/
extern const char *unique_tracking_name(const char *name,
struct object_id *oid,
int *dwim_remotes_matched);
const char *unique_tracking_name(const char *name,
struct object_id *oid,
int *dwim_remotes_matched);
#endif /* CHECKOUT_H */
......@@ -27,20 +27,20 @@ struct column_options {
};
struct option;
extern int parseopt_column_callback(const struct option *, const char *, int);
extern int git_column_config(const char *var, const char *value,
const char *command, unsigned int *colopts);
extern int finalize_colopts(unsigned int *colopts, int stdout_is_tty);
int parseopt_column_callback(const struct option *, const char *, int);
int git_column_config(const char *var, const char *value,
const char *command, unsigned int *colopts);
int finalize_colopts(unsigned int *colopts, int stdout_is_tty);
static inline int column_active(unsigned int colopts)
{
return (colopts & COL_ENABLE_MASK) == COL_ENABLED;
}
struct string_list;
extern void print_columns(const struct string_list *list, unsigned int colopts,
const struct column_options *opts);
void print_columns(const struct string_list *list, unsigned int colopts,