git
10 years agoMerge branch 'fc/master' into travis-ci felipec/travis-ci
Felipe Contreras [Fri, 11 Apr 2014 18:16:43 +0000 (13:16 -0500)] 
Merge branch 'fc/master' into travis-ci

* fc/master:
  config: fix documentation merge issue
  push: remove unnecessary cleanup
  config: add branch.<name>.push doc
  Synch with upstream
  branch: cleanups from upstream
  t5516 (fetch-push): add publish branch tests
  t5516 (fetch-push): fix test restoration
  push: always use publish branch
  remote: fix branch push_name setup

10 years agoconfig: fix documentation merge issue
Felipe Contreras [Fri, 11 Apr 2014 17:31:26 +0000 (12:31 -0500)] 
config: fix documentation merge issue

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopush: remove unnecessary cleanup
Felipe Contreras [Fri, 11 Apr 2014 17:28:27 +0000 (12:28 -0500)] 
push: remove unnecessary cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoconfig: add branch.<name>.push doc
Felipe Contreras [Fri, 11 Apr 2014 17:27:52 +0000 (12:27 -0500)] 
config: add branch.<name>.push doc

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoSynch with upstream
Felipe Contreras [Fri, 11 Apr 2014 17:16:20 +0000 (12:16 -0500)] 
Synch with upstream

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agobranch: cleanups from upstream
Felipe Contreras [Fri, 11 Apr 2014 17:14:49 +0000 (12:14 -0500)] 
branch: cleanups from upstream

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agot5516 (fetch-push): add publish branch tests
Felipe Contreras [Fri, 11 Apr 2014 15:32:39 +0000 (10:32 -0500)] 
t5516 (fetch-push): add publish branch tests

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agot5516 (fetch-push): fix test restoration
Felipe Contreras [Fri, 11 Apr 2014 15:31:47 +0000 (10:31 -0500)] 
t5516 (fetch-push): fix test restoration

We shouldn't modify the commits; it screws the following tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopush: always use publish branch
Felipe Contreras [Fri, 11 Apr 2014 14:28:33 +0000 (09:28 -0500)] 
push: always use publish branch

Regardless of push.default, and remote.push.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoremote: fix branch push_name setup
Felipe Contreras [Fri, 11 Apr 2014 14:27:44 +0000 (09:27 -0500)] 
remote: fix branch push_name setup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agotravis: add a test for everything
Felipe Contreras [Thu, 10 Apr 2014 12:55:12 +0000 (07:55 -0500)] 
travis: add a test for everything

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoMerge tag 'v1.9.1+fc3' into travis
Felipe Contreras [Thu, 10 Apr 2014 12:54:29 +0000 (07:54 -0500)] 
Merge tag 'v1.9.1+fc3' into travis

Git 1.9.1+fc3

* tag 'v1.9.1+fc3':
  Git v1.9.1+fc3
  t: fix remote-helpers bzr test

10 years agoGit v1.9.1+fc3 v1.9.1+fc3
Felipe Contreras [Thu, 10 Apr 2014 12:09:58 +0000 (07:09 -0500)] 
Git v1.9.1+fc3

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agot: fix remote-helpers bzr test
Felipe Contreras [Thu, 10 Apr 2014 01:05:09 +0000 (20:05 -0500)] 
t: fix remote-helpers bzr test

So that the committer is reset properly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoMerge tag 'v1.9.1+fc2' into travis
Felipe Contreras [Wed, 9 Apr 2014 22:56:59 +0000 (17:56 -0500)] 
Merge tag 'v1.9.1+fc2' into travis

Git 1.9.1+fc2

* tag 'v1.9.1+fc2':
  Git v1.9.1+fc2
  remote-hg: fix parsing of custom committer
  remote-bzr: include authors field in pushed commits

10 years agoGit v1.9.1+fc2 v1.9.1+fc2
Felipe Contreras [Wed, 9 Apr 2014 22:54:49 +0000 (17:54 -0500)] 
Git v1.9.1+fc2

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoremote-hg: fix parsing of custom committer
Felipe Contreras [Wed, 9 Apr 2014 15:41:10 +0000 (10:41 -0500)] 
remote-hg: fix parsing of custom committer

Other tools use the 'committer' extra field differently, so let's make
the parsing more reliable and don't assume it's in a certain format.

Reported-by: Kevin Cox <kevincox@kevincox.ca>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoremote-bzr: include authors field in pushed commits
dequis [Fri, 28 Feb 2014 04:25:35 +0000 (01:25 -0300)] 
remote-bzr: include authors field in pushed commits

Tests-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agotravis: fix versions
Felipe Contreras [Tue, 8 Apr 2014 23:51:54 +0000 (18:51 -0500)] 
travis: fix versions

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoAdd travis-ci configuration
Felipe Contreras [Mon, 28 Oct 2013 07:25:02 +0000 (01:25 -0600)] 
Add travis-ci configuration

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoMerge tag 'v1.9.1' into fc/master v1.9.1+fc1
Felipe Contreras [Tue, 8 Apr 2014 23:21:29 +0000 (18:21 -0500)] 
Merge tag 'v1.9.1' into fc/master

Git 1.9.1

* tag 'v1.9.1': (41 commits)
  Git 1.9.1
  clean: simplify dir/not-dir logic
  clean: respect pathspecs with "-d"
  show_ident_date: fix tz range check
  t7800: add a difftool test for .git-files
  i18n: proposed command missing leading dash
  diff: do not quit early on stat-dirty files
  diff.c: move diffcore_skip_stat_unmatch core logic out for reuse later
  clean: use cache_name_is_other()
  clean: replace match_pathspec() with dir_path_match()
  pathspec: pass directory indicator to match_pathspec_item()
  match_pathspec: match pathspec "foo/" against directory "foo"
  dir.c: prepare match_pathspec_item for taking more flags
  pathspec: rename match_pathspec_depth() to match_pathspec()
  pathspec: convert some match_pathspec_depth() to dir_path_match()
  pathspec: convert some match_pathspec_depth() to ce_path_match()
  merge-recursive.c: tolerate missing files while refreshing index
  read-cache.c: extend make_cache_entry refresh flag with options
  read-cache.c: refactor --ignore-missing implementation
  t3030-merge-recursive: test known breakage with empty work tree
  ...

Conflicts:
GIT-VERSION-GEN
remote.c

