20 months agoMerge branch 'master' of git://git.kernel.org/pub/scm/git/gitmaster
Jakub Narebski [Fri, 12 Apr 2013 21:07:07 +0000]
Merge branch 'master' of git://git./git/git

* 'master' of git://git.kernel.org/pub/scm/git/git: (1061 commits)
  Update dtaft release notes to 1.8.3
  Typo fix: replacing it's -> its
  t: make PIPE a standard test prerequisite
  archive: clarify explanation of --worktree-attributes
  t/README: --immediate skips cleanup commands for failed tests
  remote-bzr: improve tag handling
  remote-bzr: fix utf-8 support for fetching
  Revert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013-01-17)
  Git 1.8.2.1
  Update draft release notes to 1.8.3
  Git 1.8.1.6
  remote-helpers/test-bzr.sh: do not use "grep '\s'"
  gitremote-helpers(1): clarify refspec behaviour
  fast-export: Allow pruned-references in mark file
  remote-bzr: add utf-8 support for pushing
  remote-bzr: add utf-8 support for fetching
  remote-bzr: avoid unreferred tags
  remote-bzr: only update workingtree on local repos
  remote-bzr: set author if available
  remote-bzr: remove files before modifications
  ...

20 months agoMerge branch 'maint'origin
Junio C Hamano [Fri, 12 Apr 2013 00:41:48 +0000]
Merge branch 'maint'

* maint:
  Typo fix: replacing it's -> its
  t: make PIPE a standard test prerequisite
  archive: clarify explanation of --worktree-attributes
  t/README: --immediate skips cleanup commands for failed tests

20 months agoUpdate dtaft release notes to 1.8.3
Junio C Hamano [Thu, 11 Apr 2013 23:03:55 +0000]
Update dtaft release notes to 1.8.3

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

20 months agoMerge branch 'ap/combine-diff-coalesce-lost'
Junio C Hamano [Fri, 12 Apr 2013 00:41:05 +0000]
Merge branch 'ap/combine-diff-coalesce-lost'

Attempts to minimize "diff -c/--cc" output by coalescing the same
lines removed from the parents better, but with an O(n^2)
complexity.

* ap/combine-diff-coalesce-lost:
  combine-diff: coalesce lost lines optimally

20 months agoMerge branch 'sr/log-SG-no-textconv'
Junio C Hamano [Fri, 12 Apr 2013 00:41:04 +0000]
Merge branch 'sr/log-SG-no-textconv'

"git log -S/-G" started paying attention to textconv filter, but
there was no way to disable this.  Make it honor --no-textconv
option.

* sr/log-SG-no-textconv:
  diffcore-pickaxe: unify code for log -S/-G
  diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"
  diffcore-pickaxe: port optimization from has_changes() to diff_grep()
  diffcore-pickaxe: respect --no-textconv
  diffcore-pickaxe: remove fill_one()
  diffcore-pickaxe: remove unnecessary call to get_textconv()

20 months agoMerge branch 'js/rerere-forget-protect-against-NUL'
Junio C Hamano [Fri, 12 Apr 2013 00:41:02 +0000]
Merge branch 'js/rerere-forget-protect-against-NUL'

A few bugfixes to "git rerere" working on corner case merge
conflicts.

* js/rerere-forget-protect-against-NUL:
  rerere forget: do not segfault if not all stages are present
  rerere forget: grok files containing NUL

20 months agoMerge branch 'po/help-guides'
Junio C Hamano [Fri, 12 Apr 2013 00:41:00 +0000]
Merge branch 'po/help-guides'

"git help" learned "-g" option to show the list of guides just like
list of commands are given with "-a".

* po/help-guides:
  doc: include --guide option description for "git help"
  help: mention -a and -g option, and 'git help <concept>' usage.
  builtin/help.c: add list_common_guides_help() function
  builtin/help.c: add --guide option
  builtin/help.c: split "-a" processing into two

20 months agoTypo fix: replacing it's -> itsmaint
Benoit Bourbie [Sat, 13 Apr 2013 16:47:21 +0000]
Typo fix: replacing it's -> its

Signed-off-by: Benoit Bourbie <benoit.bourbie@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agot: make PIPE a standard test prerequisite
Adam Spiers [Thu, 11 Apr 2013 02:07:04 +0000]
t: make PIPE a standard test prerequisite

The 'PIPE' test prerequisite was already defined identically by t9010
and t9300, therefore it makes sense to make it a predefined
prerequisite.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoarchive: clarify explanation of --worktree-attributes
René Scharfe [Wed, 10 Apr 2013 17:49:57 +0000]
archive: clarify explanation of --worktree-attributes

Make it a bit clearer that --worktree-attributes is about files in the
working tree (checked out files, possibly changed) and not the current
working directory ($PWD).  Link to the ATTRIBUTES section, which has
more details.

Reported-by: Amit Bakshi <ambakshi@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agot/README: --immediate skips cleanup commands for failed tests
Simon Ruderich [Tue, 9 Apr 2013 21:48:36 +0000]
t/README: --immediate skips cleanup commands for failed tests

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: improve tag handling
Felipe Contreras [Mon, 8 Apr 2013 18:36:39 +0000]
remote-bzr: improve tag handling

