git.git
12 years agoMerge branch 'maint' of https://github.com/git-l10n/git-po
Junio C Hamano [Wed, 2 May 2012 04:09:46 +0000 (21:09 -0700)]
Merge branch 'maint' of https://github.com/git-l10n/git-po

By Byrial Jensen (2) and others
via Jiang Xin (1) and Ralf Thielow (1)
* 'maint' of https://github.com/git-l10n/git-po:
  l10n: Initial German translation
  l10n: Update Simplified Chinese translation
  l10n: Update git.pot (2 new messages)
  l10n: Add the German translation team and initialize de.po
  l10n: Add Danish team (da) to list of teams
  l10n: New da.po file with 0 translations
  l10n: Updated pt_PT language

12 years agol10n: Initial German translation
Ralf Thielow [Mon, 30 Apr 2012 15:55:16 +0000 (17:55 +0200)]
l10n: Initial German translation

Helped-by: Thomas Kuchs
Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
12 years agol10n: Update Simplified Chinese translation
Jiang Xin [Sat, 28 Apr 2012 14:42:41 +0000 (22:42 +0800)]
l10n: Update Simplified Chinese translation

Translate 2 new messages come from git maint branch.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agol10n: Update git.pot (2 new messages)
Jiang Xin [Sat, 28 Apr 2012 12:35:24 +0000 (20:35 +0800)]
l10n: Update git.pot (2 new messages)

Changes of po/git.pot from v1.7.10 to v1.7.10-55-g868d6

 * 2 new l10n messages at lines: 1583, 2730

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoMerge maint branch for tracking l10n updates of git stable version
Jiang Xin [Sat, 28 Apr 2012 12:30:50 +0000 (20:30 +0800)]
Merge maint branch for tracking l10n updates of git stable version

Use master branch to track l10n updates for git next release, while
use maint branch to track l10n updates for git stable version.

12 years agol10n: Add the German translation team and initialize de.po
Ralf Thielow [Thu, 26 Apr 2012 06:59:41 +0000 (08:59 +0200)]
l10n: Add the German translation team and initialize de.po

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoStart preparing for 1.7.10.1
Junio C Hamano [Thu, 26 Apr 2012 17:40:08 +0000 (10:40 -0700)]
Start preparing for 1.7.10.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/run-command-eacces' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:51:40 +0000 (10:51 -0700)]
Merge branch 'jk/run-command-eacces' into maint

When PATH contains an unreadable directory, alias expansion code did
not kick in, and failed with an error that said "git-subcmd" was not
found.

By Jeff King (1) and Ramsay Jones (1)
* jk/run-command-eacces:
  run-command: treat inaccessible directories as ENOENT
  compat/mingw.[ch]: Change return type of exec functions to int

12 years agoMerge branch 'jc/push-upstream-sanity' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:51:18 +0000 (10:51 -0700)]
Merge branch 'jc/push-upstream-sanity' into maint

The 'push to upstream' implementation was broken in some corner
cases. "git push $there" without refspec, when the current branch is
set to push to a remote different from $there, used to push to $there
using the upstream information to a remote unreleated to $there.

* jc/push-upstream-sanity:
  push: error out when the "upstream" semantics does not make sense

12 years agoMerge branch 'jc/maint-clean-nested-worktree-in-subdir' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:35:42 +0000 (10:35 -0700)]
Merge branch 'jc/maint-clean-nested-worktree-in-subdir' into maint

"git clean -d -f" (not "-d -f -f") is supposed to protect nested
working trees of independent git repositories that exist in the
current project working tree from getting removed, but the protection
applied only to such working trees that are at the top-level of the
current project by mistake.

* jc/maint-clean-nested-worktree-in-subdir:
  clean: preserve nested git worktree in subdirectories

12 years agoMerge branch 'jk/diff-no-rename-empty' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:35:33 +0000 (10:35 -0700)]
Merge branch 'jk/diff-no-rename-empty' into maint

Rename detection logic used to match two empty files as renames during
merge-recursive, leading unnatural mismerges.

By Jeff King
* jk/diff-no-rename-empty:
  merge-recursive: don't detect renames of empty files
  teach diffcore-rename to optionally ignore empty content
  make is_empty_blob_sha1 available everywhere
  drop casts from users EMPTY_TREE_SHA1_BIN

12 years agoMerge branch 'rs/combine-diff-zero-context-at-the-beginning' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:35:25 +0000 (10:35 -0700)]
Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into maint

An age-old corner case bug in combine diff (only triggered with -U0
and the hunk at the beginning of the file needs to be shown) has been
fixed.

By René Scharfe
* rs/combine-diff-zero-context-at-the-beginning:
  combine-diff: fix loop index underflow

12 years agoMerge branch 'jc/commit-unedited-template' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:35:15 +0000 (10:35 -0700)]
Merge branch 'jc/commit-unedited-template' into maint

When "git commit --template F" errors out because the user did not
touch the message, it claimed that it aborts due to "empty message",
which was utterly wrong.

By Junio C Hamano (4) and Adam Monsen (1)
* jc/commit-unedited-template:
  Documentation/git-commit: rephrase the "initial-ness" of templates
  git-commit.txt: clarify -t requires editing message
  commit: rephrase the error when user did not touch templated log message
  commit: do not trigger bogus "has templated message edited" check
  t7501: test the right kind of breakage

