1
0
mirror of https://github.com/git/git.git synced 2024-10-23 06:19:22 +02:00
Commit Graph

31491 Commits

Author SHA1 Message Date
Kevin Bracey
421a976945 Translate git_more_info_string consistently
"git help" translated the "See 'git help <command>' for more
information..." message, but "git" didn't.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-10 13:11:31 -07:00
Antoine Pelisse
ca70c9ea72 perf: update documentation of GIT_PERF_REPEAT_COUNT
Currently the documentation of GIT_PERF_REPEAT_COUNT says the default is
five while "perf-lib.sh" uses a value of three as a default.

Update the documentation so that it is consistent with the code.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-09 11:13:12 -08:00
Lukas Fleischer
a02ffe0e1a bundle: Add colons to list headings in "verify"
These slightly improve the reading flow by making it obvious that a list
follows.

Also, make the wording of both headings consistent by changing "contains
%d ref(s)" to "contains this ref"/"contains these %d refs".

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-08 10:06:53 -08:00
Lukas Fleischer
71ba6b10f8 bundle: Fix "verify" output if history is complete
A more informative message for "complete" bundles was added in commit
8c3710fd3011 (tweak "bundle verify" of a complete history, 2012-06-04).

However, the prerequisites ref list is currently read *after* we
check if it equals zero, which means we never actually use the
number of prerequisite refs to decide when to print the newly
introduced message.  The code incorrectly uses the number of
references recorded in the bundle instead.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-07 13:33:56 -08:00
Junio C Hamano
5d4ef1721a Merge branch 'mh/maint-ceil-absolute' into maint
* mh/maint-ceil-absolute:
  Provide a mechanism to turn off symlink resolution in ceiling paths
2013-03-07 12:49:57 -08:00
Fredrik Gustafsson
80659ff47b gitweb/README: remove reference to git.kernel.org
git.kernel.org no longer uses gitweb but has switched to cgit.

Info about this can be found on: https://www.kernel.org/pelican.html
or simply by looking at http://git.kernel.org . This is change since
2013-03-01.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-07 11:38:33 -08:00
Antoine Pelisse
b174eb42d0 tests: make sure rename pretty print works
Add basic use cases and corner cases tests for
"git diff -M --summary/stat".

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-06 13:58:56 -08:00
Junio C Hamano
e6363a4992 Git 1.8.1.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.8.1.5
2013-03-01 13:15:29 -08:00
Thomas Rast
8b1bd02415 Make !pattern in .gitattributes non-fatal
Before 82dce99 (attr: more matching optimizations from .gitignore,
2012-10-15), .gitattributes did not have any special treatment of a
leading '!'.  The docs, however, always said

  The rules how the pattern matches paths are the same as in
  `.gitignore` files; see linkgit:gitignore[5].

By those rules, leading '!' means pattern negation.  So 82dce99
correctly determined that this kind of line makes no sense and should
be disallowed.

However, users who actually had a rule for files starting with a '!'
are in a bad position: before 82dce99 '!' matched that literal
character, so it is conceivable that users have .gitattributes with
such lines in them.  After 82dce99 the unescaped version was
disallowed in such a way that git outright refuses to run(!) most
commands in the presence of such a .gitattributes.  It therefore
becomes very hard to fix, let alone work with, such repositories.

Let's at least allow the users to fix their repos: change the fatal
error into a warning.

Reported-by: mathstuf@gmail.com
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-01 12:24:45 -08:00
Junio C Hamano
1d38c6971d Merge branch 'wk/user-manual' into maint
* wk/user-manual:
  user-manual: Flesh out uncommitted changes and submodule updates
  user-manual: Use request-pull to generate "please pull" text
  user-manual: Reorganize the reroll sections, adding 'git rebase -i'
2013-03-01 10:37:40 -08:00
Andrew Wong
5e2485846d Documentation/githooks: Fix linkgit
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-01 10:19:22 -08:00
Karsten Blees
2092678cd5 name-hash.c: fix endless loop with core.ignorecase=true
With core.ignorecase=true, name-hash.c builds a case insensitive index of
all tracked directories. Currently, the existing cache entry structures are
added multiple times to the same hashtable (with different name lengths and
hash codes). However, there's only one dir_next pointer, which gets
completely messed up in case of hash collisions. In the worst case, this
causes an endless loop if ce == ce->dir_next (see t7062).

Use a separate hashtable and separate structures for the directory index
so that each directory entry has its own next pointer. Use reference
counting to track which directory entry contains files.