10 years agoMerge tag 'v1.9.0' into fc/master v1.9.0+fc1
Felipe Contreras [Tue, 8 Apr 2014 22:24:16 +0000 (17:24 -0500)] 
Merge tag 'v1.9.0' into fc/master

Git 1.9.0

* tag 'v1.9.0': (326 commits)
  Git 1.9.0
  release notes: typo fixes
  l10n: de.po: correct message when hiding commits by craft
  l10n: de.po: translate 28 new messages
  Git 1.9.0-rc3
  l10n: zh_CN.po: Disambiguation for rebase
  Documentation: fix typos in man pages
  howto/maintain-git.txt: new version numbering scheme
  repack.c: rename and unlink pack file if it exists
  userdiff: update Ada patterns
  git-tag.txt: <commit> for --contains is optional
  l10n: zh_CN.po: translate 1 new message (2211t0f0u)
  l10n: vi.po (2211t): Updated one new string
  l10n: Update Swedish translation (2211t0f0u)
  l10n: fr: 1.9rc2 2211t
  l10n: git.pot: v1.9 round 2 (1 new)
  Git 1.9-rc2
  pager test: make fake pager consume all its input
  l10n: Bulgarian translation of git (222t21f1967u)
  po/TEAMS: Added Bulgarian team
  ...

Conflicts:
Documentation/git-fetch.txt
Documentation/gitremote-helpers.txt
GIT-VERSION-GEN
builtin/remote.c
builtin/shortlog.c
config.c
git.c
t/remote-helpers/bzr.t
t/remote-helpers/hg.t

10 years agoMerge tag 'v1.8.5.5' into fc/master v1.8.5.5+fc1
Felipe Contreras [Tue, 8 Apr 2014 21:59:38 +0000 (16:59 -0500)] 
Merge tag 'v1.8.5.5' into fc/master

Git 1.8.5.5

* tag 'v1.8.5.5':
  Git 1.8.5.5
  tree_entry_interesting: match against all pathspecs
  repack: propagate pack-objects options as strings
  repack: make parsed string options const-correct
  repack: fix typo in max-pack-size option
  send-email: /etc/ssl/certs/ directory may not be usable as ca_path
  revision: propagate flag bits from tags to pointees
  revision: mark contents of an uninteresting tree uninteresting
  interpret_branch_name: find all possible @-marks
  interpret_branch_name: avoid @{upstream} past colon
  interpret_branch_name: always respect "namelen" parameter
  interpret_branch_name: rename "cp" variable to "at"
  interpret_branch_name: factor out upstream handling
  fetch-pack: do not filter out one-level refs
  merge-base --octopus: reduce the result from get_octopus_merge_bases()
  merge-base: separate "--independent" codepath into its own helper

Conflicts:
GIT-VERSION-GEN
sha1_name.c

10 years agoMerge tag 'v1.8.5.4' into fc/master v1.8.5.4+fc1
Felipe Contreras [Tue, 8 Apr 2014 21:58:00 +0000 (16:58 -0500)] 
Merge tag 'v1.8.5.4' into fc/master

Git 1.8.5.4

* tag 'v1.8.5.4': (24 commits)
  Git 1.8.5.4
  git-svn: workaround for a bug in svn serf backend
  Documentation: "git pull" does not have the "-m" option
  Documentation: exclude irrelevant options from "git pull"
  stash: handle specifying stashes with $IFS
  Remove the line length limit for graft files
  add: don't complain when adding empty project root
  log: properly handle decorations with chained tags
  get_max_fd_limit(): fall back to OPEN_MAX upon getrlimit/sysconf failure
  git_connect(): use common return point
  connect.c: refactor url parsing
  git_connect(): refactor the port handling for ssh
  git fetch: support host:/~repo
  t5500: add test cases for diag-url
  git fetch-pack: add --diag-url
  git_connect: factor out discovery of the protocol and its parts
  git_connect: remove artificial limit of a remote command
  clone,fetch: catch non positive --depth option value
  commit -v: strip diffs and submodule shortlogs from the commit message
  t5601: add tests for ssh
  ...

Conflicts:
GIT-VERSION-GEN

10 years agoMerge tag 'v1.8.5.3' into fc/master v1.8.5.3+fc1
Felipe Contreras [Tue, 8 Apr 2014 21:57:23 +0000 (16:57 -0500)] 
Merge tag 'v1.8.5.3' into fc/master

Git 1.8.5.3

* tag 'v1.8.5.3':
  Git 1.8.5.3
  pack-heuristics.txt: mark up the file header properly
  mv: let 'git mv file no-such-dir/' error out on Windows, too
  Documentation/gitmodules: Only 'update' and 'url' are required
  l10n: de.po: fix translation of 'prefix'
  gc: notice gc processes run by other users
  Revert "prompt: clean up strbuf usage"
  for-each-ref: remove unused variable
  daemon: be strict at parsing parameters --[no-]informative-errors
  cat-file: handle --batch format with missing type/size
  cat-file: pass expand_data to print_object_or_die
  rev-parse: be more careful with munging arguments
  rev-parse: correctly diagnose revision errors before "--"
  mv: let 'git mv file no-such-dir/' error out

Conflicts:
GIT-VERSION-GEN

10 years agoMerge tag 'v1.8.5.2' into fc/master v1.8.5.2+fc1
Felipe Contreras [Tue, 8 Apr 2014 21:54:50 +0000 (16:54 -0500)] 
Merge tag 'v1.8.5.2' into fc/master

Git 1.8.5.2

* tag 'v1.8.5.2': (21 commits)
  Git 1.8.5.2
  cmd_repack(): remove redundant local variable "nr_packs"
  Documentation: revamp git-cherry(1)
  SubmittingPatches: document how to handle multiple patches
  glossary-content.txt: fix documentation of "**" patterns
  Documentation/gitcli.txt: fix double quotes
  diff: restrict pathspec limitations to diff b/f case only
  Documentation/rev-list-options.txt: fix some grammatical issues and typos
  Documentation/rev-list-options.txt: fix mark-up
  State correct usage of literal examples in man pages in the coding standards
  Documentation/git-log.txt: mark-up fix and minor rephasing
  Documentation/git-log: update "--log-size" description
  contrib: typofixes
  Documentation/technical/http-protocol.txt: typofixes
  typofixes: fix misspelt comments
  git-fetch-pack uses URLs like git-fetch
  sha1_loose_object_info(): do not return success on missing object
  t1005: add test for "read-tree --reset -u A B"
  t1005: reindent
  unpack-trees: fix "read-tree -u --reset A B" with conflicted index
  ...