12 years agoMerge branch 'jk/add-p-skip-conflicts' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:35:07 +0000 (10:35 -0700)]
Merge branch 'jk/add-p-skip-conflicts' into maint

"git add -p" is not designed to deal with unmerged paths but did
not exclude them and tried to apply funny patches only to fail.

By Jeff King
* jk/add-p-skip-conflicts:
  add--interactive: ignore unmerged entries in patch mode

12 years agoMerge branch 'jc/commit-hook-authorship' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:34:53 +0000 (10:34 -0700)]
Merge branch 'jc/commit-hook-authorship' into maint

"git commit --author=$name" did not tell the name that was being
recorded in the resulting commit to hooks, even though it does do so
when the end user overrode the authorship via the "GIT_AUTHOR_NAME"
environment variable.

* jc/commit-hook-authorship:
  commit: pass author/committer info to hooks
  t7503: does pre-commit-hook learn authorship?
  ident.c: add split_ident_line() to parse formatted ident line

12 years agoMerge branch 'tr/maint-word-diff-regex-sticky' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:34:43 +0000 (10:34 -0700)]
Merge branch 'tr/maint-word-diff-regex-sticky' into maint

The regexp configured with diff.wordregex was incorrectly reused
across files.

By Thomas Rast (2) and Johannes Sixt (1)
* tr/maint-word-diff-regex-sticky:
  diff: tweak a _copy_ of diff_options with word-diff
  diff: refactor the word-diff setup from builtin_diff_cmd
  t4034: diff.*.wordregex should not be "sticky" in --word-diff

12 years agoMerge branch 'jh/notes-merge-in-git-dir-worktree' into maint
Junio C Hamano [Thu, 26 Apr 2012 17:32:55 +0000 (10:32 -0700)]
Merge branch 'jh/notes-merge-in-git-dir-worktree' into maint

Running "notes merge --commit" failed to perform correctly when run
from any directory inside $GIT_DIR/.  When "notes merge" stops with
conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits
to resolve it.

By Johan Herland (3) and Junio C Hamano (1)
* jh/notes-merge-in-git-dir-worktree:
  notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd
  notes-merge: use opendir/readdir instead of using read_directory()
  t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/
  remove_dir_recursively(): Add flag for skipping removal of toplevel dir

12 years agoSync with 1.7.9.7
Junio C Hamano [Thu, 26 Apr 2012 17:31:43 +0000 (10:31 -0700)]
Sync with 1.7.9.7

12 years agoGit 1.7.9.7 v1.7.9.7
Junio C Hamano [Thu, 26 Apr 2012 17:23:15 +0000 (10:23 -0700)]
Git 1.7.9.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with 1.7.8.6
Junio C Hamano [Thu, 26 Apr 2012 17:22:20 +0000 (10:22 -0700)]
Sync with 1.7.8.6

12 years agoGit 1.7.8.6 v1.7.8.6
Junio C Hamano [Thu, 26 Apr 2012 16:59:22 +0000 (09:59 -0700)]
Git 1.7.8.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with 1.7.7.7
Junio C Hamano [Thu, 26 Apr 2012 16:52:33 +0000 (09:52 -0700)]
Sync with 1.7.7.7

12 years agoGit 1.7.7.7 v1.7.7.7
Junio C Hamano [Thu, 26 Apr 2012 16:41:52 +0000 (09:41 -0700)]
Git 1.7.7.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobundle: remove stray single-quote from error message
Jonathan Nieder [Thu, 26 Apr 2012 05:53:59 +0000 (00:53 -0500)]
bundle: remove stray single-quote from error message

After running rev-list --boundary to retrieve the list of boundary
commits, "git bundle create" runs its own revision walk.  If in this
stage git encounters an unfamiliar option, it writes a message with an
unbalanced quotation mark:

error: unrecognized argument: --foo'

Drop the stray quote to match the "unrecognized argument: %s" message
used elsewhere and save translators some work.

This is mostly a futureproofing measure: for now, the "rev-list
--boundary" command catches most strange arguments on its own and the
above message is not seen unless you try something esoteric like "git
bundle create test.bundle --header HEAD".

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agol10n: Add Danish team (da) to list of teams
Byrial Jensen [Wed, 11 Apr 2012 00:11:12 +0000 (02:11 +0200)]
l10n: Add Danish team (da) to list of teams

12 years agol10n: New da.po file with 0 translations
Byrial Jensen [Tue, 10 Apr 2012 16:50:59 +0000 (18:50 +0200)]
l10n: New da.po file with 0 translations

12 years agol10n: Updated pt_PT language
Marco Sousa [Tue, 10 Apr 2012 22:04:30 +0000 (00:04 +0200)]
l10n: Updated pt_PT language

12 years agoMerge branch 'maint-1.7.9' into maint
Junio C Hamano [Tue, 10 Apr 2012 19:44:58 +0000 (12:44 -0700)]
Merge branch 'maint-1.7.9' into maint

* maint-1.7.9:

