Commit Graph

29480 Commits

Author SHA1 Message Date
Thomas Gummerer
b60e188c51 Strip namelen out of ce_flags into a ce_namelen field
Strip the name length from the ce_flags field and move it
into its own ce_namelen field in struct cache_entry. This
will both give us a tiny bit of a performance enhancement
when working with long pathnames and is a refactoring for
more readability of the code.

It enhances readability, by making it more clear what
is a flag, and where the length is stored and make it clear
which functions use stages in comparisions and which only
use the length.

It also makes CE_NAMEMASK private, so that users don't
mistakenly write the name length in the flags.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11 09:42:45 -07:00
Junio C Hamano
01388518c3 Merge branch 'tg/maint-cache-name-compare' into tg/ce-namelen-field
* tg/maint-cache-name-compare:
  cache_name_compare(): do not truncate while comparing paths
2012-07-11 09:40:25 -07:00
Junio C Hamano
d5f53338ab cache_name_compare(): do not truncate while comparing paths
We failed to use ce_namelen() equivalent and instead only compared
up to the CE_NAMEMASK bytes by mistake.  Adding an overlong path
that shares the same common prefix as an existing entry in the index
did not add a new entry, but instead replaced the existing one, as
the result.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11 09:25:56 -07:00
Junio C Hamano
299666cc5c Merge git://github.com/git-l10n/git-po
Translation updates for various languages.

* git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: translate 29 new messages
  l10n: de.po: translate 29 new messages
  Update Swedish translation (1095t0f0u)
  l10n: Update translation for Vietnamese
  l10n: Update git.pot (29 new messages)
2012-07-09 10:26:23 -07:00
Junio C Hamano
2a4dd9333b Fifth batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09 09:49:44 -07:00
Junio C Hamano
f697a27aa6 Merge branch 'cw/help-over-network'
"git help -w $cmd" can show HTML version of documentation for
"git-$cmd" by setting help.htmlpath to somewhere other than the
default location where the build procedure installs them locally;
the variable can even point at a http:// URL.

* cw/help-over-network:
  Allow help.htmlpath to be a URL prefix
  Add config variable to set HTML path for git-help --web
2012-07-09 09:02:19 -07:00
Junio C Hamano
69833baa04 Merge branch 'mz/empty-rebase-test'
We did not have test to make sure "git rebase" without extra options
filters out an empty commit in the original history.

* mz/empty-rebase-test:
  add test case for rebase of empty commit
2012-07-09 09:02:15 -07:00
Junio C Hamano
faae8854bf Merge branch 'pw/git-p4-tests'
More "git p4" tests.

* pw/git-p4-tests:
  git p4 test: fix badp4dir test
  git p4 test: split up big t9800 test
  git p4 test: cleanup_git should make a new $git
  git p4 test: copy source indeterminate
  git p4 test: check for error message in failed test
  git p4 test: rename some "git-p4 command" strings
  git p4 test: never create default test repo
  git p4 test: simplify quoting involving TRASH_DIRECTORY
  git p4 test: use real_path to resolve p4 client symlinks
  git p4 test: wait longer for p4d to start and test its pid
2012-07-09 09:02:11 -07:00
Junio C Hamano
f8a9eafb48 Merge branch 'js/fast-export-paths-with-spaces'
"git fast-export" produced an input stream for fast-import without
properly quoting pathnames when they contain SPs in them.

* js/fast-export-paths-with-spaces:
  fast-export: quote paths with spaces
2012-07-09 09:02:06 -07:00
Junio C Hamano
45c96c0c82 Merge branch 'cw/no-detaching-an-unborn'
"git checkout --detach", when you are still on an unborn branch,
should be forbidden, but it wasn't.

* cw/no-detaching-an-unborn:
  git-checkout: disallow --detach on unborn branch
2012-07-09 09:02:00 -07:00
Junio C Hamano
967abba716 Merge branch 'vr/use-our-perl-in-tests'
Some implementations of Perl terminates "lines" with CRLF even when
the script is operating on just a sequence of bytes.  Make sure to
use "$PERL_PATH", the version of Perl the user told Git to use, in
our tests to avoid unnecessary breakages in tests.

