Skip to content

Commit

Permalink
Merge branch 'fc/git-complete-helper' into fc/git-prompt-script
Browse files Browse the repository at this point in the history
By Michael Haggerty (17) and others
via Junio C Hamano (36) and Jeff King (1)
* fc/git-complete-helper: (54 commits)
  completion: add new __git_complete helper
  Update draft release notes to 1.7.11 (11th batch)
  Git 1.7.10.2
  document submdule.$name.update=none option for gitmodules
  The tenth batch of topics
  Update draft release notes to 1.7.10.2
  checkout: do not corrupt HEAD on empty repo
  apply: remove lego in i18n string in gitdiff_verify_name
  dir: convert to strbuf
  status: refactor colopts handling
  status: respect "-b" for porcelain format
  status: fix null termination with "-b"
  status: refactor null_termination option
  commit: refactor option parsing
  Documentation/git-config: describe and clarify "--local <file>" option
  reflog-walk: tell explicit --date=default from not having --date at all
  clone: fix progress-regression
  grep.c: remove redundant line of code
  checkout (detached): truncate list of orphaned commits at the new HEAD
  t2020-checkout-detach: check for the number of orphaned commits
  ...
  • Loading branch information
Junio C Hamano committed May 22, 2012
2 parents 963c040 + 6b179ad commit 423b5a1
Show file tree
Hide file tree
Showing 39 changed files with 1,084 additions and 527 deletions.
39 changes: 39 additions & 0 deletions Documentation/RelNotes/1.7.10.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Fixes since v1.7.10.1
* HTTP transport that requires authentication did not work correctly when
multiple connections are used simultaneously.

* Minor memory leak during unpack_trees (hence "merge" and "checkout"
to check out another branch) has been plugged.

* In the older days, the header "Conflicts:" in "cherry-pick" and "merge"
was separated by a blank line from the list of paths that follow for
readability, but when "merge" was rewritten in C, we lost it by
Expand All @@ -24,6 +27,9 @@ Fixes since v1.7.10.1
be both revision name and a pathname, even though $name can never be a
path in the context of the command.

* The "include.path" facility in the configuration mechanism added in
1.7.10 forgot to interpret "~/path" and "~user/path" as it should.

* "git config --rename-section" to rename an existing section into a
bogus one did not check the new name.

Expand All @@ -33,11 +39,44 @@ Fixes since v1.7.10.1
* The report from "git fetch" said "new branch" even for a non branch
ref.

* The http-backend (the server side of the smart http transfer) used
to overwrite GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL with the
value obtained from REMOTE_USER unconditionally, making it
impossible for the server side site-specific customization to use
different identity sources to affect the names logged. It now uses
REMOTE_USER only as a fallback value.

* "log --graph" was not very friendly with "--stat" option and its
output had line breaks at wrong places.

* Octopus merge strategy did not reduce heads that are recorded in the
final commit correctly.

* "git push" over smart-http lost progress output a few releases ago;
this release resurrects it.

* The error and advice messages given by "git push" when it fails due
to non-ff were not very helpful to new users; it has been broken
into three cases, and each is given a separate advice message.

* The insn sheet given by "rebase -i" did not make it clear that the
insn lines can be re-ordered to affect the order of the commits in
the resulting history.

* "git repack" used to write out unreachable objects as loose objects
when repacking, even if such loose objects will immediately pruned
due to its age.

* A contrib script "rerere-train" did not work out of the box unless
user futzed with her $PATH.

* "git rev-parse --show-prefix" used to emit nothing when run at the
top-level of the working tree, but now it gives a blank line.

* The i18n of error message "git stash save" was not properly done.

* "git submodule" used a sed script that some platforms mishandled.

* When using a Perl script on a system where "perl" found on user's
$PATH could be ancient or otherwise broken, we allow builders to
specify the path to a good copy of Perl with $PERL_PATH. The
Expand Down
59 changes: 32 additions & 27 deletions Documentation/RelNotes/1.7.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ UI, Workflows & Features
tracking. Also "branch" learned the "-q"uiet option to squelch
informational message.