12 years agoMerge branch 'maint-1.7.8' into maint-1.7.9
Junio C Hamano [Tue, 10 Apr 2012 19:44:45 +0000 (12:44 -0700)]
Merge branch 'maint-1.7.8' into maint-1.7.9

* maint-1.7.8:
  Documentation/gitweb: trivial English fixes
  fetch/receive: remove over-pessimistic connectivity check

12 years agotest-subprocess: fix segfault without arguments
René Scharfe [Tue, 10 Apr 2012 19:07:34 +0000 (21:07 +0200)]
test-subprocess: fix segfault without arguments

Check if we even have a parameter before checking its value.  Running
this command without any arguments may not make a lot of sense, but
reacting with a segmentation fault is unduly harsh.

While we're at it, avoid casting argv by declaring it const right away.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agosubmodule: fix prototype of gitmodules_config
René Scharfe [Tue, 10 Apr 2012 19:10:26 +0000 (21:10 +0200)]
submodule: fix prototype of gitmodules_config

Add void to make it match its definition in submodule.c.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-verify-objects-remove-pessimism' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:43:16 +0000 (13:43 -0700)]
Merge branch 'jc/maint-verify-objects-remove-pessimism' into maint-1.7.8

* jc/maint-verify-objects-remove-pessimism:
  fetch/receive: remove over-pessimistic connectivity check

12 years agoMerge branch 'dw/gitweb-doc-grammo' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:42:56 +0000 (13:42 -0700)]
Merge branch 'dw/gitweb-doc-grammo' into maint-1.7.8

* dw/gitweb-doc-grammo:
  Documentation/gitweb: trivial English fixes

12 years agoMerge branch 'tr/cache-tree' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:40:32 +0000 (13:40 -0700)]
Merge branch 'tr/cache-tree' into maint-1.7.8

* tr/cache-tree:
  t0090: be prepared that 'wc -l' writes leading blanks
  reset: update cache-tree data when appropriate
  commit: write cache-tree data when writing index anyway
  Refactor cache_tree_update idiom from commit
  Test the current state of the cache-tree optimization
  Add test-scrap-cache-tree

12 years agoMerge branch 'cb/maint-t5541-make-server-port-portable' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:38:41 +0000 (13:38 -0700)]
Merge branch 'cb/maint-t5541-make-server-port-portable' into maint-1.7.8

* cb/maint-t5541-make-server-port-portable:
  t5541: check error message against the real port number used
  remote-curl: Fix push status report when all branches fail

12 years agoMerge branch 'cn/maint-rev-list-doc' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:36:44 +0000 (13:36 -0700)]
Merge branch 'cn/maint-rev-list-doc' into maint-1.7.8

* cn/maint-rev-list-doc:
  Documentation: use {asterisk} in rev-list-options.txt when needed

12 years agoMerge branch 'tr/maint-bundle-boundary' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:36:26 +0000 (13:36 -0700)]
Merge branch 'tr/maint-bundle-boundary' into maint-1.7.8

* tr/maint-bundle-boundary:
  bundle: keep around names passed to add_pending_object()
  t5510: ensure we stay in the toplevel test dir
  t5510: refactor bundle->pack conversion

12 years agoMerge branch 'tr/maint-bundle-long-subject' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:36:20 +0000 (13:36 -0700)]
Merge branch 'tr/maint-bundle-long-subject' into maint-1.7.8

* tr/maint-bundle-long-subject:
  t5704: match tests to modern style
  strbuf: improve strbuf_get*line documentation
  bundle: use a strbuf to scan the log for boundary commits
  bundle: put strbuf_readline_fd in strbuf.c with adjustments

12 years agoMerge branch 'ph/rerere-doc' into maint-1.7.8
Junio C Hamano [Mon, 9 Apr 2012 20:34:09 +0000 (13:34 -0700)]
Merge branch 'ph/rerere-doc' into maint-1.7.8

* ph/rerere-doc:
  rerere: Document 'rerere remaining'

12 years agoGit 1.7.10 v1.7.10
Junio C Hamano [Fri, 6 Apr 2012 17:47:58 +0000 (10:47 -0700)]
Git 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agospec: add missing build dependency
Felipe Contreras [Fri, 6 Apr 2012 12:22:30 +0000 (15:22 +0300)]
spec: add missing build dependency

Otherwise:

/usr/bin/perl Makefile.PL PREFIX='/opt/git' INSTALL_BASE=''
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: ...) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorun-command: treat inaccessible directories as ENOENT
Jeff King [Fri, 30 Mar 2012 07:52:18 +0000 (03:52 -0400)]
run-command: treat inaccessible directories as ENOENT

When execvp reports EACCES, it can be one of two things:

  1. We found a file to execute, but did not have
     permissions to do so.

  2. We did not have permissions to look in some directory
     in the $PATH.

In the former case, we want to consider this a
permissions problem and report it to the user as such (since
getting this for something like "git foo" is likely a
configuration error).

In the latter case, there is a good chance that the
inaccessible directory does not contain anything of
interest. Reporting "permission denied" is confusing to the
user (and prevents our usual "did you mean...?" lookup). It
also prevents git from trying alias lookup, since we do so
only when an external command does not exist (not when it
exists but has an error).