revision_history() is deprecated and doesn't do what we want (revno
instead of dotted_revno?).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: fix utf-8 support for fetching
Christophe Simonis [Mon, 8 Apr 2013 18:36:38 +0000]
remote-bzr: fix utf-8 support for fetching

The previous patches didn't deal with all the scenarios.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoRevert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013...
Junio C Hamano [Mon, 8 Apr 2013 20:10:27 +0000]
Revert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013-01-17)

Kevin Bracey reports that the change regresses a case shown in the
user manual.

Trading one fix with another breakage is not worth it.  Just keep
the test to document the existing breakage, and revert the change
for now.

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

20 months agoSync with 1.8.2.1
Junio C Hamano [Sun, 7 Apr 2013 22:28:50 +0000]
Sync with 1.8.2.1

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

20 months agoGit 1.8.2.1v1.8.2.1
Junio C Hamano [Sun, 7 Apr 2013 22:27:23 +0000]
Git 1.8.2.1

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

20 months agoUpdate draft release notes to 1.8.3
Junio C Hamano [Sun, 7 Apr 2013 21:40:26 +0000]
Update draft release notes to 1.8.3

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

20 months agoMerge branch 'jk/rm-removed-paths'
Junio C Hamano [Sun, 7 Apr 2013 21:33:14 +0000]
Merge branch 'jk/rm-removed-paths'

A handful of test cases and a corner case bugfix for "git rm".

* jk/rm-removed-paths:
  t3600: document failure of rm across symbolic links
  t3600: test behavior of reverse-d/f conflict
  rm: do not complain about d/f conflicts during deletion

20 months agoMerge branch 'tb/shared-perm'
Junio C Hamano [Sun, 7 Apr 2013 21:33:11 +0000]
Merge branch 'tb/shared-perm'

Simplifies adjust_shared_perm() implementation.

* tb/shared-perm:
  path.c: optimize adjust_shared_perm()
  path.c: simplify adjust_shared_perm()

20 months agoMerge branch 'cn/commit-amend-doc'
Junio C Hamano [Sun, 7 Apr 2013 21:33:06 +0000]
Merge branch 'cn/commit-amend-doc'

* cn/commit-amend-doc:
  Documentation/git-commit: reword the --amend explanation

20 months agoMerge branch 'fc/remote-helpers-test-updates'
Junio C Hamano [Sun, 7 Apr 2013 21:33:02 +0000]
Merge branch 'fc/remote-helpers-test-updates'

* fc/remote-helpers-test-updates:
  remote-hg: fix hg-git test-case
  remote-bzr: remove stale check code for tests
  remote-helpers: fix the run of all tests
  remote-bzr: avoid echo -n

20 months agoMerge branch 'mg/texinfo-5'
Junio C Hamano [Sun, 7 Apr 2013 21:32:59 +0000]
Merge branch 'mg/texinfo-5'

Strip @anchor elements in the texinfo output of the documentation,
as a single document created by concatenating our entire manual set
will produce many duplicates that makes newer texinfo unhappy.

* mg/texinfo-5:
  Documentation: Strip texinfo anchors to avoid duplicates

20 months agoMerge branch 'jk/diffcore-break-divzero'
Junio C Hamano [Sun, 7 Apr 2013 21:32:57 +0000]
Merge branch 'jk/diffcore-break-divzero'

* jk/diffcore-break-divzero:
  diffcore-break: don't divide by zero

20 months agoMerge branch 'jk/bisect-prn-unsigned'
Junio C Hamano [Sun, 7 Apr 2013 21:32:54 +0000]
Merge branch 'jk/bisect-prn-unsigned'

* jk/bisect-prn-unsigned:
  bisect: avoid signed integer overflow

20 months agoMerge branch 'rr/triangle'
Junio C Hamano [Sun, 7 Apr 2013 21:32:50 +0000]
Merge branch 'rr/triangle'

Support "pull from one place, push to another place" workflow
better by introducing remote.pushdefault (overrides the "origin"
thing) and branch.*.pushremote (overrides the branch.*.remote).

* rr/triangle:
  remote.c: introduce branch.<name>.pushremote
  remote.c: introduce remote.pushdefault
  remote.c: introduce a way to have different remotes for fetch/push
  t5516 (fetch-push): drop implicit arguments from helper functions
  t5516 (fetch-push): update test description
  remote.c: simplify a bit of code using git_config_string()

20 months agoMerge branch 'mm/status-during-revert'
Junio C Hamano [Sun, 7 Apr 2013 21:32:03 +0000]
Merge branch 'mm/status-during-revert'

"git status" learned to report that you are in the middle of a
revert session, just like it does for a cherry-pick and a bisect
session.

* mm/status-during-revert:
  status: show commit sha1 in "You are currently reverting" message
  status: show 'revert' state and status hint

20 months agoMerge branch 'jk/set-upstream-error-cases'
Junio C Hamano [Sun, 7 Apr 2013 21:31:08 +0000]
Merge branch 'jk/set-upstream-error-cases'

The handing by "git branch --set-upstream-to" against various forms
of errorneous inputs were suboptimal.

* jk/set-upstream-error-cases:
  branch: give advice when tracking start-point is missing
  branch: mention start_name in set-upstream error messages
  branch: improve error message for missing --set-upstream-to ref
  branch: factor out "upstream is not a branch" error messages
  t3200: test --set-upstream-to with bogus refs