* vr/use-our-perl-in-tests:
  t/README: add a bit more Don'ts
  tests: enclose $PERL_PATH in double quotes
  t/test-lib.sh: export PERL_PATH for use in scripts
  t: Replace 'perl' by $PERL_PATH
2012-07-09 09:01:52 -07:00
Junio C Hamano
ee02c2ab37 Merge branch 'mm/credential-plumbing'
Expose the credential API to scripted Porcelain writers.

* mm/credential-plumbing:
  git-remote-mediawiki: update comments to reflect credential support
  git-remote-mediawiki: add credential support
  git credential fill: output the whole 'struct credential'
  add 'git credential' plumbing command
2012-07-09 09:01:45 -07:00
Junio C Hamano
3a335ee2da Merge branch 'jc/maint-blame-unique-abbrev'
"git blame" did not try to make sure the abbreviated commit object
names in its output are unique.

* jc/maint-blame-unique-abbrev:
  blame: compute abbreviation width that ensures uniqueness
2012-07-09 09:01:38 -07:00
Junio C Hamano
cd0c96a9e3 Merge branch 'jn/perl-makemaker-leading-paths'
* jn/perl-makemaker-leading-paths:
  perl/Makefile: Fix a missing double-quote
  perl/Makefile: move "mkdir -p" to module installation loop for maintainability
2012-07-09 09:00:53 -07:00
Junio C Hamano
c592023aed Merge branch 'rj/platform-pread-may-be-thread-unsafe'
On Cygwin, the platform pread(3) is not thread safe, just like our
own compat/ emulation, and cannot be used in the index-pack program.

* rj/platform-pread-may-be-thread-unsafe:
  index-pack: Disable threading on cygwin
2012-07-09 09:00:45 -07:00
Junio C Hamano
d02d7ac303 Merge branch 'mm/config-xdg'
Teach git to read various information from $XDG_CONFIG_HOME/git/ to allow
the user to avoid cluttering $HOME.

* mm/config-xdg:
  config: write to $XDG_CONFIG_HOME/git/config file when appropriate
  Let core.attributesfile default to $XDG_CONFIG_HOME/git/attributes
  Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignore
  config: read (but not write) from $XDG_CONFIG_HOME/git/config file