This patch detects EACCES from execvp, checks whether we are
in case (2), and if so converts errno to ENOENT. This
behavior matches that of "bash" (but not of simpler shells
that use execvp more directly, like "dash").

Test stolen from Junio.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompat/mingw.[ch]: Change return type of exec functions to int
Ramsay Jones [Thu, 5 Apr 2012 17:48:46 +0000 (18:48 +0100)]
compat/mingw.[ch]: Change return type of exec functions to int

The POSIX standard specifies a return type of int for all six exec
functions. In addition, all exec functions return -1 on error, and
simply do not return on success. However, the current emulation of
the exec functions on mingw are declared with a void return type.

This would cause a problem should any code attempt to call the
exec function in a non-void context. In particular, if an exec
function were used in a conditional it would fail to compile.

In order to improve the fidelity of the emulation, we change the
return type of the mingw_execv[p] functions to int and return -1
on error.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopush: error out when the "upstream" semantics does not make sense
Junio C Hamano [Fri, 30 Mar 2012 23:07:12 +0000 (16:07 -0700)]
push: error out when the "upstream" semantics does not make sense

The user can say "git push" without specifying any refspec.  When using
the "upstream" semantics via the push.default configuration, the user
wants to update the "upstream" branch of the current branch, which is the
branch at a remote repository the current branch is set to integrate with,
with this command.

However, there are cases that such a "git push" that uses the "upstream"
semantics does not make sense:

 - The current branch does not have branch.$name.remote configured.  By
   definition, "git push" that does not name where to push to will not
   know where to push to.  The user may explicitly say "git push $there",
   but again, by definition, no branch at repository $there is set to
   integrate with the current branch in this case and we wouldn't know
   which remote branch to update.

 - The current branch does have branch.$name.remote configured, but it
   does not specify branch.$name.merge that names what branch at the
   remote this branch integrates with. "git push" knows where to push in
   this case (or the user may explicitly say "git push $remote" to tell us
   where to push), but we do not know which remote branch to update.

 - The current branch does have its remote and upstream branch configured,
   but the user said "git push $there", where $there is not the remote
   named by "branch.$name.remote".  By definition, no branch at repository
   $there is set to integrate with the current branch in this case, and
   this push is not meant to update any branch at the remote repository
   $there.

The first two cases were already checked correctly, but the third case was
not checked and we ended up updating the branch named branch.$name.merge
at repository $there, which was totally bogus.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoadd--interactive: ignore unmerged entries in patch mode
Jeff King [Thu, 5 Apr 2012 12:30:08 +0000 (08:30 -0400)]
add--interactive: ignore unmerged entries in patch mode

When "add -p" sees an unmerged entry, it shows the combined
diff and then immediately skips the hunk. This can be
confusing in a variety of ways, depending on whether there
are other changes to stage (in which case you get the
superfluous combined diff output in between other hunks) or
not (in which case you get the combined diff and the program
exits immediately, rather than seeing "No changes").

The current behavior was not planned, and is just what the
implementation happens to do. Instead, let's explicitly
remove unmerged entries from our list of modified files, and
print a warning that we are ignoring them.

We can cheaply find which entries are unmerged by adding
"--raw" output to the "diff-files --numstat" we already run.
There is one non-obvious thing we must change when parsing
this combined output. Before this patch, when we saw a
numstat line for a file that did not have index changes, we
would create a new record with 'unchanged' in the 'INDEX'
field.  Because "--raw" comes before "--numstat", we must
move this special-case down to the raw-line case (and it is
sufficient to move it rather than handle it in both places,
since any file which has a --numstat will also have a --raw
entry).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation/git-commit: rephrase the "initial-ness" of templates
Junio C Hamano [Tue, 3 Apr 2012 23:41:21 +0000 (16:41 -0700)]
Documentation/git-commit: rephrase the "initial-ness" of templates

The description of "commit -t <file>" said the file is used "as the
initial version" of the commit message, but in the context of an SCM,
"version" is a loaded word that can needlesslyl confuse readers.

Explain the purpose of the mechanism without using "version".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.10-rc4 v1.7.10-rc4
Junio C Hamano [Tue, 3 Apr 2012 16:25:49 +0000 (09:25 -0700)]
Git 1.7.10-rc4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'pt/gitk'
Junio C Hamano [Mon, 2 Apr 2012 22:06:25 +0000 (15:06 -0700)]
Merge branch 'pt/gitk'

* pt/gitk:
  gitk: fix setting font display with new tabbed dialog layout.
  gitk: fix tabbed preferences construction when using tcl 8.4

12 years agoSync with 1.7.9.6
Junio C Hamano [Mon, 2 Apr 2012 20:09:21 +0000 (13:09 -0700)]
Sync with 1.7.9.6

12 years agoGit 1.7.9.6 v1.7.9.6
Junio C Hamano [Mon, 2 Apr 2012 20:07:58 +0000 (13:07 -0700)]
Git 1.7.9.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-merge-autoedit' into maint
Junio C Hamano [Mon, 2 Apr 2012 19:56:35 +0000 (12:56 -0700)]
Merge branch 'jc/maint-merge-autoedit' into maint