Conflicts:
GIT-VERSION-GEN

10 years agoremote-bzr: add support for older versions
Felipe Contreras [Tue, 8 Apr 2014 18:35:49 +0000 (13:35 -0500)] 
remote-bzr: add support for older versions

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoremote-helpers: remove version test script
Felipe Contreras [Tue, 8 Apr 2014 18:32:10 +0000 (13:32 -0500)] 
remote-helpers: remove version test script

Testing mostly done by Travis CI.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoremote-helpers: update version test scrtip
Felipe Contreras [Tue, 8 Apr 2014 18:29:55 +0000 (13:29 -0500)] 
remote-helpers: update version test scrtip

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoremote-hg: always normalize paths
Felipe Contreras [Tue, 8 Apr 2014 15:46:46 +0000 (10:46 -0500)] 
remote-hg: always normalize paths

Apparently Mercurial can have paths such as 'foo//bar', so normalize all
paths.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoGit 1.9.1 v1.9.1
Junio C Hamano [Tue, 18 Mar 2014 21:06:49 +0000 (14:06 -0700)] 
Git 1.9.1

The version numbering scheme has changed since Git 1.9 and we
dropped the third dewey-decimal from the traditional numbering
(e.g. both 1.8.4 and 1.8.5 were major feature releases).  This
release 1.9.1 is the first maintenance relase for Git 1.9.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'jk/clean-d-pathspec' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:04:59 +0000 (14:04 -0700)] 
Merge branch 'jk/clean-d-pathspec' into maint

"git clean -d pathspec" did not use the given pathspec correctly
and ended up cleaning too much.

* jk/clean-d-pathspec:
  clean: simplify dir/not-dir logic
  clean: respect pathspecs with "-d"

10 years agoMerge branch 'da/difftool-git-files' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:04:36 +0000 (14:04 -0700)] 
Merge branch 'da/difftool-git-files' into maint

"git difftool" misbehaved when the repository is bound to the
working tree with the ".git file" mechanism, where a textual file
".git" tells us where it is.

* da/difftool-git-files:
  t7800: add a difftool test for .git-files
  difftool: support repositories with .git-files

10 years agoMerge branch 'jk/remote-pushremote-config-reading' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:04:16 +0000 (14:04 -0700)] 
Merge branch 'jk/remote-pushremote-config-reading' into maint

"git push" did not pay attention to branch.*.pushremote if it is
defined earlier than remote.pushdefault; the order of these two
variables in the configuration file should not matter, but it did by
mistake.

* jk/remote-pushremote-config-reading:
  remote: handle pushremote config in any order

10 years agoMerge branch 'jk/commit-dates-parsing-fix' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:04:01 +0000 (14:04 -0700)] 
Merge branch 'jk/commit-dates-parsing-fix' into maint

Codepaths that parse timestamps in commit objects have been
tightened.

* jk/commit-dates-parsing-fix:
  show_ident_date: fix tz range check
  log: do not segfault on gmtime errors
  log: handle integer overflow in timestamps
  date: check date overflow against time_t
  fsck: report integer overflow in author timestamps
  t4212: test bogus timestamps with git-log

10 years agoMerge branch 'tr/diff-submodule-no-reuse-worktree' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:03:41 +0000 (14:03 -0700)] 
Merge branch 'tr/diff-submodule-no-reuse-worktree' into maint

"git diff --external-diff" incorrectly fed the submodule directory
in the working tree to the external diff driver when it knew it is
the same as one of the versions being compared.

* tr/diff-submodule-no-reuse-worktree:
  diff: do not reuse_worktree_file for submodules

10 years agoMerge branch 'nd/reset-setup-worktree' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:03:24 +0000 (14:03 -0700)] 
Merge branch 'nd/reset-setup-worktree' into maint

"git reset" needs to refresh the index when working in a working
tree (it can also be used to match the index to the HEAD in an
otherwise bare repository), but it failed to set up the working
tree properly, causing GIT_WORK_TREE to be ignored.

* nd/reset-setup-worktree:
  reset: optionally setup worktree and refresh index on --mixed

10 years agoMerge branch 'jc/check-attr-honor-working-tree' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:03:03 +0000 (14:03 -0700)] 
Merge branch 'jc/check-attr-honor-working-tree' into maint

"git check-attr" when working on a repository with a working tree
did not work well when the working tree was specified via the
--work-tree (and obviously with --git-dir) option.

* jc/check-attr-honor-working-tree:
  check-attr: move to the top of working tree when in non-bare repository
  t0003: do not chdir the whole test process

10 years agoMerge branch 'bk/refresh-missing-ok-in-merge-recursive' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:02:37 +0000 (14:02 -0700)] 
Merge branch 'bk/refresh-missing-ok-in-merge-recursive' into maint

"merge-recursive" was broken in 1.7.7 era and stopped working in an
empty (temporary) working tree, when there are renames involved.
This has been corrected.

* bk/refresh-missing-ok-in-merge-recursive:
  merge-recursive.c: tolerate missing files while refreshing index
  read-cache.c: extend make_cache_entry refresh flag with options
  read-cache.c: refactor --ignore-missing implementation
  t3030-merge-recursive: test known breakage with empty work tree

10 years agoMerge branch 'ds/rev-parse-required-args' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:01:05 +0000 (14:01 -0700)] 
Merge branch 'ds/rev-parse-required-args' into maint

"git rev-parse" was loose in rejecting command line arguments that
do not make sense, e.g. "--default" without the required value for
that option.

* ds/rev-parse-required-args:
  rev-parse: check i before using argv[i] against argc

10 years agoMerge branch 'jk/config-path-include-fix' into maint
Junio C Hamano [Tue, 18 Mar 2014 21:00:15 +0000 (14:00 -0700)] 
Merge branch 'jk/config-path-include-fix' into maint

include.path variable (or any variable that expects a path that can
use ~username expansion) in the configuration file is not a boolean,
but the code failed to check it.

* jk/config-path-include-fix:
  handle_path_include: don't look at NULL value
  expand_user_path: do not look at NULL path

10 years agoMerge branch 'nd/diff-quiet-stat-dirty' into maint
Junio C Hamano [Tue, 18 Mar 2014 20:59:55 +0000 (13:59 -0700)] 
Merge branch 'nd/diff-quiet-stat-dirty' into maint