2012-07-09 09:00:36 -07:00
Matthieu Moy
2da7830d5c git-remote-mediawiki: update comments to reflect credential support
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-08 18:44:43 -07:00
Jiang Xin
6792b93b19 l10n: zh_CN.po: translate 29 new messages
Translate 29 new messages came from git.pot update in 11b9017
(l10n: Update git.pot (29 new messages))

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-07-06 09:11:15 +08:00
Ralf Thielow
b6bf84675d l10n: de.po: translate 29 new messages
Translate 29 new messages came from git.pot update
in 11b9017 (l10n: Update git.pot (29 new messages)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2012-07-05 19:46:50 +02:00
Junio C Hamano
8228a23b35 Fourth batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-04 23:48:37 -07:00
Junio C Hamano
57c054c5d0 Merge branch 'nd/clone-single-fix'
"git clone --single-branch" to clone a single branch did not limit
the cloning to the specified branch.

* nd/clone-single-fix:
  clone: fix ref selection in --single-branch --branch=xxx
2012-07-04 23:41:41 -07:00
Junio C Hamano
60ad08bfdf Merge branch 'th/diff-no-index-fixes'
"git diff --no-index" did not correctly handle relative paths and
did not give correct exit codes when run under "--quiet" option.

* th/diff-no-index-fixes:
  diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes
  diff: handle relative paths in no-index
2012-07-04 23:40:38 -07:00
Junio C Hamano
348c44e78e Merge branch 'hv/remote-end-hung-up'
When we get disconnected while expecting a response from the remote
side because authentication failed, we issued an error message "The
remote side hung up unexpectedly."

Give hint that it may be a permission problem in the message when we
can reasonably suspect it.

* hv/remote-end-hung-up:
  remove the impression of unexpectedness when access is denied
2012-07-04 23:40:12 -07:00
Peter Krefting
9aaa979a24 Update Swedish translation (1095t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2012-07-04 19:34:21 +01:00
Andreas Schwab
b12905140a Fix formatting in git-config(1)
This fixes two formatting bugs in the git-config documentation:

- in the column.ui entry don't indent the last paragraph so that it isn't
  formatted as a literal paragraph
- in the push.default entry separate the last paragraph from the
  nested list.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-03 12:13:19 -07:00
Tran Ngoc Quan
5714e41361 l10n: Update translation for Vietnamese
* Translated 29 news
 * Fix some minor errors in old translation

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2012-07-03 14:31:59 +07:00
Jiang Xin
11b901747b l10n: Update git.pot (29 new messages)
Generate po/git.pot from v1.7.11.1-107-g72601, and there are 29 new l10n
messages.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-07-03 10:31:59 +08:00
Junio C Hamano
726016725d Sync with i18n-po updates in maint
# By Peter Krefting
# Via Junio C Hamano (1) and Peter Krefting (1)
* maint:
  Update Swedish translation (1066t0f0u)
2012-07-02 15:37:54 -07:00
Junio C Hamano
3b942e9df7 Merge branch 'maint' of git://github.com/git-l10n/git-po into maint
Update Swedish translation (1066t0f0u)
2012-07-02 15:36:52 -07:00
Junio C Hamano
b31272f704 blame: compute abbreviation width that ensures uniqueness
Julia Lawall noticed that in linux-next repository the commit object
60d5c9f5 (shown with the default abbreviation width baked into "git
blame") in output from

  $ git blame -L 3675,3675 60d5c9f5b -- \
      drivers/staging/brcm80211/brcmfmac/wl_iw.c

is no longer unique in the repository, which results in "short SHA1
60d5c9f5 is ambiguous".

Compute the minimum abbreviation width that ensures uniqueness when
the user did not specify the --abbrev option to avoid this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-02 00:54:19 -07:00
Peter Krefting
16b183094e Update Swedish translation (1066t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2012-07-01 23:04:09 +01:00
Johannes Sixt
01a1a4bca6 perl/Makefile: Fix a missing double-quote
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-29 13:04:50 -07:00
Junio C Hamano
e7b44f182b Third batch for 1.7.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-28 15:35:37 -07:00
Junio C Hamano
e90020cdb3 Merge branch 'fc/git-prompt-script'
Split a rather heavy-ish "git completion" script out to create a
separate "git prompting" script, to help lazy-autoloading of the
completion part while making prompting part always available.
2012-06-28 15:21:00 -07:00
Junio C Hamano
a3fbb2350d Merge branch 'js/submodule-relative'
Teach "git submodule" deal with nested submodule structure where a
module is contained within a module whose origin is specified as a
relative URL to its superproject's origin.
2012-06-28 15:20:55 -07:00
Junio C Hamano
30e8e6fdea Merge branch 'lk/more-helpful-status-hints'
Give finer classification to various states of paths in conflicted
state and offer advice messages in the "git status" output.
2012-06-28 15:20:35 -07:00
Junio C Hamano
fbc9724188 Merge branch 'lk/rebase-i-x'
Teach "-x <cmd>" to "rebase -i" to insert "exec <cmd>" after each
commit in the resulting history.
2012-06-28 15:20:23 -07:00
Junio C Hamano
331512f988 Merge branch 'jc/rev-list-simplify-merges-first-parent'
When "--simplify-merges/by-decoration" is given together with
"--first-parent" to "git log", the combination of these options
makes the simplification logic to use in-core commit objects that
haven't been examined for relevance, either producing incorrect
result or taking too long to produce any output.  Teach the
simplification logic to ignore commits that the first-parent
traversal logic ignored when both are in effect to work around the
issue.
2012-06-28 15:20:16 -07:00
Junio C Hamano
72fd7d82d7 Merge branch 'hv/submodule-update-nuke-submodules'
"git add" allows adding a regular file to the path where a submodule
used to exist, but "git update-index" does not allow an equivalent
operation to Porcelain writers.
2012-06-28 15:20:08 -07:00
Junio C Hamano
653111f99c Merge branch 'nd/exclude-workaround-top-heavy'
Attempt to optimize matching with an exclude pattern with a deep
directory hierarchy by taking the part that specifies leading path
without wildcard literally.
2012-06-28 15:19:57 -07:00
Junio C Hamano
6f20ca3e09 Merge branch 'nd/stream-pack-objects'
"pack-objects" learned to read large loose blobs using the streaming API,
without the need to hold everything in core at once.
2012-06-28 15:19:51 -07:00
Junio C Hamano
40c9e698c8 Merge branch 'nd/stream-index-pack'
Use streaming API to read from the object store to avoid having to hold
a large blob object in-core while running index-pack.
2012-06-28 15:19:42 -07:00
Junio C Hamano
08080894b7 Merge branch 'mm/verify-filename-fix'
"git diff COPYING HEAD:COPYING" gave a nonsense error message that
claimed that the treeish HEAD did not have COPYING in it.
2012-06-28 15:19:32 -07:00
Junio C Hamano
defd7aa34c Merge branch 'jk/diff-no-index-pager'
"git diff --no-index" did not work with pagers correctly.
2012-06-28 15:19:11 -07:00
Chris Webb
86272b4ffe Allow help.htmlpath to be a URL prefix
Setting this to a URL prefix instead of a path to a local directory allows
git-help --web to work even when HTML docs aren't locally installed, by
pointing the browser at a copy accessible on the web. For example,

    [help]
      format = html
      htmlpath = http://git-scm.com/docs

will use the publicly available documentation on the git homepage.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-28 14:37:26 -07:00
Chris Webb
89a852efb9 Add config variable to set HTML path for git-help --web
If set in git-config, help.htmlpath overrides system_path(GIT_HTML_PATH)
which was compiled in. This allows users to repoint system-wide git at
their own copy of the documentation without recompiling.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-28 14:37:26 -07:00
Pete Wyckoff
a0327c0edc git p4 test: fix badp4dir test
The construct used to get the return code was flawed, in that
errors in the &&-chain before the semicolon were not caught.  Use
the standard test_expect_code instead.

Set PATH in a subshell instead of relying on the bashism of
setting it just for a single command.

And fix the grep line so it doesn't worry about grep segfaults,
and doesn't fail for i18n issues.

Reported-by: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27 21:06:35 -07:00
Pete Wyckoff
9b6513ac6f git p4 test: split up big t9800 test
The original t9800 test code has a mix of assorted topics, some
of which are big enough to deserve their own homes.
Interdependencies between the topics make it confusing when
trying to study one in isolation.  And it takes so long to run
that debugging an individual test is difficult.

Split out three big chunks of tests into their own files:

    t9812-git-p4-wildcards.sh gets the 8 p4 wildcard tests

    t9813-git-p4-preserve-users.sh gets the 4 --preserve-user tests

    t9814-git-p4-rename.sh gets the 2 copy and rename tests

Test 9800 execution time drops from 29 sec to 9 sec.  The
sequential time to run all tests is a slower due to the three
extra p4d startup/shutdown sequences, but the overall parallel
execution time is about the same, at 52 sec.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27 21:06:35 -07:00
Pete Wyckoff
23a2666c2e git p4 test: cleanup_git should make a new $git
For convenience, leave one in place at the end of each
test so that it is not necessary to build a new one.  This
makes it consistent with $cli.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27 21:06:35 -07:00
Pete Wyckoff
f69b3a93ca git p4 test: copy source indeterminate
Msysgit testing showed that the source file found by copy
detection is indeterminate when there are multiple sources
to choose from.  This appears to be valid.  Adjust the test
so that it passes if it finds any of the potential copy sources.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27 21:06:35 -07:00