* jc/maint-merge-autoedit:
  merge: backport GIT_MERGE_AUTOEDIT support

12 years agogitk: fix setting font display with new tabbed dialog layout.
Pat Thoyts [Sun, 1 Apr 2012 22:00:52 +0000 (23:00 +0100)]
gitk: fix setting font display with new tabbed dialog layout.

The changes to the dialog window tree broke the preview of the selected
font on the button. This corrects that issue.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitk: fix tabbed preferences construction when using tcl 8.4
Pat Thoyts [Sun, 1 Apr 2012 22:00:51 +0000 (23:00 +0100)]
gitk: fix tabbed preferences construction when using tcl 8.4

In 8.5 the incr command creates the target variable if it does not exist
but in 8.4 using incr on a non-existing variable raises an error. Ensure
we have created our counter variable when creating the tabbed dialog for
non-themed preferences.

Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 2 Apr 2012 16:19:47 +0000 (09:19 -0700)]
Merge git://github.com/git-l10n/git-po

Portuguese Portuguese translations from Marco Sousa via Jiang Xin

* 'master' of git://github.com/git-l10n/git-po:
  l10n: Add the Dutch translation team and initialize nl.po
  l10n: Inital Portuguese Portugal language (pt_PT)
  l10n: Improve zh_CN translation for Git 1.7.10-rc3

12 years agol10n: Add the Dutch translation team and initialize nl.po
Vincent van Ravesteijn [Mon, 2 Apr 2012 12:14:08 +0000 (14:14 +0200)]
l10n: Add the Dutch translation team and initialize nl.po

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
12 years agol10n: Inital Portuguese Portugal language (pt_PT)
Marco Sousa [Sat, 31 Mar 2012 15:51:45 +0000 (17:51 +0200)]
l10n: Inital Portuguese Portugal language (pt_PT)

Signed-off-by: Marco Sousa <marcomsousa@gmail.com>
12 years agogit-commit.txt: clarify -t requires editing message
Adam Monsen [Sat, 31 Mar 2012 19:28:15 +0000 (12:28 -0700)]
git-commit.txt: clarify -t requires editing message

Make it clear that, when using commit --template, the message *must* be
changed or the commit will be aborted.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Ivan Heffner <iheffner@gmail.com>
Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Sat, 31 Mar 2012 03:25:55 +0000 (20:25 -0700)]
Merge branch 'maint'

* maint:
  string-list: document that string_list_insert() inserts unique strings

12 years agocommit: rephrase the error when user did not touch templated log message
Junio C Hamano [Fri, 30 Mar 2012 19:14:33 +0000 (12:14 -0700)]
commit: rephrase the error when user did not touch templated log message

When the user exited editor without editing the commit log template given
by "git commit -t <template>", the commit was aborted (correct) with an
error message that said "due to empty commit message" (incorrect).

This was because the original template support was done by piggybacking on
the check to detect an empty log message.  Split the codepaths into two
independent checks to clarify the error.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocommit: do not trigger bogus "has templated message edited" check
Junio C Hamano [Fri, 30 Mar 2012 18:30:59 +0000 (11:30 -0700)]
commit: do not trigger bogus "has templated message edited" check

When "-t template" and "-F msg" options are both given (or worse yet,
there is "commit.template" configuration but a message is given in some
other way), the documentation says that template is ignored.  However,
the "has the user edited the message?" check still used the contents of
the template file as the basis of the emptyness check.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot7501: test the right kind of breakage
Junio C Hamano [Fri, 30 Mar 2012 18:04:08 +0000 (11:04 -0700)]
t7501: test the right kind of breakage

These tests try to run "git commit" with various "forbidden" combinations
of options and expect the command to fail, but they do so without having
any change added to the index.  We wouldn't be able to catch breakages
that would allow these combinations by mistake with them because the
command will fail with "nothing to commit" anyway.

Make sure we have something added to the index before running the command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agostring-list: document that string_list_insert() inserts unique strings
Heiko Voigt [Thu, 29 Mar 2012 07:21:22 +0000 (09:21 +0200)]
string-list: document that string_list_insert() inserts unique strings

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agol10n: Improve zh_CN translation for Git 1.7.10-rc3
Jiang Xin [Fri, 30 Mar 2012 02:55:34 +0000 (10:55 +0800)]
l10n: Improve zh_CN translation for Git 1.7.10-rc3

Improvements of zh_CN translations:

 - Update translation for msg "Changes not staged for commit:".
 - Remove unnecessary leading spaces for some messages.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoconfig: remove useless assignment
René Scharfe [Wed, 28 Mar 2012 20:18:37 +0000 (22:18 +0200)]
config: remove useless assignment

v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced
config_exclusive_filename with given_config_file.  In one case this
resulted in a self-assignment, which is reported by clang as a warning.
Remove the useless code.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.10-rc3 v1.7.10-rc3
Junio C Hamano [Wed, 28 Mar 2012 17:51:00 +0000 (10:51 -0700)]
Git 1.7.10-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocorrect a few doubled-word nits in comments and documentation
Jim Meyering [Wed, 28 Mar 2012 08:45:36 +0000 (10:45 +0200)]
correct a few doubled-word nits in comments and documentation