"git diff --quiet -- pathspec1 pathspec2" sometimes did not return
correct status value.

* nd/diff-quiet-stat-dirty:
  diff: do not quit early on stat-dirty files
  diff.c: move diffcore_skip_stat_unmatch core logic out for reuse later

10 years agoMerge branch 'nd/http-fetch-shallow-fix' into maint
Junio C Hamano [Tue, 18 Mar 2014 20:59:37 +0000 (13:59 -0700)] 
Merge branch 'nd/http-fetch-shallow-fix' into maint

Attempting to deepen a shallow repository by fetching over smart
HTTP transport failed in the protocol exchange, when no-done
extension was used.  The fetching side waited for the list of
shallow boundary commits after the sending end stopped talking to
it.

* nd/http-fetch-shallow-fix:
  t5537: move http tests out to t5539
  fetch-pack: fix deepen shallow over smart http with no-done cap
  protocol-capabilities.txt: document no-done
  protocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txt
  pack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'
  test: rename http fetch and push test files
  tests: auto-set LIB_HTTPD_PORT from test name

10 years agoMerge branch 'nd/submodule-pathspec-ending-with-slash' into maint
Junio C Hamano [Tue, 18 Mar 2014 20:58:58 +0000 (13:58 -0700)] 
Merge branch 'nd/submodule-pathspec-ending-with-slash' into maint

Allow "git cmd path/", when the 'path' is where a submodule is
bound to the top-level working tree, to match 'path', despite the
extra and unnecessary trailing slash (such a slash is often
given by command line completion).

* nd/submodule-pathspec-ending-with-slash:
  clean: use cache_name_is_other()
  clean: replace match_pathspec() with dir_path_match()
  pathspec: pass directory indicator to match_pathspec_item()
  match_pathspec: match pathspec "foo/" against directory "foo"
  dir.c: prepare match_pathspec_item for taking more flags
  pathspec: rename match_pathspec_depth() to match_pathspec()
  pathspec: convert some match_pathspec_depth() to dir_path_match()
  pathspec: convert some match_pathspec_depth() to ce_path_match()

10 years agoclean: simplify dir/not-dir logic
Jeff King [Mon, 10 Mar 2014 17:24:47 +0000 (13:24 -0400)] 
clean: simplify dir/not-dir logic

When we get a list of paths from read_directory, we further
prune it to create the final list of items to remove. The
code paths for directories and non-directories repeat the
same "add to list" code.

This patch restructures the code so that we don't repeat
ourselves. Also, by following a "if (condition) continue"
pattern like the pathspec check above, it makes it more
obvious that the conditional is about excluding directories
under certain circumstances.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoclean: respect pathspecs with "-d"
Jeff King [Mon, 10 Mar 2014 20:37:30 +0000 (16:37 -0400)] 
clean: respect pathspecs with "-d"

git-clean uses read_directory to fill in a `struct dir` with
potential hits. However, read_directory does not actually
check against our pathspec. It uses a simplified version
that may turn up false positives. As a result, we need to
check that any hits match our pathspec. We do so reliably
for non-directories. For directories, if "-d" is not given
we check that the pathspec matched exactly (i.e., we are
even stricter, and require an explicit "git clean foo" to
clean "foo/"). But if "-d" is given, rather than relaxing
the exact match to allow a recursive match, we do not check
the pathspec at all.

This regression was introduced in 113f10f (Make git-clean a
builtin, 2007-11-11).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoshow_ident_date: fix tz range check
Jeff King [Fri, 7 Mar 2014 17:15:01 +0000 (12:15 -0500)] 
show_ident_date: fix tz range check

Commit 1dca155fe3fa (log: handle integer overflow in
timestamps, 2014-02-24) tried to catch integer overflow
coming from strtol() on the timezone field by comparing against
LONG_MIN/LONG_MAX. However, the intermediate "tz" variable
is an "int", which means it can never be LONG_MAX on LP64
systems; we would truncate the output from strtol before the
comparison.

Clang's -Wtautological-constant-out-of-range-compare notices
this and rightly complains.

Let's instead store the result of strtol in a long, and then
compare it against INT_MIN/INT_MAX. This will catch overflow
from strtol, and also overflow when we pass the result as an
int to show_date.

Reported-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot7800: add a difftool test for .git-files
Junio C Hamano [Wed, 5 Mar 2014 09:23:35 +0000 (01:23 -0800)] 
t7800: add a difftool test for .git-files

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoi18n: proposed command missing leading dash
Sandy Carter [Mon, 3 Mar 2014 14:55:53 +0000 (09:55 -0500)] 
i18n: proposed command missing leading dash

Add missing leading dash to proposed commands in french output when
using the command:
    git branch --set-upstream remotename/branchname
and when upstream is gone

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiff: do not quit early on stat-dirty files
Nguyễn Thái Ngọc Duy [Sat, 25 Jan 2014 06:46:50 +0000 (13:46 +0700)] 
diff: do not quit early on stat-dirty files

When QUICK is set (i.e. with --quiet) we try to do as little work as
possible, stopping after seeing the first change. stat-dirty is
considered a "change" but it may turn out not, if no actual content is
changed. The actual content test is performed too late in the process
and the shortcut may be taken prematurely, leading to incorrect return
code.

Assume we do "git diff --quiet". If we have a stat-dirty file "a" and
a really dirty file "b". We break the loop in run_diff_files() and
stop after "a" because we have got a "change". Later in
diffcore_skip_stat_unmatch() we find out "a" is actually not
changed. But there's nothing else in the diff queue, we incorrectly
declare "no change", ignoring the fact that "b" is changed.

This also happens to "git diff --quiet HEAD" when it hits
diff_can_quit_early() in oneway_diff().

This patch does the content test earlier in order to keep going if "a"
is unchanged. The test result is cached so that when
diffcore_skip_stat_unmatch() is done in the end, we spend no cycles on
re-testing "a".

Reported-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiff.c: move diffcore_skip_stat_unmatch core logic out for reuse later
Nguyễn Thái Ngọc Duy [Sat, 25 Jan 2014 06:46:49 +0000 (13:46 +0700)] 
diff.c: move diffcore_skip_stat_unmatch core logic out for reuse later

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoclean: use cache_name_is_other()
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:35 +0000 (20:40 +0700)] 
clean: use cache_name_is_other()