20 months agoMerge branch 'jk/filter-branch-come-back-to-original'
Junio C Hamano [Sun, 7 Apr 2013 21:29:34 +0000]
Merge branch 'jk/filter-branch-come-back-to-original'

When used with "-d temporary-directory" option, "git filter-branch"
failed to come back to the original working tree to perform the
final clean-up procedure.

* jk/filter-branch-come-back-to-original:
  filter-branch: return to original dir after filtering

20 months agoSync with 1.8.1.6
Junio C Hamano [Sun, 7 Apr 2013 16:10:11 +0000]
Sync with 1.8.1.6

20 months agoGit 1.8.1.6v1.8.1.6
Junio C Hamano [Sun, 7 Apr 2013 15:58:30 +0000]
Git 1.8.1.6

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

20 months agoMerge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1
Junio C Hamano [Sun, 7 Apr 2013 15:45:03 +0000]
Merge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1

A pattern "dir" (without trailing slash) in the attributes file
stopped matching a directory "dir" by mistake with an earlier change
that wanted to allow pattern "dir/" to also match.

* jc/directory-attrs-regression-fix:
  t: check that a pattern without trailing slash matches a directory
  dir.c::match_pathname(): pay attention to the length of string parameters
  dir.c::match_pathname(): adjust patternlen when shifting pattern
  dir.c::match_basename(): pay attention to the length of string parameters
  attr.c::path_matches(): special case paths that end with a slash
  attr.c::path_matches(): the basename is part of the pathname

20 months agoremote-helpers/test-bzr.sh: do not use "grep '\s'"
Torsten Bögershausen [Sun, 7 Apr 2013 08:48:30 +0000]
remote-helpers/test-bzr.sh: do not use "grep '\s'"

Using grep "devel\s\+3:" to find at least one whitspace is not
portable on all grep versions; not all grep versions understand "\s"
as a "whitespace".

Use a literal TAB followed by SPACE.

The + as a qualifier for "one or more" is not a basic regular
expression; use egrep instead of grep.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agogitremote-helpers(1): clarify refspec behaviour
John Keeping [Sat, 6 Apr 2013 18:13:41 +0000]
gitremote-helpers(1): clarify refspec behaviour

The documentation says that "If no 'refspec' capability is advertised,
there is an implied `refspec *:*`" but this is only the case for the
"import" command.

Since there is a comment in transport-helper.c indicating that this
default is for historical reasons, change the documentation to clarify
that a refspec should always be specified.

Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agofast-export: Allow pruned-references in mark file
Antoine Pelisse [Sat, 6 Apr 2013 17:04:31 +0000]
fast-export: Allow pruned-references in mark file

fast-export can fail because of some pruned-reference when importing a
mark file.

The problem happens in the following scenario:

    $ git fast-export --export-marks=MARKS master
    (rewrite master)
    $ git prune
    $ git fast-export --import-marks=MARKS master

This might fail if some references have been removed by prune
because some marks will refer to no longer existing commits.
git-fast-export will not need these objects anyway as they were no
longer reachable.

We still need to update last_numid so we don't change the mapping
between marks and objects for remote-helpers.
Unfortunately, the mark file should not be rewritten without lost marks
if no new objects has been exported, as we could lose track of the last
last_numid.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: add utf-8 support for pushing
Felipe Contreras [Sat, 6 Apr 2013 03:49:23 +0000]
remote-bzr: add utf-8 support for pushing

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: add utf-8 support for fetching
Timotheus Pokorra [Sat, 6 Apr 2013 03:49:22 +0000]
remote-bzr: add utf-8 support for fetching