Found by running this command:
$ git ls-files -z|xargs -0 perl -0777 -n \
 -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \
 -e '  {' \
 -e '    $n = ($` =~ tr/\n/\n/ + 1);' \
 -e '    ($v = $&) =~ s/\n/\\n/g;' \
 -e '    print "$ARGV:$n:$v\n";' \
 -e '  }'

Why not just git grep -E ...?
That wouldn't work then the doubled words are separated by a newline.
This is derived from a Makefile syntax-check rule in gnulib's maint.mk:
  http://git.sv.gnu.org/cgit/gnulib.git/tree/top/maint.mk

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocorrect spelling: an URL -> a URL
Jim Meyering [Wed, 28 Mar 2012 08:41:54 +0000 (10:41 +0200)]
correct spelling: an URL -> a URL

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agol10n updates for Git 1.7.10-rc1
Junio C Hamano [Tue, 27 Mar 2012 15:39:18 +0000 (08:39 -0700)]
l10n updates for Git 1.7.10-rc1

* 'master' of git://github.com/git-l10n/git-po:
  Add url of Swedish l10n team in TEAMS file
  l10n: Review zh_CN translation for Git 1.7.10-rc1
  Update Swedish translation (724t0f0u).
  l10n: Update zh_CN translation for Git 1.7.10-rc1
  l10n: Update git.pot (1 new message)

12 years agotests: unset COLUMNS inherited from environment
Zbigniew Jędrzejewski-Szmek [Tue, 27 Mar 2012 06:22:02 +0000 (08:22 +0200)]
tests: unset COLUMNS inherited from environment

$COLUMNS must be unset to not interfere with the tests. The tests
already ignore the terminal size because output is redirected to a
file, but COLUMNS overrides terminal size detection and changes the
test output away from the standard 80.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoAdd url of Swedish l10n team in TEAMS file
Jiang Xin [Tue, 27 Mar 2012 09:11:34 +0000 (17:11 +0800)]
Add url of Swedish l10n team in TEAMS file

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agol10n: Review zh_CN translation for Git 1.7.10-rc1
Jiang Xin [Tue, 27 Mar 2012 06:46:11 +0000 (14:46 +0800)]
l10n: Review zh_CN translation for Git 1.7.10-rc1

Overall review of the zh_CN translation:

 - Distinguish the translations of index and stage, though they are the
   same thing.

 - Many other fixes, e.g., add the lost periods at the end of translated
   sentences.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoUpdate Swedish translation (724t0f0u).
Peter Krefting [Thu, 15 Mar 2012 09:47:06 +0000 (10:47 +0100)]
Update Swedish translation (724t0f0u).

- Update for 1.7.10-rc1.
- Add a missing -e when generaring the "Untracked files" message.
- Fixed some wordings after playing with the localized version.

12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Mon, 26 Mar 2012 19:38:34 +0000 (12:38 -0700)]
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with 1.7.9.5
Junio C Hamano [Mon, 26 Mar 2012 19:30:51 +0000 (12:30 -0700)]
Sync with 1.7.9.5

12 years agoGit 1.7.9.5 v1.7.9.5
Junio C Hamano [Mon, 26 Mar 2012 19:23:34 +0000 (12:23 -0700)]
Git 1.7.9.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jn/maint-fast-import-empty-ls' into maint
Junio C Hamano [Mon, 26 Mar 2012 19:10:25 +0000 (12:10 -0700)]
Merge branch 'jn/maint-fast-import-empty-ls' into maint

* jn/maint-fast-import-empty-ls:
  fast-import: don't allow 'ls' of path with empty components
  fast-import: leakfix for 'ls' of dirty trees

12 years agoMerge branch 'ph/rerere-doc' into maint
Junio C Hamano [Mon, 26 Mar 2012 19:10:12 +0000 (12:10 -0700)]
Merge branch 'ph/rerere-doc' into maint

* ph/rerere-doc:
  rerere: Document 'rerere remaining'

12 years agoMerge branch 'ms/maint-config-error-at-eol-linecount' into maint
Junio C Hamano [Mon, 26 Mar 2012 19:10:05 +0000 (12:10 -0700)]
Merge branch 'ms/maint-config-error-at-eol-linecount' into maint

* ms/maint-config-error-at-eol-linecount:
  config: report errors at the EOL with correct line number

12 years agogrep doc: add --break / --heading / -W to synopsis
Mark Lodato [Mon, 26 Mar 2012 02:41:42 +0000 (22:41 -0400)]
grep doc: add --break / --heading / -W to synopsis

All of the other options were included in the synopsis, so it makes
sense to include these as well.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: improve description of GIT_EDITOR and preference order
Rodrigo Silva (MestreLion) [Fri, 23 Mar 2012 12:38:42 +0000 (12:38 +0000)]
Documentation: improve description of GIT_EDITOR and preference order

Previously GIT_EDITOR was not listed in git(1) "Environment Variables" section,
which could be very confusing to users. Include it in "other" subsection along
with a link to git-var(1), since that is the page that fully describes all
places where editor can be set and also their preference order.