cmd_clean() has the exact same code of index_name_is_other(). Reduce
code duplication.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoclean: replace match_pathspec() with dir_path_match()
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:34 +0000 (20:40 +0700)] 
clean: replace match_pathspec() with dir_path_match()

This instance was left out when many match_pathspec() call sites that
take input from dir_entry were converted to dir_path_match() because
it passed a path with the trailing slash stripped out to match_pathspec()
while the others did not. Stripping for all call sites back then would
be a regression because match_pathspec() did not know how to match
pathspec foo/ against _directory_ foo (the stripped version of path
"foo/").

match_pathspec() knows how to do it now. And dir_path_match() strips
the trailing slash also. Use the new function, because the stripping
code is removed in the next patch.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopathspec: pass directory indicator to match_pathspec_item()
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:33 +0000 (20:40 +0700)] 
pathspec: pass directory indicator to match_pathspec_item()

This patch activates the DO_MATCH_DIRECTORY code in m_p_i(), which
makes "git diff HEAD submodule/" and "git diff HEAD submodule" produce
the same output. Previously only the version without trailing slash
returns the difference (if any).

That's the effect of new ce_path_match(). dir_path_match() is not
executed by the new tests. And it should not introduce regressions.

Previously if path "dir/" is passed in with pathspec "dir/", they
obviously match. With new dir_path_match(), the path becomes
_directory_ "dir" vs pathspec "dir/", which is not executed by the old
code path in m_p_i(). The new code path is executed and produces the
same result.

The other case is pathspec "dir" and path "dir/" is now turned to
"dir" (with DO_MATCH_DIRECTORY). Still the same result before or after
the patch.

So why change? Because of the next patch about clean.c.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomatch_pathspec: match pathspec "foo/" against directory "foo"
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:32 +0000 (20:40 +0700)] 
match_pathspec: match pathspec "foo/" against directory "foo"

Currently we do support matching pathspec "foo/" against directory
"foo". That is because match_pathspec() has no way to tell "foo" is a
directory and matching "foo/" against _file_ "foo" is wrong.

The callers can now tell match_pathspec if "foo" is a directory, we
could make an exception for this case. Code is not executed though
because no callers pass the flag yet.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodir.c: prepare match_pathspec_item for taking more flags
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:31 +0000 (20:40 +0700)] 
dir.c: prepare match_pathspec_item for taking more flags

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopathspec: rename match_pathspec_depth() to match_pathspec()
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:30 +0000 (20:40 +0700)] 
pathspec: rename match_pathspec_depth() to match_pathspec()

A long time ago, for some reason I was not happy with
match_pathspec(). I created a better version, match_pathspec_depth()
that was suppose to replace match_pathspec()
eventually. match_pathspec() has finally been gone since 6 months
ago. Use the shorter name for match_pathspec_depth().

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopathspec: convert some match_pathspec_depth() to dir_path_match()
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:29 +0000 (20:40 +0700)] 
pathspec: convert some match_pathspec_depth() to dir_path_match()

This helps reduce the number of match_pathspec_depth() call sites and
show how m_p_d() is used. And it usage is:

 - match against an index entry (ce_path_match or match_pathspec_depth
   in ls-files)

 - match against a dir_entry from read_directory (dir_path_match and
   match_pathspec_depth in clean.c, which will be converted later)

 - resolve-undo (rerere.c and ls-files.c)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopathspec: convert some match_pathspec_depth() to ce_path_match()
Nguyễn Thái Ngọc Duy [Fri, 24 Jan 2014 13:40:28 +0000 (20:40 +0700)] 
pathspec: convert some match_pathspec_depth() to ce_path_match()

This helps reduce the number of match_pathspec_depth() call sites and
show how match_pathspec_depth() is used.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomerge-recursive.c: tolerate missing files while refreshing index
Brad King [Mon, 27 Jan 2014 14:45:09 +0000 (09:45 -0500)] 
merge-recursive.c: tolerate missing files while refreshing index

Teach add_cacheinfo to tell make_cache_entry to skip refreshing stat
information when a file is missing from the work tree.  We do not want
the index to be stat-dirty after the merge but also do not want to fail
when a file happens to be missing.

This fixes the 'merge-recursive w/ empty work tree - ours has rename'
case in t3030-merge-recursive.

Suggested-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoread-cache.c: extend make_cache_entry refresh flag with options
Brad King [Mon, 27 Jan 2014 14:45:08 +0000 (09:45 -0500)] 
read-cache.c: extend make_cache_entry refresh flag with options

Convert the make_cache_entry boolean 'refresh' argument to a more
general 'refresh_options' argument.  Pass the value through to the
underlying refresh_cache_ent call.  Add option CE_MATCH_REFRESH to
enable stat refresh.  Update call sites to use the new signature.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoread-cache.c: refactor --ignore-missing implementation
Brad King [Mon, 27 Jan 2014 14:45:07 +0000 (09:45 -0500)] 
read-cache.c: refactor --ignore-missing implementation

Move lstat ENOENT handling from refresh_index to refresh_cache_ent and
activate it with a new CE_MATCH_IGNORE_MISSING option.  This will allow
other call paths into refresh_cache_ent to use the feature.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot3030-merge-recursive: test known breakage with empty work tree
Brad King [Mon, 27 Jan 2014 14:45:06 +0000 (09:45 -0500)] 
t3030-merge-recursive: test known breakage with empty work tree

Sometimes when working with a large repository it can be useful to try
out a merge and only check out conflicting files to disk (for example as
a speed optimization on a server).  Until v1.7.7-rc1~28^2~20
(merge-recursive: When we detect we can skip an update, actually skip
it, 2011-08-11), it was possible to do so with the following idiom:

# Prepare a temporary index and empty work tree.
GIT_INDEX_FILE="$PWD/tmp-$$-index" &&
export GIT_INDEX_FILE &&
GIT_WORK_TREE="$PWD/tmp-$$-work" &&
export GIT_WORK_TREE &&
mkdir "$GIT_WORK_TREE" &&

# Convince the index that our side is on disk.
git read-tree -i -m $ours &&
git update-index --ignore-missing --refresh &&

# Merge their side into our side.
bases=$(git merge-base --all $ours $theirs) &&
git merge-recursive $bases -- $ours $theirs &&
tree=$(git write-tree)