[fc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: avoid unreferred tags
Felipe Contreras [Sat, 6 Apr 2013 03:49:21 +0000]
remote-bzr: avoid unreferred tags

They have no content, there's nothing we can do with them.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: only update workingtree on local repos
Felipe Contreras [Sat, 6 Apr 2013 03:49:20 +0000]
remote-bzr: only update workingtree on local repos

Apparently, that's the only way it's possible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: set author if available
David Engster [Sat, 6 Apr 2013 03:49:19 +0000]
remote-bzr: set author if available

[fc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: remove files before modifications
Christophe Simonis [Sat, 6 Apr 2013 03:49:18 +0000]
remote-bzr: remove files before modifications

Allow re-add of a deleted file in the same commit.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: fix directory renaming
Christophe Simonis [Sat, 6 Apr 2013 03:49:17 +0000]
remote-bzr: fix directory renaming

Git does not handle directories, renaming a directory is renaming every
files in this directory.

[fc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoUpdate draft release notes to 1.8.3
Junio C Hamano [Fri, 5 Apr 2013 21:19:57 +0000]
Update draft release notes to 1.8.3

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

20 months agoMerge branch 'mh/rev-parse-verify-doc'
Junio C Hamano [Fri, 5 Apr 2013 21:15:20 +0000]
Merge branch 'mh/rev-parse-verify-doc'

"rev-parse --verify" was documented in a misleading way.

* mh/rev-parse-verify-doc:
  rev-parse: clarify documentation for the --verify option

20 months agoMerge branch 'sg/gpg-sig'
Junio C Hamano [Fri, 5 Apr 2013 21:15:16 +0000]
Merge branch 'sg/gpg-sig'

Teach "merge/pull" to optionally verify and reject commits that are
not signed properly.

* sg/gpg-sig:
  pretty printing: extend %G? to include 'N' and 'U'
  merge/pull Check for untrusted good GPG signatures
  merge/pull: verify GPG signatures of commits being merged
  commit.c/GPG signature verification: Also look at the first GPG status line
  Move commit GPG signature verification to commit.c

20 months agoMerge branch 'jl/submodule-deinit'
Junio C Hamano [Fri, 5 Apr 2013 21:15:13 +0000]
Merge branch 'jl/submodule-deinit'

A finishing touch to the new topic in 1.8.3.

* jl/submodule-deinit:
  submodule deinit: clarify work tree removal message

20 months agoMerge branch 'rr/send-email-perl-critique'
Junio C Hamano [Fri, 5 Apr 2013 21:14:48 +0000]
Merge branch 'rr/send-email-perl-critique'

Update "git send-email" for issues noticed by PerlCritic.

* rr/send-email-perl-critique:
  send-email: use the three-arg form of open in recipients_cmd
  send-email: drop misleading function prototype
  send-email: use "return;" not "return undef;" on error codepaths

20 months agoMerge branch 'jc/merge-tag-object'
Junio C Hamano [Fri, 5 Apr 2013 21:14:41 +0000]
Merge branch 'jc/merge-tag-object'

"git merge $(git rev-parse v1.8.2)" behaved quite differently from
"git merge v1.8.2" as if v1.8.2 were written as v1.8.2^0 and did
not pay much attention to the annotated tag payload.

This makes the code notice the type of the tag object, in addition
to the dwim_ref() based classification the current code uses
(i.e. the name appears in refs/tags/) to decide when to special
case merging of tags.

* jc/merge-tag-object:
  t6200: test message for merging of an annotated tag
  t6200: use test_config/test_unconfig
  merge: a random object may not necssarily be a commit

20 months agopath.c: optimize adjust_shared_perm()
Torsten Bögershausen [Sat, 30 Mar 2013 09:53:47 +0000]
path.c: optimize adjust_shared_perm()

Sometimes the chown() function is called even when not needed (This
can be provoked by running t1301, and adding some debug code).

Save a chmod from 400 to 400, or from 600 to 600 on these files:

 .git/info/refs+
 .git/objects/info/packs+

Save chmod on directories from 2770 to 2770:

 .git/refs
 .git/refs/heads
 .git/refs/tags

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agopath.c: simplify adjust_shared_perm()
Torsten Bögershausen [Sat, 30 Mar 2013 09:53:32 +0000]
path.c: simplify adjust_shared_perm()

All calls to set_shared_perm() use mode == 0, so simplify the
function.

Because all callers use the macro adjust_shared_perm(path) from
cache.h to call this function, convert it to a proper function,
losing set_shared_perm().

Since path.c has much more functions than just mkpath() these days,
drop the stale comment about it.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agodiffcore-pickaxe: unify code for log -S/-G
Jeff King [Fri, 5 Apr 2013 05:28:10 +0000]
diffcore-pickaxe: unify code for log -S/-G

The logic flow of has_changes() used for "log -S" and diff_grep()
used for "log -G" are essentially the same.  See if we have both
sides that could be different in any interesting way, slurp the
contents in core, possibly after applying textconv, inspect the
contents, clean-up and report the result.  The only difference
between the two is how "inspect" step works.

Unify this codeflow in a helper, pickaxe_match(), which takes a
callback function that implements the specific "inspect" step.

After removing the common scaffolding code from the existing
has_changes() and diff_grep(), they each becomes such a callback
function suitable for passing to pickaxe_match().

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agodiffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"
Junio C Hamano [Fri, 5 Apr 2013 04:03:21 +0000]
diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"

The diff_grep() and has_changes() functions had early return
codepaths for unmerged filepairs, which simply returned 0.  When we
taught textconv filter to them, one was ignored and continued to
return early without freeing the result filtered by textconv, and
the other had a failed attempt to fix, which allowed the planned
return value 0 to be overwritten by a bogus call to contains().

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

20 months agodiffcore-pickaxe: port optimization from has_changes() to diff_grep()
Junio C Hamano [Fri, 5 Apr 2013 03:40:31 +0000]
diffcore-pickaxe: port optimization from has_changes() to diff_grep()

These two functions are called in the same codeflow to implement
"log -S<block>" and "log -G<pattern>", respectively, but the latter
lacked two obvious optimizations the former implemented, namely:

 - When a pickaxe limit is not given at all, they should return
   without wasting any cycle;

 - When both sides of the filepair are the same, and the same
   textconv conversion apply to them, return early, as there will be
   no interesting differences between the two anyway.

Also release the filespec data once the processing is done (this is
not about leaking memory--it is about releasing data we finished
looking at as early as possible).

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

20 months agodiffcore-pickaxe: respect --no-textconv
Simon Ruderich [Fri, 5 Apr 2013 13:16:30 +0000]
diffcore-pickaxe: respect --no-textconv

git log -S doesn't respect --no-textconv:

    $ echo '*.txt diff=wrong' > .gitattributes
    $ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo
    error: cannot run xxx: No such file or directory
    fatal: unable to read files to diff

Reported-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoDocumentation/git-commit: reword the --amend explanation
Carlos Martín Nieto [Wed, 3 Apr 2013 13:07:21 +0000]
Documentation/git-commit: reword the --amend explanation

The explanation for 'git commit --amend' talks about preparing a tree
object, which shouldn't be how user-facing documentation talks about
commit.

Reword it to say it works as usual, but replaces the current commit.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agot3600: document failure of rm across symbolic links
Jeff King [Fri, 5 Apr 2013 00:00:09 +0000]
t3600: document failure of rm across symbolic links

If we have a symlink "d" that points to a directory, we
should not be able to remove "d/f". In the normal case,
where "d/f" does not exist in the index, we already disallow
this, as we only remove things that git knows about in the
index. So for something like:

  ln -s /outside/repo foo
  git add foo
  git rm foo/bar

we will properly produce an error (as there is no index
entry for foo/bar). However, if there is an index entry for
the path (e.g., because the movement is due to working tree
changes that have not yet been reflected in the index), we
will happily delete it, even though the path we delete from the
filesystem is not the same as the path in the index.

This patch documents that failure with a test.

While this is a bug, it should not be possible to cause
serious data loss with it. For any path that does not have
an index entry, we will complain and bail. For a path which
does have an index entry, we will do the usual up-to-date
content check. So even if the deleted path in the filesystem
is not the same as the one we are removing from the index,
we do know that they at least have the same content, and
that the content is included in HEAD.

That means the worst case is not the accidental loss of
content, but rather confusion by the user when a copy of a
file another part of the tree is removed. Which makes this
bug a minor and hard-to-trigger annoyance rather than a
data-loss bug (and hence the fix can be saved for a rainy
day when somebody feels like working on it).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agodiffcore-pickaxe: remove fill_one()
Jeff King [Fri, 5 Apr 2013 00:08:47 +0000]
diffcore-pickaxe: remove fill_one()

fill_one is _almost_ identical to just calling fill_textconv; the
exception is that for the !DIFF_FILE_VALID case, fill_textconv gives us
an empty buffer rather than a NULL one. Since we currently use the NULL
pointer as a signal that the file is not present on one side of the
diff, we must now switch to using DIFF_FILE_VALID to make the same
check.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agodiffcore-pickaxe: remove unnecessary call to get_textconv()
Simon Ruderich [Thu, 4 Apr 2013 20:20:29 +0000]
diffcore-pickaxe: remove unnecessary call to get_textconv()

The fill_one() function is responsible for finding and filling the
textconv filter as necessary, and is called by diff_grep() function
that implements "git log -G<pattern>".

The has_changes() function that implements "git log -S<block>" calls
get_textconv() for two sides being compared, before it checks to see
if it was asked to perform the pickaxe limiting.  Move the code
around to avoid this wastage.

After has_changes() calls get_textconv() to obtain textconv for both
sides, fill_one() is called to use them.

By adding get_textconv() to diff_grep() and relieving fill_one() of
responsibility to find the textconv filter, we can avoid calling
get_textconv() twice in has_changes().

With this change it's also no longer necessary for fill_one() to
modify the textconv argument, therefore pass a pointer instead of a
pointer to a pointer.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoSync with maint
Junio C Hamano [Thu, 4 Apr 2013 20:03:50 +0000]
Sync with maint

* maint:
  mailmap: update Pasky's address
  git-remote-mediawiki: new wiki URL in documentation

20 months agomailmap: update Pasky's address
Junio C Hamano [Thu, 4 Apr 2013 20:03:34 +0000]
mailmap: update Pasky's address

Eric Wong noticed that the address at suse.cz no longer works.
We may want to update in-code addresses as well, but let's do
this first in 'maint'.

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

20 months agoMerge branch 'nd/index-pack-threaded-fixes' into maint
Junio C Hamano [Thu, 4 Apr 2013 20:00:41 +0000]
Merge branch 'nd/index-pack-threaded-fixes' into maint

* nd/index-pack-threaded-fixes:
  index-pack: guard nr_resolved_deltas reads by lock
  index-pack: protect deepest_delta in multithread code

20 months agoMerge branch 'jk/index-pack-correct-depth-fix' into maint
Junio C Hamano [Thu, 4 Apr 2013 20:00:37 +0000]
Merge branch 'jk/index-pack-correct-depth-fix' into maint

* jk/index-pack-correct-depth-fix:
  index-pack: always zero-initialize object_entry list

20 months agoMerge branch 'rs/submodule-summary-limit' into maint
Junio C Hamano [Thu, 4 Apr 2013 20:00:35 +0000]
Merge branch 'rs/submodule-summary-limit' into maint

"submodule summary --summary-limit" option did not support
"--option=value" form.

* rs/submodule-summary-limit:
  submodule summary: support --summary-limit=<n>

20 months agoMerge branch 'jk/peel-ref' into maint
Junio C Hamano [Thu, 4 Apr 2013 19:59:55 +0000]
Merge branch 'jk/peel-ref' into maint

* jk/peel-ref:
  upload-pack: load non-tip "want" objects from disk
  upload-pack: make sure "want" objects are parsed
  upload-pack: drop lookup-before-parse optimization

20 months agot3600: test behavior of reverse-d/f conflict
Jeff King [Thu, 4 Apr 2013 19:03:58 +0000]
t3600: test behavior of reverse-d/f conflict

The previous commit taught "rm" that it is safe to consider
"d/f" removed when "d" has become a non-directory. This
patch adds a test for the opposite: a file "d" that becomes
a directory.

In this case, "git rm" does need to complain, because we
should not be removing arbitrary content under "d". Git
already behaves correctly, but let's make sure that remains
the case by protecting the behavior with a test.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agorm: do not complain about d/f conflicts during deletion
Jeff King [Thu, 4 Apr 2013 19:03:35 +0000]
rm: do not complain about d/f conflicts during deletion

If we used to have an index entry "d/f", but "d" has been
replaced by a non-directory entry, the user may still want
to run "git rm" to delete the stale index entry. They could
use "git rm --cached" to just touch the index, but "git rm"
should also work: we explicitly try to handle the case that
the file has already been removed from the working tree.

However, because unlinking "d/f" in this case will not yield
ENOENT, but rather ENOTDIR, we do not notice that the file
is already gone. Instead, we report it as an error.

The simple solution is to treat ENOTDIR in this case exactly
like ENOENT; all we want to know is whether the file is
already gone, and if a leading path is no longer a
directory, then by definition the sub-path is gone.

Reported-by: jpinheiro <7jpinheiro@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agorerere forget: do not segfault if not all stages are present
Johannes Sixt [Thu, 4 Apr 2013 18:41:43 +0000]
rerere forget: do not segfault if not all stages are present

The loop that fills in the buffers that are later passed to the merge
driver exits early when not all stages of a path are present in the index.
But since the buffer pointers are not initialized in advance, the
subsequent accesses are undefined.

Initialize buffer pointers in advance to avoid undefined behavior later.

That is not sufficient, though, to get correct operation of handle_cache().
The function replays a conflicted merge to extract the part inside the
conflict markers. As written, the loop exits early when a stage is missing.
Consequently, the buffers for later stages that would be present in the
index are not filled in and the merge is replayed with incomplete data.

Fix it by investigating all stages of the given path.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agogit-remote-mediawiki: new wiki URL in documentation
Matthieu Moy [Thu, 4 Apr 2013 07:56:03 +0000]
git-remote-mediawiki: new wiki URL in documentation

The Bibzball wiki is not maintained anymore.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-hg: fix hg-git test-case
Felipe Contreras [Thu, 4 Apr 2013 15:36:19 +0000]
remote-hg: fix hg-git test-case

There was some lingering code that shouldn't have been there in the
first place.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: remove stale check code for tests
Felipe Contreras [Thu, 4 Apr 2013 15:36:18 +0000]
remote-bzr: remove stale check code for tests

The fastimport plugin was only required in the early stage of
development.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-helpers: fix the run of all tests
Felipe Contreras [Thu, 4 Apr 2013 15:36:17 +0000]
remote-helpers: fix the run of all tests

We don't need to check for duplicate test numbers, we don't have them,
and either way test-lint-duplicates doesn't work in this situation.

Also, while we are on it, enable test-lint-shell-syntax to check for sh
errors.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoremote-bzr: avoid echo -n
Felipe Contreras [Thu, 4 Apr 2013 15:36:16 +0000]
remote-bzr: avoid echo -n

It's not portable, as reported by test-lint.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoDocumentation: Strip texinfo anchors to avoid duplicates
Martin von Gagern [Wed, 3 Apr 2013 19:54:33 +0000]
Documentation: Strip texinfo anchors to avoid duplicates

This keeps texinfo 5.x happy. See https://bugs.gentoo.org/464210.

Signed-off-by: Martin von Gagern <Martin.vGagern@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agobisect: avoid signed integer overflow
John Keeping [Wed, 3 Apr 2013 19:17:55 +0000]
bisect: avoid signed integer overflow

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agodiffcore-break: don't divide by zero
John Keeping [Wed, 3 Apr 2013 19:24:05 +0000]
diffcore-break: don't divide by zero

When the source file is empty, the calculation of the merge score
results in a division by zero.  In the situation:

     == preimage ==             == postimage ==

     F (empty file)             F (a large file)
                                E (a new empty file)

it does not make sense to consider F->E as a rename, so it is better not
to break the pre- and post-image of F.

Bail out early in this case to avoid hitting the divide-by-zero.  This
causes the merge score to be left at zero.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

20 months agoUpdate draft release notes to 1.8.3
Junio C Hamano [Wed, 3 Apr 2013 16:43:47 +0000]
Update draft release notes to 1.8.3

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

20 months agoSync with maint
Junio C Hamano [Wed, 3 Apr 2013 16:44:34 +0000]
Sync with maint

20 months agoMerge branch 'jc/sha1-name-object-peeler'
Junio C Hamano [Wed, 3 Apr 2013 16:34:53 +0000]
Merge branch 'jc/sha1-name-object-peeler'

There was no good way to ask "I have a random string that came from
outside world. I want to turn it into a 40-hex object name while
making sure such an object exists".  A new peeling suffix ^{object}
can be used for that purpose, together with "rev-parse --verify".

* jc/sha1-name-object-peeler:
  peel_onion(): teach $foo^{object} peeler
  peel_onion: disambiguate to favor tree-ish when we know we want a tree-ish

20 months agoMerge branch 'jc/t5516-pushInsteadOf-vs-pushURL'
Junio C Hamano [Wed, 3 Apr 2013 16:34:48 +0000]
Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL'

Update a test to match the documented interaction between pushURL
and pushInsteadOf.

* jc/t5516-pushInsteadOf-vs-pushURL:
  t5516: test interaction between pushURL and pushInsteadOf correctly

20 months agoMerge branch 'rs/submodule-summary-limit'
Junio C Hamano [Wed, 3 Apr 2013 16:34:46 +0000]
Merge branch 'rs/submodule-summary-limit'

"submodule summary --summary-limit" option did not support
"--option=value" form.

* rs/submodule-summary-limit:
  submodule summary: support --summary-limit=<n>

20 months agoMerge branch 'tr/valgrind'
Junio C Hamano [Wed, 3 Apr 2013 16:34:44 +0000]
Merge branch 'tr/valgrind'

Let us use not just memgrind but other *grind debuggers.

* tr/valgrind:
  tests: notice valgrind error in test_must_fail
  tests --valgrind: provide a mode without --track-origins
  tests: parameterize --valgrind option
  t/README: --valgrind already implies -v

20 months agoMerge branch 'rr/prompt-revert-head'
Junio C Hamano [Wed, 3 Apr 2013 16:34:43 +0000]
Merge branch 'rr/prompt-revert-head'

The prompt string generator did not notice when we are in a middle
of a "git revert" session.

* rr/prompt-revert-head:
  bash: teach __git_ps1 about REVERT_HEAD

20 months agoMerge branch 'jm/branch-rename-nothing-error'
Junio C Hamano [Wed, 3 Apr 2013 16:34:40 +0000]
Merge branch 'jm/branch-rename-nothing-error'

"git branch -m" without any argument noticed an error, but with an
incorrect error message.

* jm/branch-rename-nothing-error:
  branch: give better message when no names specified for rename

20 months agoMerge branch 'js/iterm-is-on-osx'
Junio C Hamano [Wed, 3 Apr 2013 16:34:37 +0000]
Merge branch 'js/iterm-is-on-osx'

Add more logic to detect graphic environment of OS X by simply
checking TERM_PROGRAM has some value, not Apple_Terminal, to detect
iTerm.app and any other.

* js/iterm-is-on-osx:
  git-web--browse: recognize any TERM_PROGRAM as a GUI terminal on OS X

20 months agoMerge branch 'jk/check-corrupt-objects-carefully'
Junio C Hamano [Wed, 3 Apr 2013 16:34:28 +0000]
Merge branch 'jk/check-corrupt-objects-carefully'

Have the streaming interface and other codepaths more carefully
examine for corrupt objects.

* jk/check-corrupt-objects-carefully:
  clone: leave repo in place after checkout errors
  clone: run check_everything_connected
  clone: die on errors from unpack_trees
  add tests for cloning corrupted repositories
  streaming_write_entry: propagate streaming errors
  add test for streaming corrupt blobs
  avoid infinite loop in read_istream_loose
  read_istream_filtered: propagate read error from upstream
  check_sha1_signature: check return value from read_istream
  stream_blob_to_fd: detect errors reading from stream

20 months agoMerge branch 'jc/apply-ws-fix-tab-in-indent'
Junio C Hamano [Wed, 3 Apr 2013 16:34:22 +0000]
Merge branch 'jc/apply-ws-fix-tab-in-indent'

"git apply --whitespace=fix" was not prepared to see a line getting
longer after fixing whitespaces (e.g. tab-in-indent aka Python).

* jc/apply-ws-fix-tab-in-indent:
  test: resurrect q_to_tab
  apply --whitespace=fix: avoid running over the postimage buffer

20 months agoMerge branch 'jk/difftool-no-overwrite-on-copyback'
Junio C Hamano [Wed, 3 Apr 2013 16:34:09 +0000]
Merge branch 'jk/difftool-no-overwrite-on-copyback'

Try to be careful when difftool backend allows the user to write
into the temporary files being shown *and* the user makes changes
to the working tree at the same time. One of the changes has to be
lost in such a case, but at least tell the user what he did.

* jk/difftool-no-overwrite-on-copyback:
  t7800: run --dir-diff tests with and without symlinks
  t7800: fix tests when difftool uses --no-symlinks
  t7800: don't hide grep output
  difftool: don't overwrite modified files
  t7800: move '--symlinks' specific test to the end

20 months agoMerge branch 'jc/directory-attrs-regression-fix'
Junio C Hamano [Wed, 3 Apr 2013 16:34:04 +0000]
Merge branch 'jc/directory-attrs-regression-fix'

Fix 1.8.1.x regression that stopped matching "dir" (without
trailing slash) to a directory "dir".

* jc/directory-attrs-regression-fix:
  t: check that a pattern without trailing slash matches a directory
  dir.c::match_pathname(): pay attention to the length of string parameters
  dir.c::match_pathname(): adjust patternlen when shifting pattern
  dir.c::match_basename(): pay attention to the length of string parameters
  attr.c::path_matches(): special case paths that end with a slash
  attr.c::path_matches(): the basename is part of the pathname

20 months agoMerge branch 'nd/checkout-paths-reduce-match-pathspec-calls'
Junio C Hamano [Wed, 3 Apr 2013 16:34:00 +0000]
Merge branch 'nd/checkout-paths-reduce-match-pathspec-calls'

Consolidate repeated pathspec matches on the same paths, while
fixing a bug in "git checkout dir/" code started from an unmerged
index.

* nd/checkout-paths-reduce-match-pathspec-calls:
  checkout: avoid unnecessary match_pathspec calls

20 months agoUpdate draft release notes to 1.8.2.1
Junio C Hamano [Wed, 3 Apr 2013 16:29:14 +0000]
Update draft release notes to 1.8.2.1

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

20 months agoMerge branch 'mg/gpg-interface-using-status' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:26:27 +0000]
Merge branch 'mg/gpg-interface-using-status' into maint

Verification of signed tags were not done correctly when not in C
or en/US locale.

* mg/gpg-interface-using-status:
  pretty: make %GK output the signing key for signed commits
  pretty: parse the gpg status lines rather than the output
  gpg_interface: allow to request status return
  log-tree: rely upon the check in the gpg_interface
  gpg-interface: check good signature in a reliable way

20 months agoMerge branch 'bc/commit-complete-lines-given-via-m-option' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:26:07 +0000]
Merge branch 'bc/commit-complete-lines-given-via-m-option' into maint

'git commit -m "$msg"' used to add an extra newline even when
$msg already ended with one.

* bc/commit-complete-lines-given-via-m-option:
  Documentation/git-commit.txt: rework the --cleanup section
  git-commit: only append a newline to -m mesg if necessary
  t7502: demonstrate breakage with a commit message with trailing newlines
  t/t7502: compare entire commit message with what was expected

20 months agoMerge branch 'jc/describe' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:25:52 +0000]
Merge branch 'jc/describe' into maint