Also, git-var(1) did not say that hardcoded fallback 'vi' may have been changed
at build time. A user could be puzzled if 'nano' pops up even when none of the
mentioned environment vars or config.editor are set. Clarify this.

Ideally, the build system should be changed to reflect the chosen fallback
editor when creating the man pages. Not sure if that is even possible though.

Signed-off-by: Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodocumentation: fix alphabetic ordered list for git-rebase man page
Nelson Benitez Leon [Fri, 23 Mar 2012 11:31:39 +0000 (12:31 +0100)]
documentation: fix alphabetic ordered list for git-rebase man page

An alphabetic ordered list (a.) is converted to numerical in
the man page (1.) so context comments naming 'a' were confusing,
fix that by not using ordered list notation for 'a' anb 'b' items.

Signed-off-by: Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocombine-diff: fix loop index underflow
René Scharfe [Sat, 24 Mar 2012 15:18:46 +0000 (16:18 +0100)]
combine-diff: fix loop index underflow

If both la and context are zero at the start of the loop, la wraps around
and we end up reading from memory far away.  Skip the loop in that case
instead.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge gitk changes from Paul Mackerras at git://ozlabs.org/~paulus/gitk
Junio C Hamano [Sat, 24 Mar 2012 08:30:30 +0000 (01:30 -0700)]
Merge gitk changes from Paul Mackerras at git://ozlabs.org/~paulus/gitk

* git://ozlabs.org/~paulus/gitk:
  gitk: Teach gitk to respect log.showroot
  gitk: Add menu items for comparing a commit with the marked commit
  gitk: Speed up resolution of short SHA1 ids
  gitk: Use symbolic font names "sans" and "monospace" when available
  gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
  gitk: Make "git describe" output clickable, too
  gitk: Fix the display of files when filtered by path
  gitk: Use a tabbed dialog to edit preferences
  gitk: Use "gitk: repo-top-level-dir" as window title

12 years agogitk: Teach gitk to respect log.showroot
Marcus Karlsson [Tue, 4 Oct 2011 20:08:13 +0000 (22:08 +0200)]
gitk: Teach gitk to respect log.showroot

In early days, all projects managed by git (except for git itself) had the
product of a fairly mature development history in their first commit, and
it was deemed unnecessary clutter to show additions of these thousands of
paths as a patch.

"git log" learned to show the patch for the initial commit without requiring
--root command line option at 0f03ca9 (config option log.showroot to show
the diff of root commits, 2006-11-23).

Teach gitk to respect log.showroot.

[paulus@samba.org: Cleaned up the Tcl a bit, use --bool on the
 git config call]

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
12 years agoGit 1.7.10-rc2 v1.7.10-rc2
Junio C Hamano [Fri, 23 Mar 2012 21:50:23 +0000 (14:50 -0700)]
Git 1.7.10-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years ago.mailmap: unify various old mail addresses of gitster
Junio C Hamano [Fri, 23 Mar 2012 21:40:39 +0000 (14:40 -0700)]
.mailmap: unify various old mail addresses of gitster

"git shortlog -s -e" should show a single current address with this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'am/completion-zsh-fix'
Junio C Hamano [Fri, 23 Mar 2012 21:36:21 +0000 (14:36 -0700)]
Merge branch 'am/completion-zsh-fix'

* am/completion-zsh-fix:
  contrib/completion: "local var=()" is misinterpreted as func-decl by zsh

12 years agoMerge branch 'dw/gitweb-doc-grammo'
Junio C Hamano [Fri, 23 Mar 2012 21:36:13 +0000 (14:36 -0700)]
Merge branch 'dw/gitweb-doc-grammo'

Typofix.

* dw/gitweb-doc-grammo:
  Documentation/gitweb: trivial English fixes

12 years agomerge-recursive: don't detect renames of empty files
Jeff King [Thu, 22 Mar 2012 22:52:24 +0000 (18:52 -0400)]
merge-recursive: don't detect renames of empty files

Merge-recursive detects renames so that if one side modifies
"foo" and the other side moves it to "bar", the modification
is applied to "bar". However, our rename detection is based
on content analysis, it can be wrong (i.e., two files were
not intended as a rename, but just happen to have the same
or similar content).

This is quite rare if the files actually contain content,
since two unrelated files are unlikely to have exactly the
same content.  However, empty files present a problem, in
that there is nothing to analyze. An uninteresting
placeholder file with zero bytes may or may not be related
to a placeholder file with another name.

The result is that adding content to an empty file may cause
confusion if the other side of a merge removed it; your
content may end up in another random placeholder file that
was added.

Let's err on the side of caution and not consider empty
files as renames. This will cause a modify/delete conflict
on the merge, which will let the user sort it out
themselves.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoteach diffcore-rename to optionally ignore empty content
Jeff King [Thu, 22 Mar 2012 22:52:13 +0000 (18:52 -0400)]
teach diffcore-rename to optionally ignore empty content

Our rename detection is a heuristic, matching pairs of
removed and added files with similar or identical content.
It's unlikely to be wrong when there is actual content to
compare, and we already take care not to do inexact rename
detection when there is not enough content to produce good
results.

However, we always do exact rename detection, even when the
blob is tiny or empty. It's easy to get false positives with
an empty blob, simply because it is an obvious content to
use as a boilerplate (e.g., when telling git that an empty
directory is worth tracking via an empty .gitignore).