Nowadays, that still works and the exit status is the same, but
merge-recursive produces a diagnostic if "our" side renamed a file:

error: addinfo_cache failed for path 'dst'

Add a test to document this regression.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoremote: handle pushremote config in any order
Jeff King [Mon, 24 Feb 2014 08:59:03 +0000 (03:59 -0500)] 
remote: handle pushremote config in any order

The remote we push can be defined either by
remote.pushdefault or by branch.*.pushremote for the current
branch. The order in which they appear in the config file
should not matter to precedence (which should be to prefer
the branch-specific config).

The current code parses the config linearly and uses a
single string to store both values, overwriting any
previous value. Thus, config like:

  [branch "master"]
  pushremote = foo
  [remote]
  pushdefault = bar

erroneously ends up pushing to "bar" from the master branch.

We can fix this by storing both values and resolving the
correct value after all config is read.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolog: do not segfault on gmtime errors
Jeff King [Mon, 24 Feb 2014 07:49:05 +0000 (02:49 -0500)] 
log: do not segfault on gmtime errors

Many code paths assume that show_date and show_ident_date
cannot return NULL. For the most part, we handle missing or
corrupt timestamps by showing the epoch time t=0.

However, we might still return NULL if gmtime rejects the
time_t we feed it, resulting in a segfault. Let's catch this
case and just format t=0.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolog: handle integer overflow in timestamps
Jeff King [Mon, 24 Feb 2014 07:46:37 +0000 (02:46 -0500)] 
log: handle integer overflow in timestamps

If an ident line has a ridiculous date value like (2^64)+1,
we currently just pass ULONG_MAX along to the date code,
which can produce nonsensical dates.

On systems with a signed long time_t (e.g., 64-bit glibc
systems), this actually doesn't end up too bad. The
ULONG_MAX is converted to -1, we apply the timezone field to
that, and the result ends up somewhere between Dec 31, 1969
and Jan 1, 1970.

However, there is still a few good reasons to detect the
overflow explicitly:

  1. On systems where "unsigned long" is smaller than
     time_t, we get a nonsensical date in the future.

  2. Even where it would produce "Dec 31, 1969", it's easier
     to recognize "midnight Jan 1" as a consistent sentinel
     value for "we could not parse this".

  3.  Values which do not overflow strtoul but do overflow a
      signed time_t produce nonsensical values in the past.
      For example, on a 64-bit system with a signed long
      time_t, a timestamp of 18446744073000000000 produces a
      date in 1947.

We also recognize overflow in the timezone field, which
could produce nonsensical results. In this case we show the
parsed date, but in UTC.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodate: check date overflow against time_t
Jeff King [Mon, 24 Feb 2014 07:39:45 +0000 (02:39 -0500)] 
date: check date overflow against time_t

When we check whether a timestamp has overflowed, we check
only against ULONG_MAX, meaning that strtoul has overflowed.
However, we also feed these timestamps to system functions
like gmtime, which expect a time_t. On many systems, time_t
is actually smaller than "unsigned long" (e.g., because it
is signed), and we would overflow when using these
functions.  We don't know the actual size or signedness of
time_t, but we can easily check for truncation with a simple
assignment.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofsck: report integer overflow in author timestamps
Jeff King [Mon, 24 Feb 2014 07:39:04 +0000 (02:39 -0500)] 
fsck: report integer overflow in author timestamps

When we check commit objects, we complain if commit->date is
ULONG_MAX, which is an indication that we saw integer
overflow when parsing it. However, we do not do any check at
all for author lines, which also contain a timestamp.

Let's actually check the timestamps on each ident line
with strtoul. This catches both author and committer lines,
and we can get rid of the now-redundant commit->date check.

Note that like the existing check, we compare only against
ULONG_MAX. Now that we are calling strtoul at the site of
the check, we could be slightly more careful and also check
that errno is set to ERANGE. However, this will make further
refactoring in future patches a little harder, and it
doesn't really matter in practice.

For 32-bit systems, one would have to create a commit at the
exact wrong second in 2038. But by the time we get close to
that, all systems will hopefully have moved to 64-bit (and
if they haven't, they have a real problem one second later).

For 64-bit systems, by the time we get close to ULONG_MAX,
all systems will hopefully have been consumed in the fiery
wrath of our expanding Sun.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot4212: test bogus timestamps with git-log
Jeff King [Mon, 24 Feb 2014 07:36:22 +0000 (02:36 -0500)] 
t4212: test bogus timestamps with git-log

When t4212 was originally added by 9dbe7c3d (pretty: handle
broken commit headers gracefully, 2013-04-17), it tested our
handling of commits with broken ident lines in which the
timestamps could not be parsed. It does so using a bogus line
like "Name <email>-<> 1234 -0000", because that simulates an
error that was seen in the wild.

Later, 03818a4 (split_ident: parse timestamp from end of
line, 2013-10-14) made our parser smart enough to actually
find the timestamp on such a line, and t4212 was adjusted to
match. While it's nice that we handle this real-world case,
this meant that we were not actually testing the
bogus-timestamp case anymore.

This patch adds a test with a totally incomprehensible
timestamp to make sure we are testing the code path.

Note that the behavior is slightly different between regular log
output and "--format=%ad". In the former case, we produce a
sentinel value and in the latter, we produce an empty
string. While at first this seems unnecessarily
inconsistent, it matches the original behavior given by
9dbe7c3d.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodifftool: support repositories with .git-files
David Aguilar [Mon, 24 Feb 2014 03:12:35 +0000 (19:12 -0800)] 
difftool: support repositories with .git-files

Modern versions of "git submodule" use .git-files to setup the
submodule directory.  When run in a "git submodule"-created
repository "git difftool --dir-diff" dies with the following
error:

$ git difftool -d HEAD~
fatal: This operation must be run in a work tree
diff --raw --no-abbrev -z HEAD~: command returned error: 128

core.worktree is relative to the .git directory but the logic
in find_worktree() does not account for it.

Use `git rev-parse --show-toplevel` to find the worktree so that
the dir-diff feature works inside a submodule.

Reported-by: Gábor Lipták <gabor.liptak@gmail.com>
Helped-by: Jens Lehmann <jens.lehmann@web.de>
Helped-by: John Keeping <john@keeping.me.uk>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoreset: optionally setup worktree and refresh index on --mixed
Nguyễn Thái Ngọc Duy [Sun, 16 Feb 2014 02:28:03 +0000 (09:28 +0700)] 
reset: optionally setup worktree and refresh index on --mixed

Refreshing index requires work tree.  So we have two options: always
set up work tree (and refuse to reset if failing to do so), or make
refreshing index optional.

As refreshing index is not the main task, it makes more sense to make
it optional. This allows us to still work in a bare repository to update
what is in the index.

Reported-by: Patrick Palka <patrick@parcs.ath.cx>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiff: do not reuse_worktree_file for submodules
Thomas Rast [Sun, 16 Feb 2014 16:52:34 +0000 (17:52 +0100)] 
diff: do not reuse_worktree_file for submodules

The GIT_EXTERNAL_DIFF calling code attempts to reuse existing worktree
files for the worktree side of diffs, for performance reasons.
However, that code also tries to do the same with submodules.  This
results in calls to $GIT_EXTERNAL_DIFF where the old-file is a file of
the form "Submodule commit $sha1", but the new-file is a directory in
the worktree.

Fix it by never reusing a worktree "file" in the submodule case.

Reported-by: Grégory Pakosz <gregory.pakosz@gmail.com>
Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.9.0 v1.9.0
Junio C Hamano [Fri, 14 Feb 2014 19:35:04 +0000 (11:35 -0800)] 
Git 1.9.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorelease notes: typo fixes
Michael J Gruber [Thu, 13 Feb 2014 10:35:08 +0000 (11:35 +0100)] 
release notes: typo fixes

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with 1.8.5.5
Junio C Hamano [Thu, 13 Feb 2014 21:42:26 +0000 (13:42 -0800)] 
Sync with 1.8.5.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5.5 v1.8.5.5
Junio C Hamano [Thu, 13 Feb 2014 21:40:47 +0000 (13:40 -0800)] 
Git 1.8.5.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'bm/merge-base-octopus-dedup' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:38:59 +0000 (13:38 -0800)] 
Merge branch 'bm/merge-base-octopus-dedup' into maint