* Your build platform may support hardlinks but you may prefer not to
use them, e.g. when installing to DESTDIR to make a tarball and
untarring on a filesystem that has poor support for hardlinks.
There is a Makefile option NO_INSTALL_HARDLINKS for you.

* The smart-http backend used to always override GIT_COMMITTER_*
variables with REMOTE_USER and REMOTE_ADDR, but these variables are
now preserved when set.

* "include.path" mechanism of the configuration files learned to
understand "~/path" and "~user/path".

* "git am" learned the "--include" option, which is an opposite of
existing the "--exclude" option.

Expand All @@ -51,9 +53,6 @@ UI, Workflows & Features
* The "fmt-merge-msg" command learns to list the primary contributors
involved in the side topic you are merging.

* The cases "git push" fails due to non-ff can be broken into three
categories; each case is given a separate advise message.

* "git rebase" learned to optionally keep commits that do not
introduce any change in the original history.

Expand Down Expand Up @@ -83,27 +82,20 @@ Performance and Internal Implementation (please report possible regressions)
* An experimental "version 4" format of the index file has been
introduced to reduce on-disk footprint and I/O overhead.

* "git archive" learned to produce its output without reading the
blob object it writes out in memory in its entirety.

* The code to compute hash values for lines used by the internal diff
engine was optimized on little-endian machines, using the same
trick the kernel folks came up with.

* "git apply" had some memory leaks plugged.

* "git repack" used to write out unreachable objects as loose objects
when repacking, even if such loose objects will immediately pruned
due to its age.

* Setting up a revision traversal with many starting points was
inefficient as these were placed in a date-order priority queue
one-by-one. Now they are collected in the queue unordered first,
and sorted immediately before getting used.

* "git rev-parse --show-prefix" used to emit nothing when run at the
top-level of the working tree, but now it gives a blank line.

* Minor memory leak during unpack_trees (hence "merge" and "checkout"
to check out another branch) has been plugged.

* More lower-level commands learned to use the streaming API to read
from the object store without keeping everything in core.

Expand All @@ -124,6 +116,30 @@ Unless otherwise noted, all the fixes since v1.7.10 in the maintenance
releases are contained in this release (see release notes to them for
details).

* The DWIM behaviour for "log --pretty=format:%gd -g" was somewhat
broken and gave undue precedence to configured log.date, causing
"git stash list" to show "stash@{time stamp string}".
(merge 55ccf85 jk/maint-reflog-walk-count-vs-time later to maint).

* Running "git checkout" on an unborn branch used to corrupt HEAD.
(merge 8338f77 ef/checkout-empty later to maint).

* When checking out another commit from an already detached state, we
used to report all commits that are not reachable from any of the
refs as lossage, but some of them might be reachable from the new
HEAD, and there is no need to warn about them.
(merge 5d88639 js/checkout-detach-count later to maint).

* Some time ago, "git clone" lost the progress output for its
"checkout" phase; when run without any "--quiet" option, it should
give progress to the lengthy operation.
(merge 8f63da1 ef/maint-clone-progress-fix later to maint).

* "git status --porcelain" ignored "--branch" option by mistake. The
output for "git status --branch -z" was also incorrect and did not
terminate the record for the current branch name with NUL as asked.
(merge d4a6bf1 jk/maint-status-porcelain-z-b later to maint).

* "git diff --stat" used to fully count a binary file with modified
execution bits whose contents is unmodified, which was not quite
right.
Expand All @@ -132,14 +148,3 @@ details).
NUL. The fix is not entirely correct when the output also asks for
--patch and/or --stat, though.
(merge fafd382 jk/maint-tformat-with-z later to maint).

* "git push" over smart-http lost progress output a few releases ago.
(merge e304aeb jk/maint-push-progress later to maint).

* A contrib script "rerere-train" did not work out of the box unless
user futzed with her $PATH.
(merge 53876fc jc/rerere-train later to maint).