The "--match=<pattern>" option of "git describe", when used with
"--all" to allow refs that are not annotated tags to be used as a
base of description, did not restrict the output from the command to
those that match the given pattern.

* jc/describe:
  describe: --match=<pattern> must limit the refs even when used with --all

20 months agoMerge branch 'jk/alias-in-bare' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:25:41 +0000]
Merge branch 'jk/alias-in-bare' into maint

An aliased command spawned from a bare repository that does not say
it is bare with "core.bare = yes" is treated as non-bare by mistake.

* jk/alias-in-bare:
  setup: suppress implicit "." work-tree for bare repos
  environment: add GIT_PREFIX to local_repo_env
  cache.h: drop LOCAL_REPO_ENV_SIZE

20 months agoMerge branch 'ks/rfc2047-one-char-at-a-time' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:25:29 +0000]
Merge branch 'ks/rfc2047-one-char-at-a-time' into maint

When "format-patch" quoted a non-ascii strings on the header files,
it incorrectly applied rfc2047 and chopped a single character in the
middle of it.

* ks/rfc2047-one-char-at-a-time:
  format-patch: RFC 2047 says multi-octet character may not be split

20 months agoMerge branch 'jk/empty-archive' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:25:15 +0000]
Merge branch 'jk/empty-archive' into maint