"git merge-base --octopus" used to leave cleaning up suboptimal
result to the caller, but now it does the clean-up itself.

* bm/merge-base-octopus-dedup:
  merge-base --octopus: reduce the result from get_octopus_merge_bases()
  merge-base: separate "--independent" codepath into its own helper

10 years agoMerge branch 'jc/revision-range-unpeel' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:38:47 +0000 (13:38 -0800)] 
Merge branch 'jc/revision-range-unpeel' into maint

"git log --left-right A...B" lost the "leftness" of commits
reachable from A when A is a tag as a side effect of a recent
bugfix.  This is a regression in 1.8.4.x series.

* jc/revision-range-unpeel:
  revision: propagate flag bits from tags to pointees
  revision: mark contents of an uninteresting tree uninteresting

10 years agoMerge branch 'jk/allow-fetch-onelevel-refname' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:38:34 +0000 (13:38 -0800)] 
Merge branch 'jk/allow-fetch-onelevel-refname' into maint

"git clone" would fail to clone from a repository that has a ref
directly under "refs/", e.g. "refs/stash", because different
validation paths do different things on such a refname.  Loosen the
client side's validation to allow such a ref.

* jk/allow-fetch-onelevel-refname:
  fetch-pack: do not filter out one-level refs

10 years agoMerge branch 'jk/interpret-branch-name-fix' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:38:25 +0000 (13:38 -0800)] 
Merge branch 'jk/interpret-branch-name-fix' into maint

A handful of bugs around interpreting $branch@{upstream} notation
and its lookalike, when $branch part has interesting characters,
e.g. "@", and ":", have been fixed.

* jk/interpret-branch-name-fix:
  interpret_branch_name: find all possible @-marks
  interpret_branch_name: avoid @{upstream} past colon
  interpret_branch_name: always respect "namelen" parameter
  interpret_branch_name: rename "cp" variable to "at"
  interpret_branch_name: factor out upstream handling

10 years agoMerge branch 'rk/send-email-ssl-cert' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:38:19 +0000 (13:38 -0800)] 
Merge branch 'rk/send-email-ssl-cert' into maint

A recent update to "git send-email" broke platforms where
/etc/ssl/certs/ directory exists but cannot be used as SSL_ca_path
(e.g. Fedora rawhide).

* rk/send-email-ssl-cert:
  send-email: /etc/ssl/certs/ directory may not be usable as ca_path

10 years agoMerge branch 'sb/repack-in-c' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:38:09 +0000 (13:38 -0800)] 
Merge branch 'sb/repack-in-c' into maint

"git repack --max-pack-size=8g" stopped being parsed correctly when
the command was reimplemented in C.

* sb/repack-in-c:
  repack: propagate pack-objects options as strings
  repack: make parsed string options const-correct
  repack: fix typo in max-pack-size option

10 years agoMerge branch 'as/tree-walk-fix-aggressive-short-cut' into maint
Junio C Hamano [Thu, 13 Feb 2014 21:37:53 +0000 (13:37 -0800)] 
Merge branch 'as/tree-walk-fix-aggressive-short-cut' into maint

The pathspec matching code, while comparing two trees (e.g. "git
diff A B -- path1 path2") was too aggressive and failed to match
some paths when multiple pathspecs were involved.

* as/tree-walk-fix-aggressive-short-cut:
  tree_entry_interesting: match against all pathspecs

10 years agot5537: move http tests out to t5539
Nguyễn Thái Ngọc Duy [Thu, 13 Feb 2014 13:21:14 +0000 (20:21 +0700)] 
t5537: move http tests out to t5539

start_httpd is supposed to be at the beginning of the test file, not
the middle of it. The "test_seq" line in "no shallow lines.." test is
updated to compensate missing refs that are there in t5537, but not in
the new t5539.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Wed, 12 Feb 2014 20:28:47 +0000 (12:28 -0800)] 
Merge git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: de.po: correct message when hiding commits by craft
  l10n: de.po: translate 28 new messages

10 years agol10n: de.po: correct message when hiding commits by craft
Ralf Thielow [Sat, 8 Feb 2014 21:01:36 +0000 (22:01 +0100)] 
l10n: de.po: correct message when hiding commits by craft

The recent translation was giving the idea that all commits
based on a graft were meant to be hidden. Make it clear that
it is the graft commit itself.

Reported-by: David Kastrup <dak@gnu.org>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
10 years agol10n: de.po: translate 28 new messages
Ralf Thielow [Fri, 3 Jan 2014 17:38:12 +0000 (18:38 +0100)] 
l10n: de.po: translate 28 new messages