This patch lets callers specify whether or not they are
interested in using empty files as rename sources and
destinations. The default is "yes", keeping the original
behavior. It works by detecting the empty-blob sha1 for
rename sources and destinations.

One more flexible alternative would be to allow the caller
to specify a minimum size for a blob to be "interesting" for
rename detection. But that would catch small boilerplate
files, not large ones (e.g., if you had the GPL COPYING file
in many directories).

A better alternative would be to allow a "-rename"
gitattribute to allow boilerplate files to be marked as
such. I'll leave the complexity of that solution until such
time as somebody actually wants it. The complaints we've
seen so far revolve around empty files, so let's start with
the simple thing.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomake is_empty_blob_sha1 available everywhere
Jeff King [Thu, 22 Mar 2012 18:53:39 +0000 (14:53 -0400)]
make is_empty_blob_sha1 available everywhere

The read-cache implementation defines this static function,
but it is a generally useful concept in git. Let's give
the empty blob the same treatment as the empty tree,
providing both hex and binary forms of the sha1.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodrop casts from users EMPTY_TREE_SHA1_BIN
Jeff King [Thu, 22 Mar 2012 18:53:24 +0000 (14:53 -0400)]
drop casts from users EMPTY_TREE_SHA1_BIN

This macro already evaluates to the correct type, as it
casts the string literal to "unsigned char *" itself
(and callers who want the literal can use the _LITERAL
form).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation/gitweb: trivial English fixes
D Waitzman [Fri, 23 Mar 2012 15:02:43 +0000 (11:02 -0400)]
Documentation/gitweb: trivial English fixes

Change "it's" to "its" where a possessive is intended.  Also add two
missing "the" that were noticed by Ben Walton.

Signed-off-by: David Waitzman <djw@bbn.com>
12 years agogitk: Add menu items for comparing a commit with the marked commit
Paul Mackerras [Fri, 23 Mar 2012 11:07:27 +0000 (22:07 +1100)]
gitk: Add menu items for comparing a commit with the marked commit

Sometimes one wants to see the different between two commits that are
a long distance apart in the graph display.  This is difficult to do
with the "Diff this -> selected" and "Diff selected -> this" menu
items because the need to maintain the selection means that one can't
use the find facilities or the reference list window to navigate from
one to the other.

This provides an alternative using the mark.  Having found one commit,
one marks it with the "Mark this commit" menu item, then navigates to
the other commit and uses the new "Diff this -> marked commit" and/or
"Diff marked commit -> this" menu items.

Signed-off-by: Paul Mackerras <paulus@samba.org>
12 years agocontrib/completion: "local var=()" is misinterpreted as func-decl by zsh
Alex Merry [Thu, 1 Sep 2011 13:47:31 +0000 (14:47 +0100)]
contrib/completion: "local var=()" is misinterpreted as func-decl by zsh

Certain versions of zsh seems to treat

    local var=()

as a function declaration, rather than an assignment of an empty array,
although its documentation does not suggest that this should be the case.

With zsh 4.3.15 on Fedora Core 15, this causes

  __git_ps1 " (%s)"

to trigger an error message:

  local:2: command not found: svn_url_pattern

when GIT_PS1_SHOWUPSTREAM="auto".

Signed-off-by: Alex Merry <dev@randomguy3.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 20 Mar 2012 22:54:28 +0000 (15:54 -0700)]
Merge branch 'maint'

* maint:

12 years agoMerge branch 'maint-1.7.8' into maint
Junio C Hamano [Tue, 20 Mar 2012 22:53:30 +0000 (15:53 -0700)]
Merge branch 'maint-1.7.8' into maint

* maint-1.7.8:
  t/Makefile: Use $(sort ...) explicitly where needed
  gitweb: Fix actionless dispatch for non-existent objects
  i18n of multi-line advice messages

12 years agomerge: backport GIT_MERGE_AUTOEDIT support
Junio C Hamano [Tue, 20 Mar 2012 22:39:10 +0000 (15:39 -0700)]
merge: backport GIT_MERGE_AUTOEDIT support

Even though 1.7.9.x series does not open the editor by default
when merging in general, it does do so in one occassion: when
merging an annotated tag. And worse yet, there is no good way
for older scripts to decline this.

Backport the support for GIT_MERGE_AUTOEDIT environment variable
from 1.7.10 track to help those stuck on 1.7.9.x maintenance
track.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'ks/sort-wildcard-in-makefile' into maint-1.7.8
Junio C Hamano [Tue, 20 Mar 2012 22:26:19 +0000 (15:26 -0700)]
Merge branch 'ks/sort-wildcard-in-makefile' into maint-1.7.8

* ks/sort-wildcard-in-makefile:
  t/Makefile: Use $(sort ...) explicitly where needed

12 years agoMerge branch 'jc/advise-i18n' into maint-1.7.8
Junio C Hamano [Tue, 20 Mar 2012 22:25:38 +0000 (15:25 -0700)]
Merge branch 'jc/advise-i18n' into maint-1.7.8

* jc/advise-i18n:
  i18n of multi-line advice messages