There are only slight changes to the name-hash.c API:
- new free_name_hash() used by read_cache.c::discard_index()
- remove_name_hash() takes an additional index_state parameter
- index_name_exists() for a directory (trailing '/') may return a cache
  entry that has been removed (CE_UNHASHED). This is not a problem as the
  return value is only used to check if the directory exists (dir.c) or to
  normalize casing of directory names (read-cache.c).

Getting rid of cache_entry.dir_next reduces memory consumption, especially
with core.ignorecase=false (which doesn't use that member at all).

With core.ignorecase=true, building the directory index is slightly faster
as we add / check the parent directory first (instead of going through all
directory levels for each file in the index). E.g. with WebKit (~200k
files, ~7k dirs), time spent in lazy_init_name_hash is reduced from 176ms
to 130ms.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-27 23:29:04 -08:00
Junio C Hamano
8d44277d91 Update draft release notes to 1.8.1.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-27 10:09:59 -08:00
Junio C Hamano
6f0c336663 Merge branch 'ef/non-ascii-parse-options-error-diag' into maint
* ef/non-ascii-parse-options-error-diag:
  parse-options: report uncorrupted multi-byte options
2013-02-27 10:04:26 -08:00
Junio C Hamano
28db11169b Merge branch 'wk/man-deny-current-branch-is-default-these-days' into maint
* wk/man-deny-current-branch-is-default-these-days:
  user-manual: typofix (ofthe->of the)
  user-manual: Update for receive.denyCurrentBranch=refuse
2013-02-27 10:01:21 -08:00
Junio C Hamano
c054ef9be2 Merge branch 'jn/less-reconfigure' into maint
* jn/less-reconfigure:
  Makefile: avoid infinite loop on configure.ac change
2013-02-27 09:59:19 -08:00
Brad King
31e54bb94a Documentation/submodule: Add --force to update synopsis
In commit 9db31bdf (submodule: Add --force option for git submodule
update, 2011-04-01) we added the option to the implementation's usage
synopsis but forgot to add it to the synopsis in the command
documentation.  Add the option to the synopsis in the same location it
is reported in usage and re-wrap the options to avoid long lines.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-27 07:31:01 -08:00
Thomas Rast
dd281f09b7 diff: prevent pprint_rename from underrunning input
The logic described in d020e27 (diff: Fix rename pretty-print when
suffix and prefix overlap, 2013-02-23) is wrong: The proof in the
comment is valid only if both strings are the same length.  *One* of
old/new can reach a-1 (b-1, resp.) if 'a' is a suffix of 'b' (or vice
versa).

Since the intent was to let the loop run down to the '/' at the end of
the common prefix, fix it by making that distinction explicit: if
there is no prefix, allow no underrun.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-26 13:01:34 -08:00
Tadeusz Andrzej Kadłubowski
21b6e4f24c Documentation: filter-branch env-filter example
filter-branch --env-filter example that shows how to change the email
address in all commits before publishing a project.

Signed-off-by: Tadeusz Andrzej Kadłubowski <yess@hell.org.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-26 09:34:51 -08:00
Tadeusz Andrzej Kadłubowski
bee3eb079d git-filter-branch.txt: clarify ident variables usage
There is a rare edge case of git-filter-branch: a filter that unsets
identity variables from the environment. Link to git-commit-tree
clarifies how Git would fall back in this situation.

Signed-off-by: Tadeusz Andrzej Kadłubowski <yess@hell.org.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-26 09:34:51 -08:00
David Michael
3b130ade45 git-compat-util.h: Provide missing netdb.h definitions
Some platforms may lack the NI_MAXHOST and NI_MAXSERV values in their
system headers, so ensure they are available.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25 12:16:08 -08:00
Junio C Hamano
7a0d8db36e Prepare for 1.8.1.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25 08:26:25 -08:00
Junio C Hamano
cd9c038ac9 Merge branch 'jc/mention-tracking-for-pull-default' into maint
* jc/mention-tracking-for-pull-default:
  doc: mention tracking for pull.default
2013-02-25 08:04:20 -08:00
Junio C Hamano
5cc5f09b7b Merge branch 'mm/config-intro-in-git-doc' into maint
* mm/config-intro-in-git-doc:
  git.txt: update description of the configuration mechanism
2013-02-25 08:04:18 -08:00
Junio C Hamano
92f561d7f0 Merge branch 'da/p4merge-mktemp-fix' into maint
* da/p4merge-mktemp-fix:
  p4merge: fix printf usage
2013-02-25 08:04:05 -08:00
Junio C Hamano
8552e2e590 Merge branch 'bw/get-tz-offset-perl' into maint
* bw/get-tz-offset-perl:
  cvsimport: format commit timestamp ourselves without using strftime
  perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases
  Move Git::SVN::get_tz to Git::get_tz_offset
2013-02-25 08:04:03 -08:00
Junio C Hamano
b79faa99e6 Merge branch 'al/mergetool-printf-fix' into maint
* al/mergetool-printf-fix:
  difftool--helper: fix printf usage
  git-mergetool: print filename when it contains %
2013-02-25 08:04:01 -08:00
Junio C Hamano
75288cc7e1 Merge branch 'jx/utf8-printf-width' into maint
* jx/utf8-printf-width:
  Add utf8_fprintf helper that returns correct number of columns
2013-02-25 08:03:59 -08:00
Junio C Hamano
d08d259095 Merge branch 'mg/bisect-doc' into maint
* mg/bisect-doc:
  git-bisect.txt: clarify that reset quits bisect
2013-02-25 08:03:57 -08:00
Junio C Hamano
7927f510f7 Merge branch 'sp/smart-http-content-type-check' into maint
* sp/smart-http-content-type-check:
  http_request: reset "type" strbuf before adding
  t5551: fix expected error output
  Verify Content-Type from smart HTTP servers
2013-02-25 08:03:54 -08:00
Junio C Hamano
d49f9f178b Merge branch 'jc/combine-diff-many-parents' into maint
* jc/combine-diff-many-parents:
  t4038: add tests for "diff --cc --raw <trees>"
  combine-diff: lift 32-way limit of combined diff
2013-02-25 08:03:51 -08:00
Junio C Hamano
66d12f97d0 Merge branch 'jk/apply-similaritly-parsing' into maint
* jk/apply-similaritly-parsing:
  builtin/apply: tighten (dis)similarity index parsing
2013-02-25 08:03:44 -08:00
Junio C Hamano
7be093133c Merge branch 'jk/remote-helpers-doc' into maint
* jk/remote-helpers-doc:
  Rename {git- => git}remote-helpers.txt
2013-02-25 08:03:37 -08:00
Junio C Hamano
aaf4f28d90 Merge branch 'ab/gitweb-use-same-scheme' into maint
* ab/gitweb-use-same-scheme:
  gitweb: refer to picon/gravatar images over the same scheme
2013-02-25 08:03:34 -08:00
Junio C Hamano
c0e96dd2ca Merge branch 'zk/clean-report-failure' into maint
* zk/clean-report-failure:
  git-clean: Display more accurate delete messages
2013-02-25 08:03:32 -08:00
Junio C Hamano
0e0c3f25d0 Merge branch 'nd/clone-no-separate-git-dir-with-bare' into maint
* nd/clone-no-separate-git-dir-with-bare:
  clone: forbid --bare --separate-git-dir <dir>
2013-02-25 08:03:27 -08:00
Junio C Hamano
a8e00d7b83 Merge branch 'da/p4merge-mktemp' into maint
* da/p4merge-mktemp:
  mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholder
2013-02-25 08:03:20 -08:00
Greg Price
4f021b34f2 Documentation: "advice" is uncountable
"Advice" is a mass noun, not a count noun; it's not ordinarily
pluralized.

Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25 07:31:28 -08:00
Greg Price
52291497d1 describe: Document --match pattern format
It's not clear in git-describe(1) what kind of "pattern" should be
passed to --match.  Fix that.

Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 22:24:48 -08:00
W. Trevor King
0414acc365 Documentation/githooks: Explain pre-rebase parameters
Descriptions borrowed from templates/hooks--pre-rebase.sample.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-24 00:13:11 -08:00
Antoine Pelisse
d020e27fda diff: Fix rename pretty-print when suffix and prefix overlap
When considering a rename for two files that have a suffix and a prefix
that can overlap, a confusing line is shown. As an example, renaming
"a/b/b/c" to "a/b/c" shows "a/b/{ => }/b/c".

Currently, what we do is calculate the common prefix ("a/b/"), and the
common suffix ("/b/c"), but the same "/b/" is actually counted both in
prefix and suffix. Then when calculating the size of the non-common part,
we end-up with a negative value which is reset to 0, thus the "{ => }".

Do not allow the common suffix to overlap the common prefix and stop
when reaching a "/" that would be in both.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-23 23:52:39 -08:00
Antoine Pelisse
b04d930bbc update-index: allow "-h" to also display options
Even though "git update-index" was updated to use parse-options
infrastracture some time ago to make it possible to show list of
options with usage_with_options(), "git update-index -h" only shows
the usage.  Detect this case and call usage_with_options() to show
the list of options as well.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-23 23:49:33 -08:00
Nguyễn Thái Ngọc Duy
647d87947f update-index: list supported idx versions and their features
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-23 13:18:27 -08:00
Junio C Hamano
3d0e75f2f7 diff-options: unconfuse description of --color
It said "by default it is off" while it also said "the default is
always", which confused everybody who read it only once.  It wanted
to say (1) if you do not say --color, it is not enabled, and (2) if
you say --color but do not say when to enable it, it will always be
enabled".

Rephrase to clarify by using "default" only once.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-22 22:24:10 -08:00
Joshua Clayton
712c6adaee Git.pm: fix cat_blob crashes on large files
Read and write each 1024 byte buffer, rather than trying to buffer
the entire content of the file.  We are only copying the contents to
a file descriptor and do not use it ourselves.

Previous code would crash on all files > 2 Gib, when the offset
variable became negative (perhaps below the level of perl),
resulting in a crash.  On a 32 bit system, or a system with low
memory it might crash before reaching 2 GiB due to memory
exhaustion.

This code may leave a partial file behind in case of failure, where
the old code would leave a completely empty file.  Neither version
verifies the correctness of the content.  Calling code must take
care of verification and cleanup.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-22 13:18:22 -08:00
Nguyễn Thái Ngọc Duy
b82a7b5bbc read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
9d22778 (read-cache.c: write prefix-compressed names in the index -
2012-04-04) defined these. Interestingly, they were not used by
read-cache.c, or anywhere in that patch. They were used in
builtin/update-index.c later for checking supported index
versions. Use them here too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-22 12:48:41 -08:00
Nguyễn Thái Ngọc Duy
300e39f6aa index-format.txt: mention of v4 is missing in some places
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-22 12:47:14 -08:00
Michael Haggerty
7ec30aaa5b Provide a mechanism to turn off symlink resolution in ceiling paths
Commit 1b77d83cab 'setup_git_directory_gently_1(): resolve symlinks
in ceiling paths' changed the setup code to resolve symlinks in the
entries in GIT_CEILING_DIRECTORIES.  Because those entries are
compared textually to the symlink-resolved current directory, an
entry in GIT_CEILING_DIRECTORIES that contained a symlink would have
no effect.  It was known that this could cause performance problems
if the symlink resolution *itself* touched slow filesystems, but it
was thought that such use cases would be unlikely.  The intention of
the earlier change was to deal with a case when the user has this:

	GIT_CEILING_DIRECTORIES=/home/gitster

but in reality, /home/gitster is a symbolic link to somewhere else,
e.g. /net/machine/home4/gitster. A textual comparison between the
specified value /home/gitster and the location getcwd(3) returns
would not help us, but readlink("/home/gitster") would still be
fast.

After this change was released, Anders Kaseorg <andersk@mit.edu>
reported:

> [...] my computer has been acting so slow when I’m not connected to
> the network.  I put various network filesystem paths in
> $GIT_CEILING_DIRECTORIES, such as
> /afs/athena.mit.edu/user/a/n/andersk (to avoid hitting its parents
> /afs/athena.mit.edu, /afs/athena.mit.edu/user/a, and
> /afs/athena.mit.edu/user/a/n which all live in different AFS
> volumes).  Now when I’m not connected to the network, every
> invocation of Git, including the __git_ps1 in my shell prompt, waits
> for AFS to timeout.

To allow users to work around this problem, give them a mechanism to
turn off symlink resolution in GIT_CEILING_DIRECTORIES entries.  All
the entries that follow an empty entry will not be checked for symbolic
links and used literally in comparison.  E.g. with these:

	GIT_CEILING_DIRECTORIES=:/foo/bar:/xyzzy or
	GIT_CEILING_DIRECTORIES=/foo/bar::/xyzzy

we will not readlink("/xyzzy") because it comes after an empty entry.

With the former (but not with the latter), "/foo/bar" comes after an
empty entry, and we will not readlink it, either.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-22 11:37:34 -08:00
Jeff King
7f1b697632 Makefile: avoid infinite loop on configure.ac change
If you are using autoconf and change the configure.ac, the
Makefile will notice that config.status is older than
configure.ac, and will attempt to rebuild and re-run the
configure script to pick up your changes. The first step in
doing so is to run "make configure". Unfortunately, this
tries to include config.mak.autogen, which depends on
config.status, which depends on configure.ac; so we must
rebuild config.status. Which leads to us running "make
configure", and so on.

It's easy to demonstrate with:

  make configure
  ./configure
  touch configure.ac
  make

We can break this cycle by not re-invoking make to build
"configure", and instead just putting its rules inline into
our config.status rebuild procedure.  We can avoid a copy by
factoring the rules into a make variable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-20 23:56:05 -08:00
Junio C Hamano
698a1ec4d5 imap-send: support Server Name Indication (RFC4366)
To talk with some sites that serve multiple names on a single IP
address, the client needs to ask for the specific host that it wants
to talk to.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-20 22:01:50 -08:00