Junio C Hamano [Tue, 16 Jun 2015 21:27:07 +0000 (14:27 -0700)]
Merge branch 'sb/pack-protocol-mention-smart-http'
Doc updates.
* sb/pack-protocol-mention-smart-http:
Documentation/technical/pack-protocol: mention http as possible protocol
Junio C Hamano [Tue, 16 Jun 2015 21:27:06 +0000 (14:27 -0700)]
Merge branch 'jk/make-fix-dependencies'
Build clean-up.
* jk/make-fix-dependencies:
Makefile: silence perl/PM.stamp recipe
Makefile: avoid timestamp updates to GIT-BUILD-OPTIONS
Makefile: drop dependency between git-instaweb and gitweb
Junio C Hamano [Tue, 16 Jun 2015 21:27:06 +0000 (14:27 -0700)]
Merge branch 'jk/die-on-bogus-worktree-late'
The setup code used to die when core.bare and core.worktree are set
inconsistently, even for commands that do not need working tree.
* jk/die-on-bogus-worktree-late:
setup_git_directory: delay core.bare/core.worktree errors
Junio C Hamano [Tue, 16 Jun 2015 21:27:05 +0000 (14:27 -0700)]
Merge branch 'sg/merge-summary-config'
Doc updates.
* sg/merge-summary-config:
Documentation: include 'merge.branchdesc' for merge and config as well
Junio C Hamano [Tue, 16 Jun 2015 21:27:04 +0000 (14:27 -0700)]
Merge branch 'ah/send-email-sendmail-alias'
"git send-email" learned the alias file format used by the sendmail
program (in an abbreviated form).
* ah/send-email-sendmail-alias:
t9001: write $HOME/, not ~/, to help shells without tilde expansion
send-email: add sendmail email aliases format
Jeff King [Tue, 16 Jun 2015 17:23:20 +0000 (13:23 -0400)]
pkt-line: support tracing verbatim pack contents
When debugging the pack protocol, it is sometimes useful to
store the verbatim pack that we sent or received on the
wire. Looking at the on-disk result is often not helpful for
a few reasons:
1. If the operation is a clone, we destroy the repo on
failure, leaving nothing on disk.
2. If the pack is small, we unpack it immediately, and the
full pack never hits the disk.
3. If we feed the pack to "index-pack --fix-thin", the
resulting pack has the extra delta bases added to it.
We already have a GIT_TRACE_PACKET mechanism for tracing
packets. Let's extend it with GIT_TRACE_PACKFILE to dump the
verbatim packfile.
There are a few other positive fallouts that come from
rearranging this code:
- We currently disable the packet trace after seeing the
PACK header, even though we may get human-readable lines
on other sidebands; now we include them in the trace.
- We currently try to print "PACK ..." in the trace to
indicate that the packfile has started. But because we
disable packet tracing, we never printed this line. We
will now do so.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matthieu Moy [Tue, 16 Jun 2015 13:16:38 +0000 (15:16 +0200)]
Documentation/describe: improve one-line summary
git describe does not show 'the most recent tag that is reachable from a
commit', but a descriptive name based on this tag. Fix the description to
reflect that.
Suggested-by: Albert Netymk <redacted>
Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Fri, 12 Jun 2015 21:28:14 +0000 (17:28 -0400)]
pkt-line: tighten sideband PACK check when tracing
To find the start of the pack data, we accept the word PACK
at the beginning of any sideband channel, even though what
we really want is to find the pack data on channel 1. In
practice this doesn't matter, as sideband-2 messages tend to
start with "error:" or similar, but it is a good idea to be
explicit (especially as we add more code in this area, we
will rely on this assumption).
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Fri, 12 Jun 2015 21:28:08 +0000 (17:28 -0400)]
pkt-line: simplify starts_with checks in packet tracing
We carefully check that our pkt buffer has enough characters
before seeing if it starts with "PACK". The intent is to
avoid reading random memory if we get a short buffer like
"PAC".
However, we know that the traced packets are always
NUL-terminated. They come from one of these sources:
1. A string literal.
2. `format_packet`, which uses a strbuf.
3. `packet_read`, which defensively NUL-terminates what we
read.
We can therefore drop the length checks, as we know we will
hit the trailing NUL if we have a short input.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Erik Elfström [Mon, 15 Jun 2015 19:39:55 +0000 (21:39 +0200)]
clean: improve performance when removing lots of directories
"git clean" uses resolve_gitlink_ref() to check for the presence of
nested git repositories, but it has the drawback of creating a
ref_cache entry for every directory that should potentially be
cleaned. The linear search through the ref_cache list causes a massive
performance hit for large number of directories.
Modify clean.c:remove_dirs to use setup.c:is_git_directory and
setup.c:read_gitfile_gently instead.
Both these functions will open files and parse contents when they find
something that looks like a git repository. This is ok from a
performance standpoint since finding repository candidates should be
comparatively rare.
Using is_git_directory and read_gitfile_gently should give a more
standardized check for what is and what isn't a git repository but
also gives three behavioral changes.
The first change is that we will now detect and avoid cleaning empty
nested git repositories (only init run). This is desirable.
Second, we will no longer die when cleaning a file named ".git" with
garbage content (it will be cleaned instead). This is also desirable.
The last change is that we will detect and avoid cleaning empty bare
repositories that have been placed in a directory named ".git". This
is not desirable but should have no real user impact since we already
fail to clean non-empty bare repositories in the same scenario. This
is thus deemed acceptable.
On top of this we add some extra precautions. If read_gitfile_gently
fails to open the git file, read the git file or verify the path in
the git file we assume that the path with the git file is a valid
repository and avoid cleaning.
Update t7300 to reflect these changes in behavior.
The time to clean an untracked directory containing 100000 sub
directories went from 61s to 1.7s after this change.
Helped-by: Jeff King <redacted>
Signed-off-by: Erik Elfström <redacted>
Signed-off-by: Junio C Hamano <redacted>
Erik Elfström [Mon, 15 Jun 2015 19:39:54 +0000 (21:39 +0200)]
p7300: add performance tests for clean
The tests are run in dry-run mode to avoid having to restore the test
directories for each timed iteration. Using dry-run is an acceptable
compromise since we are mostly interested in the initial computation
of what to clean and not so much in the cleaning it self.
Signed-off-by: Erik Elfström <redacted>
Signed-off-by: Junio C Hamano <redacted>
Erik Elfström [Mon, 15 Jun 2015 19:39:53 +0000 (21:39 +0200)]
t7300: add tests to document behavior of clean and nested git
Signed-off-by: Erik Elfström <redacted>
Signed-off-by: Junio C Hamano <redacted>
Erik Elfström [Mon, 15 Jun 2015 19:39:52 +0000 (21:39 +0200)]
setup: sanity check file size in read_gitfile_gently
read_gitfile_gently will allocate a buffer to fit the entire file that
should be read. Add a sanity check of the file size before opening to
avoid allocating a potentially huge amount of memory if we come across
a large file that someone happened to name ".git". The limit is set to
a sufficiently unreasonable size that should never be exceeded by a
genuine .git file.
Signed-off-by: Erik Elfström <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Mon, 15 Jun 2015 18:27:22 +0000 (14:27 -0400)]
Revert "stash: require a clean index to apply"
This reverts commit
ed178ef13a26136d86ff4e33bb7b1afb5033f908.
That commit was an attempt to improve the safety of applying
a stash, because the application process may create
conflicted index entries, after which it is hard to restore
the original index state.
Unfortunately, this hurts some common workflows around "git
stash -k", like:
git add -p ;# (1) stage set of proposed changes
git stash -k ;# (2) get rid of everything else
make test ;# (3) make sure proposal is reasonable
git stash apply ;# (4) restore original working tree
If you "git commit" between steps (3) and (4), then this
just works. However, if these steps are part of a pre-commit
hook, you don't have that opportunity (you have to restore
the original state regardless of whether the tests passed or
failed).
It's possible that we could provide better tools for this
sort of workflow. In particular, even before
ed178ef, it
could fail with a conflict if there were conflicting hunks
in the working tree and index (since the "stash -k" puts the
index version into the working tree, and we then attempt to
apply the differences between HEAD and the old working tree
on top of that). But the fact remains that people have been
using it happily for a while, and the safety provided by
ed178ef is simply not that great. Let's revert it for now.
In the long run, people can work on improving stash for this
sort of workflow, but the safety tradeoff is not worth it in
the meantime.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:54 +0000 (16:41 +0800)]
pull: pass git-merge's options to git-merge
Specify git-merge's options in the option list, and pass any specified
options to git-merge.
These options are:
* -n, --stat, --summary: since
d8abe14 (merge, pull: introduce
'--(no-)stat' option, 2008-04-06)
* --log: since
efb779f (merge, pull: add '--(no-)log' command line
option, 2008-04-06)
* --squash: since
7d0c688 (git-merge --squash, 2006-06-23)
* --commit: since
5072a32 (Teach git-pull about --[no-]ff, --no-squash
and --commit, 2007-10-29)
* --edit: since
8580830 ("git pull" doesn't know "--edit", 2012-02-11)
* --ff, --ff-only: since
5072a32 (Teach git-pull about --[no-]ff,
--no-squash and --commit, 2007-10-29)
* --verify-signatures: since
efed002 (merge/pull: verify GPG signatures
of commits being merged, 2013-03-31)
* -s, --strategy: since
60fb5b2 (Use git-merge in git-pull (second
try)., 2005-09-25)
* -X, --strategy-option: since
ee2c795 (Teach git-pull to pass
-X<option> to git-merge, 2009-11-25)
* -S, --gpg-sign: since
ea230d8 (pull: add the --gpg-sign option.,
2014-02-10)
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:53 +0000 (16:41 +0800)]
pull: pass verbosity, --progress flags to fetch and merge
7f87aff (Teach/Fix pull/fetch -q/-v options, 2008-11-15) taught git-pull
to accept the verbosity -v and -q options and pass them to git-fetch and
git-merge.
Re-implement support for the verbosity flags by adding it to the options
list and introducing argv_push_verbosity() to push the flags into the
argv array used to execute git-fetch and git-merge.
9839018 (fetch and pull: learn --progress, 2010-02-24) and
bebd2fd
(pull: propagate --progress to merge, 2011-02-20) taught git-pull to
accept the --progress option and pass it to git-fetch and git-merge.
Use OPT_PASSTHRU() implemented earlier to pass the "--[no-]progress"
command line options to git-fetch and git-merge.
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:52 +0000 (16:41 +0800)]
pull: implement fetch + merge
Implement the fetch + merge functionality of git-pull, by first running
git-fetch with the repo and refspecs provided on the command line, then
running git-merge on FETCH_HEAD to merge the fetched refs into the
current branch.
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:51 +0000 (16:41 +0800)]
pull: implement skeletal builtin pull
For the purpose of rewriting git-pull.sh into a C builtin, implement a
skeletal builtin/pull.c that redirects to $GIT_EXEC_PATH/git-pull.sh if
the environment variable _GIT_USE_BUILTIN_PULL is not defined. This
allows us to fall back on the functional git-pull.sh when running the
test suite for tests that depend on a working git-pull implementation.
This redirection should be removed when all the features of git-pull.sh
have been re-implemented in builtin/pull.c.
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:50 +0000 (16:41 +0800)]
argv-array: implement argv_array_pushv()
When we have a null-terminated array, it would be useful to convert it
or append it to an argv_array for further manipulation.
Implement argv_array_pushv() which will push a null-terminated array of
strings on to an argv_array.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:49 +0000 (16:41 +0800)]
parse-options-cb: implement parse_opt_passthru_argv()
Certain git commands, such as git-pull, are simply wrappers around other
git commands like git-fetch, git-merge and git-rebase. As such, these
wrapper commands will typically need to "pass through" command-line
options of the commands they wrap.
Implement the parse_opt_passthru_argv() parse-options callback, which
will reconstruct all the provided command-line options into an
argv_array, such that it can be passed to another git command. This is
useful for passing command-line options that can be specified multiple
times.
Helped-by: Stefan Beller <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sun, 14 Jun 2015 08:41:48 +0000 (16:41 +0800)]
parse-options-cb: implement parse_opt_passthru()
Certain git commands, such as git-pull, are simply wrappers around other
git commands like git-fetch, git-merge and git-rebase. As such, these
wrapper commands will typically need to "pass through" command-line
options of the commands they wrap.
Implement the parse_opt_passthru() parse-options callback, which will
reconstruct the command-line option into an char* string, such that it
can be passed to another git command.
Helped-by: Johannes Schindelin <redacted>
Helped-by: Junio C Hamano <redacted>
Helped-by: Stefan Beller <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Mon, 15 Jun 2015 11:08:13 +0000 (19:08 +0800)]
am: teach mercurial patch parser how to read from stdin
git-mailsplit, which splits mbox patches, will read the patch from stdin
when the filename is "-" or there are no files listed on the
command-line.
To be consistent with this behavior, teach the mercurial patch parser to
read from stdin if the filename is "-" or no files are listed on the
command-line.
Based-on-patch-by: Chris Packham <redacted>
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Mon, 15 Jun 2015 11:08:12 +0000 (19:08 +0800)]
am: use gmtime() to parse mercurial patch date
An example of the line in a mercurial patch that specifies the date of
the commit would be:
# Date
1433753301 25200
where the first number is the number of seconds since the unix epoch (in
UTC), and the second number is the offset of the timezone, in second s
west of UTC (negative if the timezone is east of UTC).
git-am uses localtime() to break down the first number into its
components (year, month, day, hours, minutes, seconds etc.). However,
the returned components are relative to the user's time zone. As a
result, if the user's time zone does not match the time zone specified
in the patch, the resulting commit will have the wrong author date.
Fix this by using gmtime() instead, which uses UTC instead of the user's
time zone.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Mon, 15 Jun 2015 11:08:11 +0000 (19:08 +0800)]
t4150: test applying StGit series
A StGit series is a directory containing a "series" file which begins
with the line:
# This series applies on GIT commit XXXXX
where XXXXX is the commit ID that the patch series applies on. Every
following line names a patch in the directory to be applied.
Test that git-am, when given this "series" file, is able to detect it as
an StGit series and apply all the patches in the series.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Mon, 15 Jun 2015 11:08:10 +0000 (19:08 +0800)]
am: teach StGit patch parser how to read from stdin
git-mailsplit, which splits mbox patches, will read the patch from stdin
when the filename is "-" or there are no files listed on the
command-line.
To be consistent with this behavior, teach the StGit patch parser to
read from stdin if the filename is "-" or no files are listed on the
command-line.
Based-on-patch-by: Chris Packham <redacted>
Helped-by: Junio C Hamano <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:26 +0000 (01:07 +0530)]
ref-filter: add 'ref-filter.h'
This is step one of creating a common library for 'for-each-ref',
'branch -l' and 'tag -l'. This creates a header file with the
functions and data structures that ref-filter will provide.
We move the data structures created in for-each-ref to this header
file.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:25 +0000 (01:07 +0530)]
for-each-ref: rename variables called sort to sorting
Rename all the variables called sort to sorting to match the
function/structure name changes made in the previous patch.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:24 +0000 (01:07 +0530)]
for-each-ref: rename some functions and make them public
Rename some of the functions and make them publicly available.
This is a preparatory step for moving code from 'for-each-ref'
to 'ref-filter' to make meaningful, targeted services available to
other commands via public APIs.
Functions renamed are:
parse_atom() -> parse_ref_filter_atom()
verify_format() -> verify_ref_format()
get_value() -> get_ref_atom_value()
grab_single_ref() -> ref_filter_handler()
sort_refs() -> ref_array_sort()
show_ref() -> show_ref_array_item()
default_sort() -> ref_default_sorting()
opt_parse_sort() -> parse_opt_ref_sorting()
cmp_ref_sort() -> cmp_ref_sorting()
Rename 'struct ref_sort' to 'struct ref_sorting' in this context.
Based-on-patch-by: Jeff King <redacted>
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:23 +0000 (01:07 +0530)]
for-each-ref: introduce 'ref_array_clear()'
Introduce and implement 'ref_array_clear()' which will free
all allocated memory for 'ref_array'.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:22 +0000 (01:07 +0530)]
for-each-ref: introduce new structures for better organisation
Introduce 'ref_filter_cbdata' which will hold 'ref_filter'
(conditions to filter the refs on) and 'ref_array' (the array
of ref_array_items). Modify the code to use these new structures.
This is a preparatory patch to eventually move code from 'for-each-ref'
to 'ref-filter' and make it publicly available.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:21 +0000 (01:07 +0530)]
for-each-ref: rename 'refinfo' to 'ref_array_item'
Rename 'refinfo' to 'ref_array_item' as a preparatory step for
introduction of new structures in the forthcoming patch.
Re-order the fields in 'ref_array_item' so that refname can be
eventually converted to a FLEX_ARRAY.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:20 +0000 (01:07 +0530)]
for-each-ref: clean up code
In 'grab_single_ref()' remove the extra count variable 'cnt' and
use the variable 'grab_cnt' of structure 'grab_ref_cbdata' directly
instead.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Karthik Nayak [Sat, 13 Jun 2015 19:37:19 +0000 (01:07 +0530)]
for-each-ref: extract helper functions out of grab_single_ref()
Extract two helper functions out of grab_single_ref(). Firstly,
new_refinfo() which is used to allocate memory for a new refinfo
structure and copy the objectname, refname and flag to it.
Secondly, match_name_as_path() which when given an array of patterns
and the refname checks if the refname matches any of the patterns
given while the pattern is a pathname, also supports wildcard
characters.
This is a preperatory patch for restructuring 'for-each-ref' and
eventually moving most of it to 'ref-filter' to provide the
functionality to similar commands via public API's.
Helped-by: Junio C Hamano <redacted>
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael Rappazzo [Sat, 13 Jun 2015 16:26:58 +0000 (12:26 -0400)]
git-rebase--interactive.sh: add config option for custom instruction format
A config option 'rebase.instructionFormat' can override the
default 'oneline' format of the rebase instruction list.
Since the list is parsed using the left, right or boundary mark plus
the sha1, they are prepended to the instruction format.
Signed-off-by: Michael Rappazzo <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 14 Jun 2015 21:24:49 +0000 (14:24 -0700)]
Merge tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po into maint
l10n-2.4-maint-de-updates
* tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po:
l10n: de.po: translation fix for fall-back to 3way merge
l10n: de.po: punctuation fixes
l10n: de.po: grammar fix
l10n: de.po: change error message from "sagen" to "Meinten Sie"
Panagiotis Astithas [Thu, 11 Jun 2015 14:37:25 +0000 (17:37 +0300)]
hooks/pre-auto-gc: adjust power checking for newer OS X
The output of "pmset -g batt" changed at some point from "Currently
drawing from 'AC Power'" to the slightly different "Now drawing from
'AC Power'". Starting the match from "drawing" makes the check work
in both old and new versions of OS X.
Signed-off-by: Panagiotis Astithas <redacted>
Signed-off-by: Junio C Hamano <redacted>
Mike Hommey [Thu, 11 Jun 2015 21:34:59 +0000 (06:34 +0900)]
Allow to control where the replace refs are looked for
It can be useful to have grafts or replace refs for specific use-cases while
keeping the default "view" of the repository pristine (or with a different
set of grafts/replace refs).
It is possible to use a different graft file with GIT_GRAFT_FILE, but while
replace refs are more powerful, they don't have an equivalent override.
Add a GIT_REPLACE_REF_BASE environment variable to control where git is
going to look for replace refs.
Signed-off-by: Mike Hommey <redacted>
Signed-off-by: Junio C Hamano <redacted>
Nguyễn Thái Ngọc Duy [Fri, 12 Jun 2015 10:49:24 +0000 (17:49 +0700)]
checkout: don't check worktrees when not necessary
When --patch or pathspecs are passed to git checkout, the working tree
will not be switching branch, so there's no need to check if the branch
that we are running checkout on is already checked out.
Original-patch-by: Spencer Baugh <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Fri, 12 Jun 2015 13:29:58 +0000 (21:29 +0800)]
t0302: "unreadable" test needs SANITY prereq
The test expects that "chmod -r ~/.git-credentials" would make it
unreadable to the user, and thus needs the SANITY prerequisite.
Reported-by: Jean-Yves LENHOF <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael J Gruber [Tue, 19 May 2015 08:51:34 +0000 (10:51 +0200)]
l10n: de.po: translation fix for fall-back to 3way merge
The English version is correct, but misleading: It is not the 3way merge
that is being patched also, but that is being fallen back to also.
The German version translates the former meaning. Make it translate the
latter.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Ralf Thielow <redacted>
Michael J Gruber [Tue, 19 May 2015 08:51:33 +0000 (10:51 +0200)]
l10n: de.po: punctuation fixes
This respects the ellipsis style used in de.po.
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Ralf Thielow <redacted>
Michael J Gruber [Tue, 19 May 2015 08:51:32 +0000 (10:51 +0200)]
l10n: de.po: grammar fix
Signed-off-by: Michael J Gruber <redacted>
Signed-off-by: Ralf Thielow <redacted>
Phillip Sz [Sat, 9 May 2015 11:28:55 +0000 (13:28 +0200)]
l10n: de.po: change error message from "sagen" to "Meinten Sie"
We should not use "sagen" if someone has written something wrong.
Although it's "say" in English, we should not use it in German
and instead use our normal error message.
Signed-off-by: Phillip Sz <redacted>
Signed-off-by: Ralf Thielow <redacted>
Junio C Hamano [Thu, 11 Jun 2015 16:35:25 +0000 (09:35 -0700)]
Second half of seventh batch
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 11 Jun 2015 16:29:59 +0000 (09:29 -0700)]
Merge branch 'tb/complete-sequencing'
The bash completion script (in contrib/) learned a few options that
"git revert" takes.
* tb/complete-sequencing:
completion: suggest sequencer commands for revert
Junio C Hamano [Thu, 11 Jun 2015 16:29:58 +0000 (09:29 -0700)]
Merge branch 'jk/squelch-missing-link-warning-for-unreachable'
Recent "git prune" traverses young unreachable objects to safekeep
old objects in the reachability chain from them, which sometimes
caused error messages that are unnecessarily alarming.
* jk/squelch-missing-link-warning-for-unreachable:
suppress errors on missing UNINTERESTING links
silence broken link warnings with revs->ignore_missing_links
add quieter versions of parse_{tree,commit}
Junio C Hamano [Thu, 11 Jun 2015 16:29:58 +0000 (09:29 -0700)]
Merge branch 'pt/pull-tests'
Add more test coverage to "git pull".
* pt/pull-tests:
t5520: check reflog action in fast-forward merge
t5521: test --dry-run does not make any changes
t5520: test --rebase failure on unborn branch with index
t5520: test --rebase with multiple branches
t5520: test work tree fast-forward when fetch updates head
t5520: test for failure if index has unresolved entries
t5520: test no merge candidates cases
t5520: prevent field splitting in content comparisons
Junio C Hamano [Thu, 11 Jun 2015 16:29:57 +0000 (09:29 -0700)]
Merge branch 'sb/glossary-submodule'
* sb/glossary-submodule:
glossary: add "remote", "submodule", "superproject"
Junio C Hamano [Thu, 11 Jun 2015 16:29:56 +0000 (09:29 -0700)]
Merge branch 'sb/submodule-doc-intro'
* sb/submodule-doc-intro:
submodule doc: reorder introductory paragraphs
Junio C Hamano [Thu, 11 Jun 2015 16:29:55 +0000 (09:29 -0700)]
Merge branch 'jk/diagnose-config-mmap-failure'
The configuration reader/writer uses mmap(2) interface to access
the files; when we find a directory, it barfed with "Out of memory?".
* jk/diagnose-config-mmap-failure:
xmmap(): drop "Out of memory?"
config.c: rewrite ENODEV into EISDIR when mmap fails
config.c: avoid xmmap error messages
config.c: fix mmap leak when writing config
read-cache.c: drop PROT_WRITE from mmap of index
Junio C Hamano [Thu, 11 Jun 2015 16:29:55 +0000 (09:29 -0700)]
Merge branch 'mt/p4-depotFile-at-version'
* mt/p4-depotFile-at-version:
p4: retrieve the right revision of the file in UTF-16 codepath
Junio C Hamano [Thu, 11 Jun 2015 16:29:54 +0000 (09:29 -0700)]
Merge branch 'mh/verify-lock-error-report'
Bring consistency to error reporting mechanism used in "refs" API.
* mh/verify-lock-error-report:
ref_transaction_commit(): do not capitalize error messages
verify_lock(): do not capitalize error messages
verify_lock(): report errors via a strbuf
verify_lock(): on errors, let the caller unlock the lock
verify_lock(): return 0/-1 rather than struct ref_lock *
Junio C Hamano [Thu, 11 Jun 2015 16:29:53 +0000 (09:29 -0700)]
Merge branch 'jk/color-diff-plain-is-context'
"color.diff.plain" was a misnomer; give it 'color.diff.context' as
a more logical synonym.
* jk/color-diff-plain-is-context:
diff.h: rename DIFF_PLAIN color slot to DIFF_CONTEXT
diff: accept color.diff.context as a synonym for "plain"
Junio C Hamano [Thu, 11 Jun 2015 16:29:52 +0000 (09:29 -0700)]
Merge branch 'jk/clone-dissociate'
Code clean-up.
* jk/clone-dissociate:
clone: reorder --dissociate and --reference options
clone: use OPT_STRING_LIST for --reference
Junio C Hamano [Thu, 11 Jun 2015 16:29:51 +0000 (09:29 -0700)]
Merge branch 'jc/diff-ws-error-highlight'
Allow whitespace breakages in deleted and context lines to be also
painted in the output.
* jc/diff-ws-error-highlight:
diff.c: --ws-error-highlight=<kind> option
diff.c: add emit_del_line() and emit_context_line()
t4015: separate common setup and per-test expectation
t4015: modernise style
Joe Cridge [Wed, 10 Jun 2015 17:19:24 +0000 (18:19 +0100)]
git-prompt.sh: document GIT_PS1_STATESEPARATOR
The environment variable GIT_PS1_STATESEPARATOR can be used to set the
separator between the branch name and the state symbols in the prompt.
At present the variable is not mentioned in the inline documentation which
makes it difficult for the casual user to identify.
Signed-off-by: Joe Cridge <redacted>
Signed-off-by: Junio C Hamano <redacted>
Frans Klaver [Wed, 10 Jun 2015 21:01:14 +0000 (23:01 +0200)]
doc: format-patch: fix typo
reroll count documentation states that v<n> will be pretended to the
filename. Judging by the examples that should have been 'prepended'.
Signed-off-by: Frans Klaver <redacted>
Signed-off-by: Junio C Hamano <redacted>
Luke Diamand [Wed, 10 Jun 2015 07:30:59 +0000 (08:30 +0100)]
git-p4: fixing --changes-block-size handling
The --changes-block-size handling was intended to help when
a user has a limited "maxscanrows" (see "p4 group"). It used
"p4 changes -m $maxchanges" to limit the number of results.
Unfortunately, it turns out that the "maxscanrows" and "maxresults"
limits are actually applied *before* the "-m maxchanges" parameter
is considered (experimentally).
Fix the block-size handling so that it gets blocks of changes
limited by revision number ($Start..$Start+$N, etc). This limits
the number of results early enough that both sets of tests pass.
Note that many other Perforce operations can fail for the same
reason (p4 print, p4 files, etc) and it's probably not possible
to workaround this. In the real world, this is probably not
usually a problem.
Signed-off-by: Luke Diamand <redacted>
Signed-off-by: Junio C Hamano <redacted>
Luke Diamand [Wed, 10 Jun 2015 07:30:58 +0000 (08:30 +0100)]
git-p4: add tests for non-numeric revision range
Test that git-p4 can handle a sync with a non-numeric revision
range (e.g. a date).
Signed-off-by: Luke Diamand <redacted>
Signed-off-by: Junio C Hamano <redacted>
Erik Elfström [Tue, 9 Jun 2015 18:24:35 +0000 (20:24 +0200)]
setup: add gentle version of read_gitfile
read_gitfile will die on most error cases. This makes it unsuitable
for speculative calls. Extract the core logic and provide a gentle
version that returns NULL on failure.
The first usecase of the new gentle version will be to probe for
submodules during git clean.
Helped-by: Junio C Hamano <redacted>
Helped-by: Jeff King <redacted>
Signed-off-by: Erik Elfström <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Tue, 9 Jun 2015 17:24:37 +0000 (13:24 -0400)]
index-pack: avoid excessive re-reading of pack directory
Since
45e8a74 (has_sha1_file: re-check pack directory before
giving up, 2013-08-30), we spend extra effort for
has_sha1_file to give the right answer when somebody else is
repacking. Usually this effort does not matter, because
after finding that the object does not exist, the next step
is usually to die().
However, some code paths make a large number of
has_sha1_file checks which are _not_ expected to return 1.
The collision test in index-pack.c is such a case. On a
local system, this can cause a performance slowdown of
around 5%. But on a system with high-latency system calls
(like NFS), it can be much worse.
This patch introduces a "quick" flag to has_sha1_file which
callers can use when they would prefer high performance at
the cost of false negatives during repacks. There may be
other code paths that can use this, but the index-pack one
is the most obviously critical, so we'll start with
switching that one.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Tue, 9 Jun 2015 00:28:34 +0000 (02:28 +0200)]
commit: cope with scissors lines in commit message
The diff and submodule shortlog appended to the commit message template
by 'git commit --verbose' are not stripped when the commit message
contains an indented scissors line.
When cleaning up a commit message with 'git commit --verbose' or
'--cleanup=scissors' the code is careful and triggers only on a pure
scissors line, i.e. a line containing nothing but a comment character, a
space, and the scissors cut. This is good, because people can embed
scissors lines in the commit message while using 'git commit --verbose',
and the text they write after their indented scissors line doesn't get
deleted.
While doing so, however, the cleanup function only looks at the first
line matching the scissors pattern and if it doesn't start at the
beginning of the line, then the function just returns without performing
any cleanup. This is wrong, because a "real" scissors line added by
'git commit --verbose' might follow, and in that case the diff and
submodule shortlog get included in the commit message.
Fix this by changing the scissors pattern to match only at the beginning
of the line, yet be careful to catch scissors on the first line as well.
Helped-by: Junio C Hamano <redacted>
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ariel Faigon [Tue, 9 Jun 2015 17:25:15 +0000 (10:25 -0700)]
git-completion.tcsh: fix redirect with noclobber
tcsh users who happen to have 'set noclobber' elsewhere in their
~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and
the tcsh completion file doesn't get generated/updated.
Adding a `!` in the redirect works correctly for both clobber (default)
and 'set noclobber' users.
Reviewed-by: Christian Couder <redacted>
Signed-off-by: Ariel Faigon <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sat, 6 Jun 2015 11:46:12 +0000 (19:46 +0800)]
am --abort: keep unrelated commits on unborn branch
Since
7b3b7e3 (am --abort: keep unrelated commits since the last failure
and warn, 2010-12-21), git-am would refuse to rewind HEAD if commits
were made since the last git-am failure. This check was implemented in
safe_to_abort(), which checked to see if HEAD's hash matched the
abort-safety file.
However, this check was skipped if the abort-safety file was empty,
which can happen if git-am failed while on an unborn branch. As such, if
any commits were made since then, they would be discarded. Fix this by
carrying on the abort safety check even if the abort-safety file is
empty.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sat, 6 Jun 2015 11:46:11 +0000 (19:46 +0800)]
am --abort: support aborting to unborn branch
When git-am is first run on an unborn branch, no ORIG_HEAD is created.
As such, any applied commits will remain even after a git am --abort.
To be consistent with the behavior of git am --abort when it is not run
from an unborn branch, we empty the index, and then destroy the branch
pointed to by HEAD if there is no ORIG_HEAD.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sat, 6 Jun 2015 11:46:10 +0000 (19:46 +0800)]
am --abort: revert changes introduced by failed 3way merge
Even when a merge conflict occurs with am --3way, the index will be
modified with the results of any successfully merged files. These
changes to the index will not be reverted with a
"git read-tree --reset -u HEAD ORIG_HEAD", as git read-tree will not be
aware of how the current index differs from HEAD or ORIG_HEAD.
To fix this, we first reset any conflicting entries in the index. The
resulting index will contain the results of successfully merged files
introduced by the failed merge. We write this index to a tree, and then
use git read-tree to fast-forward this "index tree" back to ORIG_HEAD,
thus undoing all the changes from the failed merge.
When we are on an unborn branch, HEAD and ORIG_HEAD will not point to
valid trees. In this case, use an empty tree.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sat, 6 Jun 2015 11:46:09 +0000 (19:46 +0800)]
am --skip: support skipping while on unborn branch
When git am --skip is run, git am will copy HEAD's tree entries to the
index with "git reset HEAD". However, on an unborn branch, HEAD does not
point to a tree, so "git reset HEAD" will fail.
Fix this by treating HEAD as en empty tree when we are on an unborn
branch.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sat, 6 Jun 2015 11:46:08 +0000 (19:46 +0800)]
am -3: support 3way merge on unborn branch
While on an unborn branch, git am -3 will fail to do a threeway merge as
it references HEAD as "our tree", but HEAD does not point to a valid
tree.
Fix this by using an empty tree as "our tree" when we are on an unborn
branch.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Sat, 6 Jun 2015 11:46:07 +0000 (19:46 +0800)]
am --skip: revert changes introduced by failed 3way merge
Even when a merge conflict occurs with am --3way, the index will be
modified with the results of any succesfully merged files (such as a new
file). These changes to the index will not be reverted with a
"git read-tree --reset -u HEAD HEAD", as git read-tree will not be aware
of how the current index differs from HEAD.
To fix this, we first reset any conflicting entries from the index. The
resulting index will contain the results of successfully merged files.
We write the index to a tree, then use git read-tree -m to fast-forward
the "index tree" back to HEAD, thus undoing all the changes from the
failed merge.
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Tan [Mon, 8 Jun 2015 15:48:47 +0000 (23:48 +0800)]
t4150: test applying StGit patch
By default, an StGit patch separates the subject from the commit message
and headers as follows:
$subject
From: $author_name <$author_email>
$message
---
$diffstats
We test git-am's ability to detect such a patch as an StGit patch, and
its ability to be able to extract the commit author, date and message
from such a patch.
Based-on-patch-by: Chris Packham <redacted>
Signed-off-by: Paul Tan <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael Haggerty [Mon, 8 Jun 2015 13:40:05 +0000 (15:40 +0200)]
fsck: report errors if reflog entries point at invalid objects
Previously, if a reflog entry's old or new SHA-1 was not resolvable to
an object, that SHA-1 was silently ignored. Instead, report such cases
as errors.
Signed-off-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael Haggerty [Mon, 8 Jun 2015 13:40:04 +0000 (15:40 +0200)]
fsck_handle_reflog_sha1(): new function
New function, extracted from fsck_handle_reflog_ent(). The extra
is_null_sha1() test for the new reference is currently unnecessary, as
reflogs are deleted when the reference itself is deleted. But it
doesn't hurt, either.
Signed-off-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Michael Haggerty [Wed, 3 Jun 2015 13:51:59 +0000 (15:51 +0200)]
read_loose_refs(): treat NULL_SHA1 loose references as broken
NULL_SHA1 is used to indicate an "invalid object name" throughout our
code (and the code of other git implementations), so it is vastly more
likely that an on-disk reference was set to this value due to a
software bug than that NULL_SHA1 is the legitimate SHA-1 of an actual
object. Therefore, if a loose reference has the value NULL_SHA1,
consider it to be broken.
Signed-off-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Nguyễn Thái Ngọc Duy [Sun, 7 Jun 2015 10:40:52 +0000 (17:40 +0700)]
read-cache: fix untracked cache invalidation when split-index is used
Before this change, t7063.17 fails. The actual action though happens at
t7063.16 where the entry "two" is added back to index after being
removed in the .13. Here we expect a directory invalidate at .16 and
none at .17 where untracked cache is refreshed. But things do not go as
expected when GIT_TEST_SPLIT_INDEX is set.
The different behavior that happens at .16 when split index is used: the
entry "two", when deleted at .13, is simply marked "deleted". When .16
executes, the entry resurfaces from the version in base index. This
happens in merge_base_index() where add_index_entry() is called to add
"two" back from the base index.
This is where the bug comes from. The add_index_entry() is called with
ADD_CACHE_KEEP_CACHE_TREE flag because this version of "two" is not new,
it does not break either cache-tree or untracked cache. The code should
check this flag and not invalidate untracked cache. This causes a second
invalidation violates test expectation. The fix is obvious.
Noticed-by: Thomas Gummerer <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Luke Diamand [Sun, 7 Jun 2015 21:35:04 +0000 (22:35 +0100)]
git-p4: test with limited p4 server results
Change the --changes-block-size git-p4 test to use an account with
limited "maxresults" and "maxscanrows" values.
These conditions are applied in the server *before* the "-m maxchanges"
parameter to "p4 changes" is applied, and so the strategy that git-p4
uses for limiting the number of changes does not work. As a result,
the tests all fail.
Note that "maxscanrows" is set quite high, as it appears to not only
limit results from "p4 changes", but *also* limits results from
"p4 print". Files that have more than "maxscanrows" changes seem
(experimentally) to be impossible to print. There's no good way to
work around this.
Signed-off-by: Luke Diamand <redacted>
Acked-by: Lex Spoon <redacted>
Signed-off-by: Junio C Hamano <redacted>
Luke Diamand [Sun, 7 Jun 2015 21:35:03 +0000 (22:35 +0100)]
git-p4: additional testing of --changes-block-size
Add additional tests of some corner-cases of the
--changes-block-size git-p4 parameter.
Also reduce the number of p4 changes created during the
tests, so that they complete faster.
Signed-off-by: Luke Diamand <redacted>
Acked-by: Lex Spoon <redacted>
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Mon, 8 Jun 2015 01:43:31 +0000 (03:43 +0200)]
completion: teach 'scissors' mode to 'git commit --cleanup='
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
Eric Sunshine [Fri, 5 Jun 2015 06:42:16 +0000 (02:42 -0400)]
utf8: NO_ICONV: silence uninitialized variable warning
The last argument of reencode_string_len() is an 'int *' which is
assigned the length of the converted string. When NO_ICONV is defined,
however, reencode_string_len() is stubbed out by the macro:
#define reencode_string_len(a,b,c,d,e) NULL
which never assigns a value to the final argument. When called like
this:
int n;
char *s = reencode_string_len(..., &n);
if (s)
do_something(s, n);
some compilers complain that 'n' is used uninitialized within the
conditional.
Signed-off-by: Eric Sunshine <redacted>
Reviewed-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 5 Jun 2015 19:45:07 +0000 (21:45 +0200)]
lockfile: wait using sleep_millisec() instead of select()
Use the new function sleep_millisec() to delay execution for a short
time. This avoids the invocation of select() with just a timeout, but
no file descriptors. Such a use of select() is quit with EINVAL on
Windows, leading to no delay at all.
Signed-off-by: Johannes Sixt <redacted>
Reviewed-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 5 Jun 2015 19:45:06 +0000 (21:45 +0200)]
lockfile: convert retry timeout computations to millisecond
When the goal is to wait for some random amount of time up to one
second, it is not necessary to compute with microsecond precision.
This is a preparation to re-use sleep_millisec().
Signed-off-by: Johannes Sixt <redacted>
Reviewed-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 5 Jun 2015 19:45:05 +0000 (21:45 +0200)]
help.c: wrap wait-only poll() invocation in sleep_millisec()
We want to use the new function elsewhere in a moment.
Signed-off-by: Johannes Sixt <redacted>
Reviewed-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Fri, 5 Jun 2015 19:45:04 +0000 (21:45 +0200)]
lockfile: replace random() by rand()
On Windows, we do not have functions srandom() and random(). Use srand()
and rand(). These functions produce random numbers of lesser quality,
but for the purpose (a retry time-out) they are still good enough.
Signed-off-by: Johannes Sixt <redacted>
Reviewed-by: Michael Haggerty <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 5 Jun 2015 19:23:18 +0000 (12:23 -0700)]
Sync with 2.4.3
Junio C Hamano [Fri, 5 Jun 2015 19:15:57 +0000 (12:15 -0700)]
Git 2.4.3
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 5 Jun 2015 19:20:57 +0000 (12:20 -0700)]
The first half of the seventh batch for 2.5
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 5 Jun 2015 19:17:38 +0000 (12:17 -0700)]
Merge branch 'ld/p4-editor-multi-words'
Unlike "$EDITOR" and "$GIT_EDITOR" that can hold the path to the
command and initial options (e.g. "/path/to/emacs -nw"), 'git p4'
did not let the shell interpolate the contents of the environment
variable that name the editor "$P4EDITOR" (and "$EDITOR", too).
Make it in line with the rest of Git, as well as with Perforce.
* ld/p4-editor-multi-words:
git-p4: tests: use test-chmtime in place of touch
git-p4: fix handling of multi-word P4EDITOR
git-p4: add failing test for P4EDITOR handling
Junio C Hamano [Fri, 5 Jun 2015 19:17:37 +0000 (12:17 -0700)]
Merge branch 'bc/object-id'
for_each_ref() callback functions were taught to name the objects
not with "unsigned char sha1[20]" but with "struct object_id".
* bc/object-id: (56 commits)
struct ref_lock: convert old_sha1 member to object_id
warn_if_dangling_symref(): convert local variable "junk" to object_id
each_ref_fn_adapter(): remove adapter
rev_list_insert_ref(): remove unneeded arguments
rev_list_insert_ref_oid(): new function, taking an object_oid
mark_complete(): remove unneeded arguments
mark_complete_oid(): new function, taking an object_oid
clear_marks(): rewrite to take an object_id argument
mark_complete(): rewrite to take an object_id argument
send_ref(): convert local variable "peeled" to object_id
upload-pack: rewrite functions to take object_id arguments
find_symref(): convert local variable "unused" to object_id
find_symref(): rewrite to take an object_id argument
write_one_ref(): rewrite to take an object_id argument
write_refs_to_temp_dir(): convert local variable sha1 to object_id
submodule: rewrite to take an object_id argument
shallow: rewrite functions to take object_id arguments
handle_one_ref(): rewrite to take an object_id argument
add_info_ref(): rewrite to take an object_id argument
handle_one_reflog(): rewrite to take an object_id argument
...
Junio C Hamano [Fri, 5 Jun 2015 19:17:36 +0000 (12:17 -0700)]
Merge branch 'jk/at-push-sha1'
Introduce <branch>@{push} short-hand to denote the remote-tracking
branch that tracks the branch at the remote the <branch> would be
pushed to.
* jk/at-push-sha1:
for-each-ref: accept "%(push)" format
for-each-ref: use skip_prefix instead of starts_with
sha1_name: implement @{push} shorthand
sha1_name: refactor interpret_upstream_mark
sha1_name: refactor upstream_mark
remote.c: add branch_get_push
remote.c: return upstream name from stat_tracking_info
remote.c: untangle error logic in branch_get_upstream
remote.c: report specific errors from branch_get_upstream
remote.c: introduce branch_get_upstream helper
remote.c: hoist read_config into remote_get_1
remote.c: provide per-branch pushremote name
remote.c: hoist branch.*.remote lookup out of remote_get_1
remote.c: drop "remote" pointer from "struct branch"
remote.c: refactor setup of branch->merge list
remote.c: drop default_remote_name variable
Junio C Hamano [Fri, 5 Jun 2015 19:00:29 +0000 (12:00 -0700)]
Merge branch 'dl/branch-error-message' into maint
Error messages from "git branch" called remote-tracking branches as
"remote branches".
* dl/branch-error-message:
branch: do not call a "remote-tracking branch" a "remote branch"
Junio C Hamano [Fri, 5 Jun 2015 19:00:28 +0000 (12:00 -0700)]
Merge branch 'jk/skip-http-tests-under-no-curl' into maint
Test clean-up.
* jk/skip-http-tests-under-no-curl:
tests: skip dav http-push tests under NO_EXPAT=NoThanks
t/lib-httpd.sh: skip tests if NO_CURL is defined
Junio C Hamano [Fri, 5 Jun 2015 19:00:27 +0000 (12:00 -0700)]
Merge branch 'ps/doc-packfile-vs-pack-file' into maint
Doc consistency updates.
* ps/doc-packfile-vs-pack-file:
doc: fix inconsistent spelling of "packfile"
pack-protocol.txt: fix insconsistent spelling of "packfile"
git-unpack-objects.txt: fix inconsistent spelling of "packfile"
git-verify-pack.txt: fix inconsistent spelling of "packfile"
Junio C Hamano [Fri, 5 Jun 2015 19:00:26 +0000 (12:00 -0700)]
Merge branch 'fg/document-commit-message-stripping' into maint
* fg/document-commit-message-stripping:
Documentation: clarify how "git commit" cleans up the edited log message
Junio C Hamano [Fri, 5 Jun 2015 19:00:25 +0000 (12:00 -0700)]
Merge branch 'jk/rerere-forget-check-enabled' into maint
"git rerere forget" in a repository without rerere enabled gave a
cryptic error message; it should be a silent no-op instead.
* jk/rerere-forget-check-enabled:
rerere: exit silently on "forget" when rerere is disabled
Junio C Hamano [Fri, 5 Jun 2015 19:00:24 +0000 (12:00 -0700)]
Merge branch 'pt/pull-log-n' into maint
"git pull --log" and "git pull --no-log" worked as expected, but
"git pull --log=20" did not.
* pt/pull-log-n:
pull: handle --log=<n>
Junio C Hamano [Fri, 5 Jun 2015 19:00:23 +0000 (12:00 -0700)]
Merge branch 'pt/pull-ff-vs-merge-ff' into maint
The pull.ff configuration was supposed to override the merge.ff
configuration, but it didn't.
* pt/pull-ff-vs-merge-ff:
pull: parse pull.ff as a bool or string
pull: make pull.ff=true override merge.ff
Junio C Hamano [Fri, 5 Jun 2015 19:00:22 +0000 (12:00 -0700)]
Merge branch 'rs/plug-leak-in-pack-bitmaps' into maint
The code to read pack-bitmap wanted to allocate a few hundred
pointers to a structure, but by mistake allocated and leaked memory
enough to hold that many actual structures. Correct the allocation
size and also have it on stack, as it is small enough.
* rs/plug-leak-in-pack-bitmaps:
pack-bitmaps: plug memory leak, fix allocation size for recent_bitmaps
Junio C Hamano [Fri, 5 Jun 2015 19:00:22 +0000 (12:00 -0700)]
Merge branch 'ja/tutorial-asciidoctor-fix' into maint
A literal block in the tutorial had lines with unequal lengths to
delimit it from the rest of the document, which choke GitHub's
AsciiDoc renderer.
* ja/tutorial-asciidoctor-fix:
doc: fix unmatched code fences
Junio C Hamano [Fri, 5 Jun 2015 19:00:20 +0000 (12:00 -0700)]
Merge branch 'jk/stripspace-asciidoctor-fix' into maint
A literal block in the tutorial had lines with unequal lengths to
delimit it from the rest of the document, which choke GitHub's
AsciiDoc renderer.
* jk/stripspace-asciidoctor-fix:
doc: fix unmatched code fences in git-stripspace
Junio C Hamano [Fri, 5 Jun 2015 19:00:19 +0000 (12:00 -0700)]
Merge branch 'jk/asciidoc-markup-fix' into maint
Various documentation mark-up fixes to make the output more
consistent in general and also make AsciiDoctor (an alternative
formatter) happier.
* jk/asciidoc-markup-fix:
doc: convert AsciiDoc {?foo} to ifdef::foo[]
doc: put example URLs and emails inside literal backticks
doc: drop backslash quoting of some curly braces
doc: convert \--option to --option
doc/add: reformat `--edit` option
doc: fix length of underlined section-title
doc: fix hanging "+"-continuation
doc: fix unquoted use of "{type}"
doc: fix misrendering due to `single quote'
Junio C Hamano [Fri, 5 Jun 2015 19:00:18 +0000 (12:00 -0700)]
Merge branch 'ps/bundle-verify-arg' into maint
"git bundle verify" did not diagnose extra parameters on the
command line.
* ps/bundle-verify-arg:
bundle: verify arguments more strictly