"git archive" reports a failure when asked to create an archive out
of an empty tree.  It would be more intuitive to give an empty
archive back in such a case.

* jk/empty-archive:
  archive: handle commits with an empty tree
  test-lib: factor out $GIT_UNZIP setup

20 months agoMerge branch 'ph/tag-force-no-warn-on-creation' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:24:51 +0000]
Merge branch 'ph/tag-force-no-warn-on-creation' into maint

"git tag -f <tag>" always said "Updated tag '<tag>'" even when
creating a new tag (i.e. not overwriting nor updating).

* ph/tag-force-no-warn-on-creation:
  tag: --force does not have to warn when creating tags

20 months agoMerge branch 'lf/setup-prefix-pathspec' into maint
Junio C Hamano [Wed, 3 Apr 2013 16:24:18 +0000]
Merge branch 'lf/setup-prefix-pathspec' into maint

"git cmd -- ':(top'" was not diagnosed as an invalid syntax, and
instead the parser kept reading beyond the end of the string.

* lf/setup-prefix-pathspec:
  setup.c: check that the pathspec magic ends with ")"
  setup.c: stop prefix_pathspec() from looping past the end of string

20 months agoSync with 1.8.1 maintenance track
Junio C Hamano [Wed, 3 Apr 2013 16:18:01 +0000]
Sync with 1.8.1 maintenance track

* maint-1.8.1:
  Start preparing for 1.8.1.6
  git-tag(1): we tag HEAD by default
  Fix revision walk for commits with the same dates
  t2003: work around path mangling issue on Windows
  pack-refs: add fully-peeled trait
  pack-refs: write peeled entry for non-tags
  use parse_object_or_die instead of die("bad object")
  avoid segfaults on parse_object failure
  entry: fix filter lookup
  t2003: modernize style
  name-hash.c: fix endless loop with core.ignorecase=true

20 months agoStart preparing for 1.8.1.6
Junio C Hamano [Wed, 3 Apr 2013 16:12:11 +0000]
Start preparing for 1.8.1.6

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

20 months agoMerge branch 'kb/name-hash' into maint-1.8.1
Junio C Hamano [Wed, 3 Apr 2013 15:44:54 +0000]
Merge branch 'kb/name-hash' into maint-1.8.1

* kb/name-hash:
  name-hash.c: fix endless loop with core.ignorecase=true