Translate 28 new messages came from git.pot update in
df49095 (l10n: git.pot: v1.9 round 1 (27 new, 11 removed)
and d57b24b (l10n: git.pot: v1.9 round 2 (1 new)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
10 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 11 Feb 2014 19:02:05 +0000 (11:02 -0800)] 
Merge git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: Disambiguation for rebase
  l10n: zh_CN.po: translate 1 new message (2211t0f0u)
  l10n: vi.po (2211t): Updated one new string
  l10n: Update Swedish translation (2211t0f0u)
  l10n: fr: 1.9rc2 2211t
  l10n: git.pot: v1.9 round 2 (1 new)

10 years agofetch-pack: fix deepen shallow over smart http with no-done cap
Nguyễn Thái Ngọc Duy [Thu, 6 Feb 2014 15:10:39 +0000 (22:10 +0700)] 
fetch-pack: fix deepen shallow over smart http with no-done cap

In smart http, upload-pack adds new shallow lines at the beginning of
each rpc response. Only shallow lines from the first rpc call are
useful. After that they are thrown away. It's designed this way
because upload-pack is stateless and has no idea when its shallow
lines are helpful or not.

So after refs are negotiated with multi_ack_detailed and the server
thinks it learned enough, it sends "ACK obj-id ready", terminates the
rpc call and waits for the final rpc round. The client sends "done".
The server sends another response, which also has shallow lines at
the beginning, and the last "ACK obj-id" line.

When no-done is active, the last round is cut out, the server sends
"ACK obj-id ready" and "ACK obj-id" in the same rpc
response. fetch-pack is updated to recognize this and not send
"done". However it still tries to consume shallow lines, which are
never sent.

Update the code, make sure to skip consuming shallow lines when
no-done is enabled.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoprotocol-capabilities.txt: document no-done
Nguyễn Thái Ngọc Duy [Thu, 6 Feb 2014 15:10:38 +0000 (22:10 +0700)] 
protocol-capabilities.txt: document no-done

See 3e63b21 (upload-pack: Implement no-done capability - 2011-03-14)
and 761ecf0 (fetch-pack: Implement no-done capability - 2011-03-14)
for more information.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoprotocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txt
Nguyễn Thái Ngọc Duy [Thu, 6 Feb 2014 15:10:37 +0000 (22:10 +0700)] 
protocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txt

pack-protocol.txt explains in detail how multi_ack_detailed works and
what's the difference between no multi_ack, multi_ack and
multi_ack_detailed. No need to repeat here.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'
Nguyễn Thái Ngọc Duy [Thu, 6 Feb 2014 15:10:36 +0000 (22:10 +0700)] 
pack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'

It's introduced in 1bd8c8f (git-upload-pack: Support the multi_ack
protocol - 2005-10-28) but probably better documented in the commit
message of 78affc4 (Add multi_ack_detailed capability to
fetch-pack/upload-pack - 2009-10-30).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotest: rename http fetch and push test files
Nguyễn Thái Ngọc Duy [Thu, 6 Feb 2014 15:10:34 +0000 (22:10 +0700)] 
test: rename http fetch and push test files

Make clear which one is for dumb protocol, which one is for smart from
their file name.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotests: auto-set LIB_HTTPD_PORT from test name
Jeff King [Mon, 10 Feb 2014 14:39:48 +0000 (09:39 -0500)] 
tests: auto-set LIB_HTTPD_PORT from test name

We set the default apache port for each of the httpd tests
to the 4-digit test number of the test script. We want these
to remain unique so that the tests do not conflict with each
other when run in parallel.

Instead of doing it manually in each test script, let's just
set it from the test name at run time. This is simpler, and
is one less thing to be updated when test scripts are
renamed (e.g., when being re-rolled or when conflicting
after being merged with another topic).

Incidentally, this fixes a case where t5537 and t5538 used
the same port number (5537), and could conflict with each
other when run in parallel.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.9.0-rc3 v1.9.0-rc3
Junio C Hamano [Fri, 7 Feb 2014 19:56:07 +0000 (11:56 -0800)] 
Git 1.9.0-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'ow/manpages-typofix'
Junio C Hamano [Fri, 7 Feb 2014 19:55:11 +0000 (11:55 -0800)] 
Merge branch 'ow/manpages-typofix'

Various typofixes, all looked correct.

* ow/manpages-typofix:
  Documentation: fix typos in man pages

10 years agoMerge branch 'aj/ada-diff-word-pattern'
Junio C Hamano [Fri, 7 Feb 2014 19:55:10 +0000 (11:55 -0800)] 
Merge branch 'aj/ada-diff-word-pattern'

* aj/ada-diff-word-pattern:
  userdiff: update Ada patterns

10 years agoMerge branch 'nd/tag-doc'
Junio C Hamano [Fri, 7 Feb 2014 19:55:06 +0000 (11:55 -0800)] 
Merge branch 'nd/tag-doc'

* nd/tag-doc:
  git-tag.txt: <commit> for --contains is optional

10 years agocheck-attr: move to the top of working tree when in non-bare repository
Junio C Hamano [Thu, 6 Feb 2014 18:19:33 +0000 (10:19 -0800)] 
check-attr: move to the top of working tree when in non-bare repository

Lasse Makholm noticed that running "git check-attr" from a place
totally unrelated to $GIT_DIR and $GIT_WORK_TREE does not give
expected results.  I think it is because the command does not say it
wants to call setup_work_tree().

We still need to support use cases where only a bare repository is
involved, so unconditionally requiring a working tree would not work
well.  Instead, make a call only in a non-bare repository.

We may want to see if we want to do a similar fix in the opposite
direction to check-ignore.  The command unconditionally requires a
working tree, but it should be usable in a bare repository just like
check-attr attempts to be.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot0003: do not chdir the whole test process
Junio C Hamano [Thu, 6 Feb 2014 18:16:27 +0000 (10:16 -0800)] 
t0003: do not chdir the whole test process

Moving to some other directory and letting the remainder of the test
pieces to expect that they start there is a bad practice.  The test
that contains chdir itself may fail (or by mistake skipped via the
GIT_SKIP_TESTS mechanism) in which case the remainder may operate on
files in unexpected places.

Signed-off-by: Junio C Hamano <gitster@pobox.com>