* "log --graph" was not very friendly with "--stat" option and its
output had line breaks at wrong places.
(merge bafa16e lp/diffstat-with-graph later to maint).
14 changes: 9 additions & 5 deletions Documentation/git-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ a "true" or "false" string for bool), or '--path', which does some
path expansion (see '--path' below). If no type specifier is passed, no
checks or transformations are performed on the value.

The file-option can be one of '--system', '--global' or '--file'
which specify where the values will be read from or written to.
The default is to assume the config file of the current repository,
.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG
(see <<FILES>>).
When reading, the values are read from the system, global and
repository local configuration files by default, and options
'--system', '--global', '--local' and '--file <filename>' can be
used to tell the command to read from only that location (see <<FILES>>).

When writing, the new value is written to the repository local
configuration file by default, and options '--system', '--global',
'--file <filename>' can be used to tell the command to write to
that location (you can say '--local' but that is the default).

This command will fail (with exit code ret) if:

Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ order is reversed (e.g 'from \-> to' becomes 'to from'). Second, a NUL
and the terminating newline (but a space still separates the status
field from the first filename). Third, filenames containing special
characters are not specially formatted; no quoting or
backslash-escaping is performed. Fourth, there is no branch line.
backslash-escaping is performed.

CONFIGURATION
-------------
Expand Down
7 changes: 2 additions & 5 deletions Documentation/git-submodule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,15 @@ update::
checkout the commit specified in the index of the containing repository.
This will make the submodules HEAD be detached unless `--rebase` or
`--merge` is specified or the key `submodule.$name.update` is set to
`rebase`, `merge` or `none`.
`rebase`, `merge` or `none`. `none` can be overriden by specifying
`--checkout`.
+
If the submodule is not yet initialized, and you just want to use the
setting as stored in .gitmodules, you can automatically initialize the
submodule with the `--init` option.
+
If `--recursive` is specified, this command will recurse into the
registered submodules, and update any nested submodules within.
+
If the configuration key `submodule.$name.update` is set to `none` the
submodule with name `$name` will not be updated by default. This can be
overriden by adding `--checkout` to the command.

summary::
Show commit summary between the given commit (defaults to HEAD) and
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:

* link:v1.7.10.1/git.html[documentation for release 1.7.10.1]
* link:v1.7.10.2/git.html[documentation for release 1.7.10.2]

* release notes for
link:RelNotes/1.7.10.2.txt[1.7.10.2],
link:RelNotes/1.7.10.1.txt[1.7.10.1],
link:RelNotes/1.7.10.txt[1.7.10].

Expand Down
5 changes: 4 additions & 1 deletion Documentation/gitmodules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ submodule.<name>.update::
the commit specified in the superproject. If 'merge', the commit
specified in the superproject will be merged into the current branch
in the submodule.
If 'none', the submodule with name `$name` will not be updated
by default.

This config option is overridden if 'git submodule update' is given
the '--merge' or '--rebase' options.
the '--merge', '--rebase' or '--checkout' options.

submodule.<name>.fetchRecurseSubmodules::
This option can be used to control recursive fetching of this
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ all::
# Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
# programs as a tar, where bin/ and libexec/ might be on different file systems.
#
# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or
# copies to install built-in git commands e.g. git-cat-file.
#
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
# memory allocators with the nedmalloc allocator written by Niall Douglas.
#
Expand Down Expand Up @@ -1835,6 +1838,10 @@ ifdef ASCIIDOC7
export ASCIIDOC7
endif

ifdef NO_INSTALL_HARDLINKS
export NO_INSTALL_HARDLINKS
endif

### profile feedback build
#

Expand Down Expand Up @@ -2574,26 +2581,29 @@ endif
{ test "$$bindir/" = "$$execdir/" || \
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
done; \
} && \
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
$(RM) "$$bindir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
done && \
for p in $(BUILT_INS); do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
done && \
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
for p in $$remote_curl_aliases; do \
$(RM) "$$execdir/$$p" && \
test -z "$(NO_INSTALL_HARDLINKS)" && \
ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
Expand Down
Loading

0 comments on commit 423b5a1

Please sign in to comment.