git.git
11 years agoMerge branch 'jk/remote-helpers-doc'
Junio C Hamano [Thu, 7 Feb 2013 22:41:45 +0000 (14:41 -0800)]
Merge branch 'jk/remote-helpers-doc'

"git help remote-helpers" did not work; 'remote-helpers' is not
a subcommand name but a concept, so its documentation should have
been in gitremote-helpers, not git-remote-helpers.

* jk/remote-helpers-doc:
  Rename {git- => git}remote-helpers.txt

11 years agoMerge branch 'sb/run-command-fd-error-reporting'
Junio C Hamano [Thu, 7 Feb 2013 22:41:42 +0000 (14:41 -0800)]
Merge branch 'sb/run-command-fd-error-reporting'

* sb/run-command-fd-error-reporting:
  run-command: be more informative about what failed

11 years agoMerge branch 'nd/branch-error-cases'
Junio C Hamano [Thu, 7 Feb 2013 22:41:38 +0000 (14:41 -0800)]
Merge branch 'nd/branch-error-cases'

Fix various error messages and conditions in "git branch", e.g. we
advertised "branch -d/-D" to remove one or more branches but actually
implemented removal of zero or more branches---request to remove no
branches was not rejected.

* nd/branch-error-cases:
  branch: let branch filters imply --list
  docs: clarify git-branch --list behavior
  branch: mark more strings for translation
  branch: give a more helpful message on redundant arguments
  branch: reject -D/-d without branch name

11 years agoMerge branch 'sb/gpg-i18n'
Junio C Hamano [Thu, 7 Feb 2013 22:41:34 +0000 (14:41 -0800)]
Merge branch 'sb/gpg-i18n'

* sb/gpg-i18n:
  gpg: allow translation of more error messages

11 years agoMerge branch 'jk/python-styles'
Junio C Hamano [Thu, 7 Feb 2013 22:41:31 +0000 (14:41 -0800)]
Merge branch 'jk/python-styles'

* jk/python-styles:
  CodingGuidelines: add Python coding guidelines

11 years agoMerge branch 'ab/gitweb-use-same-scheme'
Junio C Hamano [Thu, 7 Feb 2013 22:41:24 +0000 (14:41 -0800)]
Merge branch 'ab/gitweb-use-same-scheme'

Avoid mixed contents on a page coming via http and https when
gitweb is hosted on a https server.

* ab/gitweb-use-same-scheme:
  gitweb: refer to picon/gravatar images over the same scheme

11 years agoupload/receive-pack: allow hiding ref hierarchies
Junio C Hamano [Sat, 19 Jan 2013 00:08:30 +0000 (16:08 -0800)]
upload/receive-pack: allow hiding ref hierarchies

A repository may have refs that are only used for its internal
bookkeeping purposes that should not be exposed to the others that
come over the network.

Teach upload-pack to omit some refs from its initial advertisement
by paying attention to the uploadpack.hiderefs multi-valued
configuration variable.  Do the same to receive-pack via the
receive.hiderefs variable.  As a convenient short-hand, allow using
transfer.hiderefs to set the value to both of these variables.

Any ref that is under the hierarchies listed on the value of these
variable is excluded from responses to requests made by "ls-remote",
"fetch", etc. (for upload-pack) and "push" (for receive-pack).

Because these hidden refs do not count as OUR_REF, an attempt to
fetch objects at the tip of them will be rejected, and because these
refs do not get advertised, "git push :" will not see local branches
that have the same name as them as "matching" ones to be sent.

An attempt to update/delete these hidden refs with an explicit
refspec, e.g. "git push origin :refs/hidden/22", is rejected.  This
is not a new restriction.  To the pusher, it would appear that there
is no such ref, so its push request will conclude with "Now that I
sent you all the data, it is time for you to update the refs.  I saw
that the ref did not exist when I started pushing, and I want the
result to point at this commit".  The receiving end will apply the
compare-and-swap rule to this request and rejects the push with
"Well, your update request conflicts with somebody else; I see there
is such a ref.", which is the right thing to do. Otherwise a push to
a hidden ref will always be "the last one wins", which is not a good
default.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agograph: output padding for merge subsequent parents
John Keeping [Thu, 7 Feb 2013 20:15:23 +0000 (20:15 +0000)]
graph: output padding for merge subsequent parents

When showing merges in git-log, the same commit is shown once for each
parent.  Combined with "--graph" this results in graph_show_commit()
being called once for each parent without graph_update() being called.

Currently graph_show_commit() does not print anything on subsequent
invocations for the same commit (this was changed by commit 656197a -
"graph.c: infinite loop in git whatchanged --graph -m" from the previous
behaviour of looping infinitely).

Change this so that if the graph code believes it has already shown the
commit it prints a single padding line.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate CodingGuidelines for Perl
Ted Zlatanov [Wed, 6 Feb 2013 19:49:01 +0000 (14:49 -0500)]
Update CodingGuidelines for Perl

Add the coding guidelines for Perl.

Signed-off-by: Ted Zlatanov <tzz@lifelogs.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agohttp_request: reset "type" strbuf before adding
Jeff King [Wed, 6 Feb 2013 10:39:52 +0000 (05:39 -0500)]
http_request: reset "type" strbuf before adding

Callers may pass us a strbuf which we use to record the
content-type of the response. However, we simply appended to
it rather than overwriting its contents, meaning that cruft
in the strbuf gave us a bogus type. E.g., the multiple
requests triggered by http_request could yield a type like
"text/plainapplication/x-git-receive-pack-advertisement".

Reported-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Wed, 6 Feb 2013 00:20:16 +0000 (16:20 -0800)]
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jn/auto-depend-workaround-buggy-ccache'
Junio C Hamano [Wed, 6 Feb 2013 00:13:52 +0000 (16:13 -0800)]
Merge branch 'jn/auto-depend-workaround-buggy-ccache'

An age-old workaround to prevent buggy versions of ccache from
breaking the auto-generation of dependencies, which unfortunately
is still relevant because some people use ancient distros.

* jn/auto-depend-workaround-buggy-ccache:
  Makefile: explicitly set target name for autogenerated dependencies

11 years agoMerge branch 'ta/doc-no-small-caps'
Junio C Hamano [Wed, 6 Feb 2013 00:13:32 +0000 (16:13 -0800)]
Merge branch 'ta/doc-no-small-caps'

Update documentation to change "GIT" which was a poor-man's small
caps to "Git".  The latter was the intended spelling.

Also change "git" spelled in all-lowercase to "Git" when it refers
to the system as the whole or the concept it embodies, as opposed to
the command the end users would type.

* ta/doc-no-small-caps:
  Documentation: StGit is the right spelling, not StGIT
  Documentation: describe the "repository" in repository-layout
  Documentation: add a description for 'gitfile' to glossary
  Documentation: do not use undefined terms git-dir and git-file
  Documentation: the name of the system is 'Git', not 'git'
  Documentation: avoid poor-man's small caps GIT

11 years agoMerge branch 'jc/fake-ancestor-with-non-blobs'
Junio C Hamano [Wed, 6 Feb 2013 00:13:11 +0000 (16:13 -0800)]
Merge branch 'jc/fake-ancestor-with-non-blobs'

Rebasing the history of superproject with change in the submodule
was broken since v1.7.12.

* jc/fake-ancestor-with-non-blobs:
  apply: diagnose incomplete submodule object name better
  apply: simplify build_fake_ancestor()
  git-am: record full index line in the patch used while rebasing

11 years agoMerge branch 'sb/gpg-plug-fd-leak'
Junio C Hamano [Wed, 6 Feb 2013 00:12:43 +0000 (16:12 -0800)]
Merge branch 'sb/gpg-plug-fd-leak'

We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.

* sb/gpg-plug-fd-leak:
  gpg: close stderr once finished with it in verify_signed_buffer()

11 years agoMerge branch 'ft/transport-report-segv'
Junio C Hamano [Wed, 6 Feb 2013 00:12:32 +0000 (16:12 -0800)]
Merge branch 'ft/transport-report-segv'

A failure to push due to non-ff while on an unborn branch
dereferenced a NULL pointer when showing an error message.

* ft/transport-report-segv:
  push: fix segfault when HEAD points nowhere

11 years agocontrib/subtree: make the manual directory if needed
Jesper L. Nielsen [Tue, 5 Feb 2013 04:06:06 +0000 (22:06 -0600)]
contrib/subtree: make the manual directory if needed

Before install git-subtree documentation, make sure the manpage
directory exists.

Signed-off-by: Jesper L. Nielsen <lyager@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/subtree: honor DESTDIR
Adam Tkac [Tue, 5 Feb 2013 04:06:05 +0000 (22:06 -0600)]
contrib/subtree: honor DESTDIR

Teach git-subtree's Makefile to honor DESTDIR.

Signed-off-by: Adam Tkac <atkac@redhat.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/subtree: fix synopsis
David A. Greene [Tue, 5 Feb 2013 04:06:04 +0000 (22:06 -0600)]
contrib/subtree: fix synopsis

Fix the documentation of add to show that a repository can be
specified along with a commit.

Suggested by Yann Dirson <dirson@bertin.fr>.

Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/subtree: better error handling for 'subtree add'
David A. Greene [Tue, 5 Feb 2013 04:06:03 +0000 (22:06 -0600)]
contrib/subtree: better error handling for 'subtree add'

Check refspecs for validity before passing them on to other commands.
This lets us generate more helpful error messages.

Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/subtree: use %B for split subject/body
Techlive Zheng [Tue, 5 Feb 2013 04:06:02 +0000 (22:06 -0600)]
contrib/subtree: use %B for split subject/body

Use %B to format the commit message and body to avoid an extra newline
if a commit only has a subject line.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/subtree: remove test number comments
David A. Greene [Tue, 5 Feb 2013 04:06:01 +0000 (22:06 -0600)]
contrib/subtree: remove test number comments

Delete the comments indicating test numbers as it causes maintenance
headaches.  t*.sh -i will help us find any broken tests and these
numbers are not helping us anyway.

Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot4038: add tests for "diff --cc --raw <trees>"
John Keeping [Tue, 5 Feb 2013 21:39:49 +0000 (21:39 +0000)]
t4038: add tests for "diff --cc --raw <trees>"

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: verify submodule commit object name better
Junio C Hamano [Tue, 5 Feb 2013 19:19:32 +0000 (11:19 -0800)]
apply: verify submodule commit object name better

A textual patch also records the submodule commit object name in
full.  Make the parsing more robust by reading from there and
verifying the (possibly abbreviated) name on the index line matches.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostatus: show the branch name if possible in in-progress info
Nguyễn Thái Ngọc Duy [Sun, 3 Feb 2013 05:53:27 +0000 (12:53 +0700)]
status: show the branch name if possible in in-progress info

The typical use-case is starting a rebase, do something else, come
back the day after, run "git status" or make a new commit and wonder
what in the world's going on. Which branch is being rebased is
probably the most useful tidbit to help, but the target may help
too.

Ideally, I would have loved to see "rebasing master on
origin/master", but the target ref name is not stored during rebase,
so this patch writes "rebasing master on a78c8c98b" as a
half-measure to remind future users of that potential improvement.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5551: fix expected error output
Junio C Hamano [Tue, 5 Feb 2013 00:21:42 +0000 (16:21 -0800)]
t5551: fix expected error output

We should probably get rid of the check of message instead, but in
the meantime this should do.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Mon, 4 Feb 2013 18:44:26 +0000 (10:44 -0800)]
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 4 Feb 2013 18:26:11 +0000 (10:26 -0800)]
Merge branch 'maint'

* maint:
  Start preparing for 1.8.1.3

11 years agoMerge branch 'jk/remote-helpers-in-python-3'
Junio C Hamano [Mon, 4 Feb 2013 18:25:34 +0000 (10:25 -0800)]
Merge branch 'jk/remote-helpers-in-python-3'

Prepare remote-helper test written in Python to be run with Python3.

* jk/remote-helpers-in-python-3:
  git_remote_helpers: remove GIT-PYTHON-VERSION upon "clean"
  git-remote-testpy: fix path hashing on Python 3
  git-remote-testpy: call print as a function
  git-remote-testpy: don't do unbuffered text I/O
  git-remote-testpy: hash bytes explicitly
  svn-fe: allow svnrdump_sim.py to run with Python 3
  git_remote_helpers: use 2to3 if building with Python 3
  git_remote_helpers: force rebuild if python version changes
  git_remote_helpers: fix input when running under Python 3
  git_remote_helpers: allow building with Python 3

11 years agoMerge branch 'pw/git-p4-on-cygwin'
Junio C Hamano [Mon, 4 Feb 2013 18:25:30 +0000 (10:25 -0800)]
Merge branch 'pw/git-p4-on-cygwin'

Improve "git p4" on Cygwin.

* pw/git-p4-on-cygwin: (21 commits)
  git p4: introduce gitConfigBool
  git p4: avoid shell when calling git config
  git p4: avoid shell when invoking git config --get-all
  git p4: avoid shell when invoking git rev-list
  git p4: avoid shell when mapping users
  git p4: disable read-only attribute before deleting
  git p4 test: use test_chmod for cygwin
  git p4: cygwin p4 client does not mark read-only
  git p4 test: avoid wildcard * in windows
  git p4 test: use LineEnd unix in windows tests too
  git p4 test: newline handling
  git p4: scrub crlf for utf16 files on windows
  git p4: remove unreachable windows \r\n conversion code
  git p4 test: translate windows paths for cygwin
  git p4 test: start p4d inside its db dir
  git p4 test: use client_view in t9806
  git p4 test: avoid loop in client_view
  git p4 test: use client_view to build the initial client
  git p4: generate better error message for bad depot path
  git p4: remove unused imports
  ...

11 years agoMerge branch 'jk/read-commit-buffer-data-after-free'
Junio C Hamano [Mon, 4 Feb 2013 18:25:18 +0000 (10:25 -0800)]
Merge branch 'jk/read-commit-buffer-data-after-free'

Clarify the ownership rule for commit->buffer field, which some
callers incorrectly accessed without making sure it is populated.

* jk/read-commit-buffer-data-after-free:
  logmsg_reencode: lazily load missing commit buffers
  logmsg_reencode: never return NULL
  commit: drop useless xstrdup of commit message

11 years agoMerge branch 'mm/add-u-A-sans-pathspec'
Junio C Hamano [Mon, 4 Feb 2013 18:25:13 +0000 (10:25 -0800)]
Merge branch 'mm/add-u-A-sans-pathspec'

Forbid "git add -u" and "git add -A" without pathspec run from a
subdirectory, to train people to type "." (or ":/") to make the
choice of default does not matter.

* mm/add-u-A-sans-pathspec:
  add: warn when -u or -A is used without pathspec

11 years agoMerge branch 'jc/push-reject-reasons'
Junio C Hamano [Mon, 4 Feb 2013 18:25:04 +0000 (10:25 -0800)]
Merge branch 'jc/push-reject-reasons'

Improve error and advice messages given locally when "git push"
refuses when it cannot compute fast-forwardness by separating these
cases from the normal "not a fast-forward; merge first and push
again" case.

* jc/push-reject-reasons:
  push: finishing touches to explain REJECT_ALREADY_EXISTS better
  push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE
  push: further simplify the logic to assign rejection reason
  push: further clean up fields of "struct ref"

11 years agoMerge branch 'jk/config-parsing-cleanup'
Junio C Hamano [Mon, 4 Feb 2013 18:24:50 +0000 (10:24 -0800)]
Merge branch 'jk/config-parsing-cleanup'

Configuration parsing for tar.* configuration variables were
broken. Introduce a new config-keyname parser API to make the
callers much less error prone.

* jk/config-parsing-cleanup:
  reflog: use parse_config_key in config callback
  help: use parse_config_key for man config
  submodule: simplify memory handling in config parsing
  submodule: use parse_config_key when parsing config
  userdiff: drop parse_driver function
  convert some config callbacks to parse_config_key
  archive-tar: use parse_config_key when parsing config
  config: add helper function for parsing key names

11 years agoMerge branch 'jc/custom-comment-char'
Junio C Hamano [Mon, 4 Feb 2013 18:23:49 +0000 (10:23 -0800)]
Merge branch 'jc/custom-comment-char'

Allow a configuration variable core.commentchar to customize the
character used to comment out the hint lines in the edited text from
the default '#'.

* jc/custom-comment-char:
  Allow custom "comment char"

11 years agoVerify Content-Type from smart HTTP servers
Shawn Pearce [Thu, 31 Jan 2013 21:02:07 +0000 (13:02 -0800)]
Verify Content-Type from smart HTTP servers

Before parsing a suspected smart-HTTP response verify the returned
Content-Type matches the standard. This protects a client from
attempting to process a payload that smells like a smart-HTTP
server response.

JGit has been doing this check on all responses since the dawn of
time. I mistakenly failed to include it in git-core when smart HTTP
was introduced. At the time I didn't know how to get the Content-Type
from libcurl. I punted, meant to circle back and fix this, and just
plain forgot about it.

Signed-off-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoStart preparing for 1.8.1.3
Junio C Hamano [Mon, 4 Feb 2013 18:21:10 +0000 (10:21 -0800)]
Start preparing for 1.8.1.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'bc/git-p4-for-python-2.4' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:04:57 +0000 (10:04 -0800)]
Merge branch 'bc/git-p4-for-python-2.4' into maint

* bc/git-p4-for-python-2.4:
  INSTALL: git-p4 does not support Python 3
  git-p4.py: support Python 2.4
  git-p4.py: support Python 2.5

11 years agoMerge branch 'nd/edit-branch-desc-while-detached' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:04:44 +0000 (10:04 -0800)]
Merge branch 'nd/edit-branch-desc-while-detached' into maint

Attempt to "branch --edit-description" an existing branch, while
being on a detached HEAD, errored out.

* nd/edit-branch-desc-while-detached:
  branch: no detached HEAD check when editing another branch's description

11 years agoMerge branch 'jn/do-not-drop-username-when-reading-from-etc-mailname' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:04:26 +0000 (10:04 -0800)]
Merge branch 'jn/do-not-drop-username-when-reading-from-etc-mailname' into maint

We used to stuff "user@" and then append what we read from
/etc/mailname to come up with a default e-mail ident, but a bug lost
the "user@" part.

* jn/do-not-drop-username-when-reading-from-etc-mailname:
  ident: do not drop username when reading from /etc/mailname

11 years agoMerge branch 'jk/cvsimport-does-not-work-with-cvsps3' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:04:22 +0000 (10:04 -0800)]
Merge branch 'jk/cvsimport-does-not-work-with-cvsps3' into maint

* jk/cvsimport-does-not-work-with-cvsps3:
  git-cvsimport.txt: cvsps-2 is deprecated

11 years agoMerge branch 'dl/am-hg-locale' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:04:10 +0000 (10:04 -0800)]
Merge branch 'dl/am-hg-locale' into maint

"git am" did not parse datestamp correctly from Hg generated patch,
when it is run in a locale outside C (or en)

* dl/am-hg-locale:
  am: invoke perl's strftime in C locale

11 years agoMerge branch 'jc/help' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:04:06 +0000 (10:04 -0800)]
Merge branch 'jc/help' into maint

* jc/help:
  help: include <common-cmds.h> only in one file

11 years agoMerge branch 'jc/merge-blobs' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:03:41 +0000 (10:03 -0800)]
Merge branch 'jc/merge-blobs' into maint

* jc/merge-blobs:
  Makefile: Replace merge-file.h with merge-blobs.h in LIB_H
  merge-tree: fix d/f conflicts
  merge-tree: add comments to clarify what these functions are doing
  merge-tree: lose unused "resolve_directories"
  merge-tree: lose unused "flags" from merge_list
  Which merge_file() function do you mean?

11 years agoMerge branch 'jc/doc-maintainer' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:03:35 +0000 (10:03 -0800)]
Merge branch 'jc/doc-maintainer' into maint

* jc/doc-maintainer:
  howto/maintain: document "### match next" convention in jch/pu branch
  howto/maintain: mark titles for asciidoc
  Documentation: update "howto maintain git"

11 years agoMerge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash' into maint
Junio C Hamano [Mon, 4 Feb 2013 18:03:13 +0000 (10:03 -0800)]
Merge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash' into maint

Command line completion code was inadvertently made incompatible with
older versions of bash by using a newer array notation.

* bc/fix-array-syntax-for-3.0-in-completion-bash:
  git-completion.bash: replace zsh notation that breaks bash 3.X

11 years agocompletion: handle path completion and colon for tcsh script
Marc Khouzam [Sat, 2 Feb 2013 19:43:25 +0000 (19:43 +0000)]
completion: handle path completion and colon for tcsh script

Recent enhancements to git-completion.bash provide intelligent path
completion for git commands.  Such completions do not provide the
'/' at the end of directories for recent versions of bash; instead,
bash itself will add the trailing slash to directories to the result
provided by git-completion.bash.  However, the completion for tcsh
uses the result of the bash completion script directly, so it either
needs to add the necessary slash itself, or needs to ask the bash
script to keep the trailing slash.

Adding the slash itself is difficult because we have to check the
each path in the output of the bash script to see if it is meant to
be a directory or something else.  For example, assuming there is a
directory named 'commit' in the current directory, then, when
completing

  git add commit<tab>

we would need to add a slash, but for

  git help commit<tab>

we should not.

Figuring out such differences would require adding much intelligence
to the tcsh completion script.  Instead, it is simpler to ask the
bash script to keep the trailing slash.  This patch does this.

Also, tcsh does not handle the colon as a completion separator so we
remove it from the list of separators.

Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
11 years agobuiltin/apply: tighten (dis)similarity index parsing
John Keeping [Sun, 3 Feb 2013 14:37:11 +0000 (14:37 +0000)]
builtin/apply: tighten (dis)similarity index parsing

This was prompted by an incorrect warning issued by clang [1], and a
suggestion by Linus to restrict the range to check for values greater
than INT_MAX since these will give bogus output after casting to int.

In fact the (dis)similarity index is a percentage, so reject values
greater than 100.

[1] http://article.gmane.org/gmane.comp.version-control.git/213857

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocombine-diff: lift 32-way limit of combined diff
Junio C Hamano [Sun, 3 Feb 2013 21:08:18 +0000 (13:08 -0800)]
combine-diff: lift 32-way limit of combined diff

The "raw" format of combine-diff output is supposed to have as many
colons as there are parents at the beginning, then blob modes for
these parents, and then object names for these parents.

We weren't however prepared to handle a more than 32-way merge and
did not show the correct number of colons in such a case.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc: generate a list of valid merge tools
David Aguilar [Mon, 28 Jan 2013 00:52:26 +0000 (16:52 -0800)]
doc: generate a list of valid merge tools

Use the show_tool_names() function to build lists of all
the built-in tools supported by difftool and mergetool.
This frees us from needing to update the documentation
whenever a new tool is added.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetool--lib: list user configured tools in '--tool-help'
John Keeping [Wed, 30 Jan 2013 19:55:46 +0000 (19:55 +0000)]
mergetool--lib: list user configured tools in '--tool-help'

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetool--lib: add functions for finding available tools
David Aguilar [Mon, 28 Jan 2013 00:52:25 +0000 (16:52 -0800)]
mergetool--lib: add functions for finding available tools

Refactor show_tool_help() so that the tool-finding logic is broken out
into a separate show_tool_names() function.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoHonor configure's htmldir switch
Christoph J. Thompson [Sat, 2 Feb 2013 21:25:11 +0000 (22:25 +0100)]
Honor configure's htmldir switch

Honor autoconf's --htmldir switch. This allows relocating HTML docs
straight from the configure script.

Signed-off-by: Christoph J. Thompson <cjsthompson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMakefile: explicitly set target name for autogenerated dependencies
Jonathan Nieder [Fri, 18 Nov 2011 23:23:24 +0000 (17:23 -0600)]
Makefile: explicitly set target name for autogenerated dependencies

"gcc -MF depfile -MMD -MP -c -o path/to/file.o" produces a makefile
snippet named "depfile" describing what files are needed to build the
target given by "-o".  When ccache versions before v3.0pre0~187 (Fix
handling of the -MD and -MDD options, 2009-11-01) run, they execute

gcc -MF depfile -MMD -MP -E

instead to get the final content for hashing.  Notice that the "-c -o"
combination is replaced by "-E".  The result is a target name without
a leading path.

Thus when building git with such versions of ccache with
COMPUTE_HEADER_DEPENDENCIES enabled, the generated makefile snippets
define dependencies for the wrong target:

$ make builtin/add.o
GIT_VERSION = 1.7.8.rc3
    * new build flags or prefix
    CC builtin/add.o
$ head -1 builtin/.depend/add.o.d
add.o: builtin/add.c cache.h git-compat-util.h compat/bswap.h strbuf.h \

After a change in a header file, object files in a subdirectory are
not automatically rebuilt by "make":

$ touch cache.h
$ make builtin/add.o
$

Luckily we can prevent trouble by explicitly supplying the name of the
target to ccache and gcc, using the -MQ option.  Do so.

Reported-and-tested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reported-by: : 허종만 <jongman.heo@samsung.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetools: teach tortoisemerge to handle filenames with SP correctly
Sven Strickroth [Fri, 1 Feb 2013 20:16:30 +0000 (21:16 +0100)]
mergetools: teach tortoisemerge to handle filenames with SP correctly

TortoiseGitMerge, unlike TortoiseMerge, can be told to handle paths
with spaces in them by using -option "$FILE" (not -option:"$FILE",
which does not work for such paths) syntax.

This change was necessary because of MSYS path mangling [1], the ":"
after the "base" etc. arguments to TortoiseMerge caused the whole
argument instead of just the file name to be quoted in case of file
names with spaces. So TortoiseMerge was passed

    "-base:new file.txt"

instead of

    -base:"new file.txt"

(including the quotes). To work around this, TortoiseGitMerge does not
require the ":" after the arguments anymore which fixes handling file
names with spaces [2] (as written above).

[1] http://www.mingw.org/wiki/Posix_path_conversion
[2] https://github.com/msysgit/msysgit/issues/57

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Reported-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoRename {git- => git}remote-helpers.txt
John Keeping [Thu, 31 Jan 2013 21:59:50 +0000 (21:59 +0000)]
Rename {git- => git}remote-helpers.txt

When looking up a topic via "git help <topic>", git-help prepends "git-"
to topics that are the names of commands (either builtin or found on the
path) and "git" (no hyphen) to any other topic name.

"git-remote-helpers" is not the name of a command, so "git help
remote-helpers" looks for "gitremote-helpers" and does not find it.

Fix this by renaming "git-remote-helpers.txt" to
"gitremote-helpers.txt".

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agorun-command: be more informative about what failed
Stephen Boyd [Thu, 31 Jan 2013 02:01:05 +0000 (18:01 -0800)]
run-command: be more informative about what failed

While debugging an error with verify_signed_buffer() the error
messages from run-command weren't very useful:

 error: cannot create pipe for gpg: Too many open files
 error: could not run gpg.

because they didn't indicate *which* pipe couldn't be created.

Print which pipe failed to be created in the error message so we
can more easily debug similar problems in the future.

For example, the above error now prints:

 error: cannot create standard error pipe for gpg: Too many open files
 error: could not run gpg.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: StGit is the right spelling, not StGIT
Thomas Ackermann [Fri, 1 Feb 2013 18:08:56 +0000 (19:08 +0100)]
Documentation: StGit is the right spelling, not StGIT

They refer themselves as such at https://gna.org/projects/stgit/

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: describe the "repository" in repository-layout
Junio C Hamano [Fri, 1 Feb 2013 19:26:35 +0000 (11:26 -0800)]
Documentation: describe the "repository" in repository-layout

Update the introductory part and concisely explain how gitfile is
handled, what it is used for and for what effect.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: add a description for 'gitfile' to glossary
Thomas Ackermann [Fri, 1 Feb 2013 18:11:24 +0000 (19:11 +0100)]
Documentation: add a description for 'gitfile' to glossary

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: do not use undefined terms git-dir and git-file
Thomas Ackermann [Fri, 1 Feb 2013 18:07:56 +0000 (19:07 +0100)]
Documentation: do not use undefined terms git-dir and git-file

We will add gitfile to the glossary in a separate commit.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: the name of the system is 'Git', not 'git'
Thomas Ackermann [Mon, 21 Jan 2013 19:17:53 +0000 (20:17 +0100)]
Documentation: the name of the system is 'Git', not 'git'

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: avoid poor-man's small caps GIT
Thomas Ackermann [Mon, 21 Jan 2013 19:16:20 +0000 (20:16 +0100)]
Documentation: avoid poor-man's small caps GIT

In the earlier days, we used to spell the name of the system as GIT,
to simulate as if it were typeset with capital G and IT in small
caps.  Later we stopped doing so at around 1.6.5 days.

Let's stop doing so throughout the documentation.  The name to refer
to the whole system (and the concept it embodies) is "Git"; the
command end-users type is "git".  And document this in the coding
guideline.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.2
Junio C Hamano [Fri, 1 Feb 2013 20:52:08 +0000 (12:52 -0800)]
Update draft release notes to 1.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'nd/edit-branch-desc-while-detached'
Junio C Hamano [Fri, 1 Feb 2013 20:40:52 +0000 (12:40 -0800)]
Merge branch 'nd/edit-branch-desc-while-detached'

Attempt to "branch --edit-description" an existing branch, while
being on a detached HEAD, errored out.

* nd/edit-branch-desc-while-detached:
  branch: no detached HEAD check when editing another branch's description

11 years agoMerge branch 'jk/gc-auto-after-fetch'
Junio C Hamano [Fri, 1 Feb 2013 20:40:16 +0000 (12:40 -0800)]
Merge branch 'jk/gc-auto-after-fetch'

Help "fetch only" repositories that do not trigger "gc --auto"
often enough.

* jk/gc-auto-after-fetch:
  fetch-pack: avoid repeatedly re-scanning pack directory
  fetch: run gc --auto after fetching

11 years agoMerge branch 'bc/git-p4-for-python-2.4'
Junio C Hamano [Fri, 1 Feb 2013 20:40:10 +0000 (12:40 -0800)]
Merge branch 'bc/git-p4-for-python-2.4'

With small updates to remove dependency on newer features of
Python, keep git-p4 usable with older Python.

* bc/git-p4-for-python-2.4:
  INSTALL: git-p4 does not support Python 3
  git-p4.py: support Python 2.4
  git-p4.py: support Python 2.5

11 years agoMerge branch 'jn/do-not-drop-username-when-reading-from-etc-mailname'
Junio C Hamano [Fri, 1 Feb 2013 20:40:05 +0000 (12:40 -0800)]
Merge branch 'jn/do-not-drop-username-when-reading-from-etc-mailname'

We used to stuff "user@" and then append what we read from
/etc/mailname to come up with a default e-mail ident, but a bug
lost the "user@" part.  This is to fix it.

* jn/do-not-drop-username-when-reading-from-etc-mailname:
  ident: do not drop username when reading from /etc/mailname

11 years agoMerge branch 'jk/cvsimport-does-not-work-with-cvsps3'
Junio C Hamano [Fri, 1 Feb 2013 20:39:59 +0000 (12:39 -0800)]
Merge branch 'jk/cvsimport-does-not-work-with-cvsps3'

Warn people that other tools are more recommendable over
cvsimport+cvsps2 combo when doing a one-shot import, and cvsimport
will not work with cvsps3.

* jk/cvsimport-does-not-work-with-cvsps3:
  git-cvsimport.txt: cvsps-2 is deprecated

11 years agoMerge branch 'jc/do-not-let-random-file-interfere-with-completion-tests'
Junio C Hamano [Fri, 1 Feb 2013 20:39:46 +0000 (12:39 -0800)]
Merge branch 'jc/do-not-let-random-file-interfere-with-completion-tests'

Scripts to test bash completion was inherently flaky as it was
affected by whatever random things the user may have on $PATH.

* jc/do-not-let-random-file-interfere-with-completion-tests:
  t9902: protect test from stray build artifacts

11 years agoMerge branch 'as/test-cleanup'
Junio C Hamano [Fri, 1 Feb 2013 20:39:42 +0000 (12:39 -0800)]
Merge branch 'as/test-cleanup'

* as/test-cleanup:
  t7102 (reset): don't hardcode SHA-1 in expected outputs

11 years agoMerge branch 'jc/no-git-config-in-clone'
Junio C Hamano [Fri, 1 Feb 2013 20:39:36 +0000 (12:39 -0800)]
Merge branch 'jc/no-git-config-in-clone'

We stopped paying attention to $GIT_CONFIG environment that points
at a single configuration file from any command other than "git config"
quite a while ago, but "git clone" internally set, exported, and
then unexported the variable during its operation unnecessarily.

* jc/no-git-config-in-clone:
  clone: do not export and unexport GIT_CONFIG

11 years agoMerge branch 'nd/fetch-depth-is-broken'
Junio C Hamano [Fri, 1 Feb 2013 20:39:24 +0000 (12:39 -0800)]
Merge branch 'nd/fetch-depth-is-broken'

"git fetch --depth" was broken in at least three ways.  The
resulting history was deeper than specified by one commit, it was
unclear how to wipe the shallowness of the repository with the
command, and documentation was misleading.

* nd/fetch-depth-is-broken:
  fetch: elaborate --depth action
  upload-pack: fix off-by-one depth calculation in shallow clone
  fetch: add --unshallow for turning shallow repo into complete one

11 years agoDocumentation/Makefile: clean up MAN*_TXT lists
Jeff King [Fri, 1 Feb 2013 19:41:14 +0000 (14:41 -0500)]
Documentation/Makefile: clean up MAN*_TXT lists

We keep a list of the various files that end up as man1,
man5, etc. Let's break these single-line lists into sorted
multi-line lists, which makes diffs that touch them much
easier to read.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: diagnose incomplete submodule object name better
Junio C Hamano [Fri, 1 Feb 2013 03:33:27 +0000 (19:33 -0800)]
apply: diagnose incomplete submodule object name better

"git am -3" uses this function to build a tree that records how the
preimage the patch was created from would have looked like.  An
abbreviated object name on the index line is ordinarily sufficient
for us to figure out the object name the preimage tree would have
contained, but a change to a submodule by definition shows an object
name of a submodule commit which our repository should not have, and
get_sha1_blob() is not an appropriate way to read it (or get_sha1()
for that matter).

Use get_sha1_hex() and complain if we do not find a full object name
there.

We could read from the payload part of the patch to learn the full
object name of the commit, but the primary user "git rebase" has
been fixed to give us a full object name, so this should suffice
for now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: simplify build_fake_ancestor()
Junio C Hamano [Fri, 1 Feb 2013 03:19:44 +0000 (19:19 -0800)]
apply: simplify build_fake_ancestor()

The local variable sha1_ptr in the build_fake_ancestor() function
used to either point at the null_sha1[] (if the ancestor did not
have the path) or at sha1[] (if we read the object name into the
local array), but 7a98869 (apply: get rid of --index-info in favor
of --build-fake-ancestor, 2007-09-17) made the "missing in the
ancestor" case unnecessary, hence sha1_ptr, when used, always points
at the local array.

Get rid of the unneeded variable, and restructure the if/else
cascade a bit to make it easier to read.  There should be no
behaviour change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-am: record full index line in the patch used while rebasing
Junio C Hamano [Fri, 1 Feb 2013 03:26:21 +0000 (19:26 -0800)]
git-am: record full index line in the patch used while rebasing

Earlier, a230949 (am --rebasing: get patch body from commit, not
from mailbox, 2012-06-26) learned to regenerate patch body from the
commit object while rebasing, instead of reading from the rebase-am
front-end.  While doing so, it used "git diff-tree" but without
giving it the "--full-index" option.

This does not matter for in-repository objects; during rebasing, any
abbreviated object name should uniquely identify them.

But we may be rebasing a commit that contains a change to a gitlink,
in which case we usually should not have the object (it names a
commit in the submodule).  A full object name is necessary to later
reconstruct a fake ancestor index for them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc: mention tracking for pull.default
Junio C Hamano [Thu, 31 Jan 2013 20:50:38 +0000 (12:50 -0800)]
doc: mention tracking for pull.default

When looking at a configuration file edited long time ago, a user
may find 'pull.default = tracking' and wonder what it means, but
earlier we stopped mentioning this value, even though the code still
support it and more importantly, we have no intention to force old
timers to update their configuration files.

Instead of not mentioning it, add it to the description in a way
that makes it clear that users have no reason to add new uses of it
preferring over 'upstream', by not listing it as a separate item on
the same footing as other values but as a deprecated synonym of the
'upstream' in its description.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agobranch: let branch filters imply --list
Jeff King [Thu, 31 Jan 2013 06:46:11 +0000 (01:46 -0500)]
branch: let branch filters imply --list

Currently, a branch filter like `--contains`, `--merged`, or
`--no-merged` is ignored when we are not in listing mode.
For example:

  git branch --contains=foo bar

will create the branch "bar" from the current HEAD, ignoring
the `--contains` argument entirely. This is not very
helpful. There are two reasonable behaviors for git here:

  1. Flag an error; the arguments do not make sense.

  2. Implicitly go into `--list` mode

This patch chooses the latter, as it is more convenient, and
there should not be any ambiguity with attempting to create
a branch; using `--contains` and not wanting to list is
nonsensical.

That leaves the case where an explicit modification option
like `-d` is given.  We already catch the case where
`--list` is given alongside `-d` and flag an error. With
this patch, we will also catch the use of `--contains` and
other filter options alongside `-d`.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodocs: clarify git-branch --list behavior
Jeff King [Thu, 31 Jan 2013 06:45:46 +0000 (01:45 -0500)]
docs: clarify git-branch --list behavior

It was not clear from the "description" section of git-branch(1)
that using a <pattern> meant that you _had_ to use the --list
option. Let's clarify that, and while we're at it, reword some
clunky and ambiguous sentences.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogpg: close stderr once finished with it in verify_signed_buffer()
Stephen Boyd [Thu, 31 Jan 2013 18:18:40 +0000 (10:18 -0800)]
gpg: close stderr once finished with it in verify_signed_buffer()

Failing to close the stderr pipe in verify_signed_buffer() causes
git to run out of file descriptors if there are many calls to
verify_signed_buffer(). An easy way to trigger this is to run

 git log --show-signature --merges | grep "key"

on the linux kernel git repo. Eventually it will fail with

 error: cannot create pipe for gpg: Too many open files
 error: could not run gpg.

Close the stderr pipe so that this can't happen.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogpg: allow translation of more error messages
Stephen Boyd [Thu, 31 Jan 2013 02:01:06 +0000 (18:01 -0800)]
gpg: allow translation of more error messages

Mark these strings for translation so that error messages are
printed in the user's language of choice.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agopush: fix segfault when HEAD points nowhere
Fraser Tweedale [Thu, 31 Jan 2013 12:22:51 +0000 (22:22 +1000)]
push: fix segfault when HEAD points nowhere

After a push of a branch other than the current branch fails in
a no-ff error and if you are still on an unborn branch, the code
recently added to report the failure dereferenced a null pointer
while checking the name of the current branch.

Signed-off-by: Fraser Tweedale <frase@frase.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge git://ozlabs.org/~paulus/gitk
Junio C Hamano [Wed, 30 Jan 2013 21:52:44 +0000 (13:52 -0800)]
Merge git://ozlabs.org/~paulus/gitk

* git://ozlabs.org/~paulus/gitk:
  gitk: Ignore gitk-wish buildproduct

11 years agoCodingGuidelines: add Python coding guidelines
John Keeping [Wed, 30 Jan 2013 20:47:32 +0000 (20:47 +0000)]
CodingGuidelines: add Python coding guidelines

These are kept short by simply deferring to PEP-8.  Most of the Python
code in Git is already very close to this style (some things in contrib/
are not).

Rationale for version suggestions:

 - Amongst the noise in [1], there isn't any disagreement about using
   2.6 as a base (see also [2]), although Brandon Casey recently added
   support for 2.4 and 2.5 to git-p4 [3].

 - Restricting ourselves to 2.6+ makes aiming for Python 3 compatibility
   significantly easier [4].

 - Advocating Python 3 support in all scripts is currently unrealistic
   because:

     - 'p4 -G' provides output in a format that is very hard to use with
       Python 3 (and its documentation claims Python 3 is unsupported).

     - Mercurial does not support Python 3.

     - Bazaar does not support Python 3.

 - But we should try to make new scripts compatible with Python 3
   because all new Python development is happening on version 3 and the
   Python community will eventually stop supporting Python 2 [5].

 - Python 3.1 is required to support the 'surrogateescape' error handler
   for encoding/decodng filenames to/from Unicode strings and Python 3.0
   is not longer supported.

[1] http://thread.gmane.org/gmane.comp.version-control.git/210329
[2] http://article.gmane.org/gmane.comp.version-control.git/210429
[3] http://thread.gmane.org/gmane.comp.version-control.git/214579
[4] http://docs.python.org/3.3/howto/pyporting.html#try-to-support-python-2-6-and-newer-only
[5] http://www.python.org/dev/peps/pep-0404/

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit_remote_helpers: remove GIT-PYTHON-VERSION upon "clean"
Junio C Hamano [Wed, 30 Jan 2013 19:30:10 +0000 (11:30 -0800)]
git_remote_helpers: remove GIT-PYTHON-VERSION upon "clean"

fadf8c7 (git_remote_helpers: force rebuild if python version changes, 2013-01-20)
started using a marker file to keep track of the version of Python interpreter
used for the last build, but forgot to remove it when asked to "make clean".

Acked-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoINSTALL: git-p4 does not support Python 3
Junio C Hamano [Wed, 30 Jan 2013 19:17:59 +0000 (11:17 -0800)]
INSTALL: git-p4 does not support Python 3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agobranch: mark more strings for translation
Nguyễn Thái Ngọc Duy [Mon, 28 Jan 2013 01:18:16 +0000 (08:18 +0700)]
branch: mark more strings for translation

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'nd/edit-branch-desc-while-detached' into HEAD
Junio C Hamano [Wed, 30 Jan 2013 17:01:41 +0000 (09:01 -0800)]
Merge branch 'nd/edit-branch-desc-while-detached' into HEAD

* nd/edit-branch-desc-while-detached:
  branch: no detached HEAD check when editing another branch's description

11 years agobranch: give a more helpful message on redundant arguments
Nguyễn Thái Ngọc Duy [Mon, 28 Jan 2013 01:18:15 +0000 (08:18 +0700)]
branch: give a more helpful message on redundant arguments

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agobranch: reject -D/-d without branch name
Nguyễn Thái Ngọc Duy [Mon, 28 Jan 2013 01:18:14 +0000 (08:18 +0700)]
branch: reject -D/-d without branch name

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agobranch: no detached HEAD check when editing another branch's description
Nguyễn Thái Ngọc Duy [Mon, 28 Jan 2013 01:18:13 +0000 (08:18 +0700)]
branch: no detached HEAD check when editing another branch's description

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rr/minimal-stat'
Junio C Hamano [Wed, 30 Jan 2013 16:53:02 +0000 (08:53 -0800)]
Merge branch 'rr/minimal-stat'

Some reimplementations of Git does not write all the stat info back
to the index due to their implementation limitations (e.g. jgit
running on Java).  A configuration option can tell Git to ignore
changes to most of the stat fields and only pay attention to mtime
and size, which these implementations can reliably update.  This
avoids excessive revalidation of contents.

* rr/minimal-stat:
  Enable minimal stat checking

11 years agoMerge branch 'nd/magic-pathspec-from-root'
Junio C Hamano [Wed, 30 Jan 2013 16:52:53 +0000 (08:52 -0800)]
Merge branch 'nd/magic-pathspec-from-root'

When giving arguments without "--" disambiguation, object names
that come  earlier on the command line must not be interpretable as
pathspecs and pathspecs that come later on the command line must
not be interpretable as object names.  Tweak the disambiguation
rule so that ":/" (no other string before or after) is always
interpreted as a pathspec, to avoid having to say "git cmd -- :/".

* nd/magic-pathspec-from-root:
  grep: avoid accepting ambiguous revision
  Update :/abc ambiguity check

11 years agoMerge branch 'maint'
Junio C Hamano [Wed, 30 Jan 2013 16:07:30 +0000 (08:07 -0800)]
Merge branch 'maint'

* maint:
  README: update stale and/or incorrect information

11 years agoMerge branch 'tb/t0050-maint' into maint
Junio C Hamano [Wed, 30 Jan 2013 15:47:46 +0000 (07:47 -0800)]
Merge branch 'tb/t0050-maint' into maint

Update tests that were expecting to fail due to a bug that was
fixed earlier.

* tb/t0050-maint:
  t0050: Use TAB for indentation
  t0050: honor CASE_INSENSITIVE_FS in add (with different case)
  t0050: known breakage vanished in merge (case change)

11 years agogitk: Ignore gitk-wish buildproduct
Christian Couder [Wed, 23 Jan 2013 20:00:35 +0000 (12:00 -0800)]
gitk: Ignore gitk-wish buildproduct

gitk, when bound into the git.git project tree, used to live at the
root level, but in 62ba514 (Move gitk to its own subdirectory,
2007-11-17) it was moved to a subdirectory.  The code used to track
changes to TCLTK_PATH (which should cause gitk to be rebuilt to
point at the new interpreter) was left in the main Makefile instead
of being moved to the new Makefile that was created for the gitk
project.

Also add .gitignore file to list build artifacts for the gitk
project.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
11 years agomergetool--lib: improve the help text in guess_merge_tool()
David Aguilar [Mon, 28 Jan 2013 00:52:24 +0000 (16:52 -0800)]
mergetool--lib: improve the help text in guess_merge_tool()

This code path is only activated when the user does not have a valid
configured tool.  Add a message to guide new users towards configuring a
default tool.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetool--lib: simplify command expressions
David Aguilar [Mon, 28 Jan 2013 00:52:23 +0000 (16:52 -0800)]
mergetool--lib: simplify command expressions

Update variable assignments to always use $(command "$arg")
in their RHS instead of "$(command "$arg")" as the latter
is harder to read.  Make get_merge_tool_cmd() simpler by
avoiding "echo" and $(command) substitutions completely.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'nd/fix-directory-attrs-off-by-one' into maint
Junio C Hamano [Tue, 29 Jan 2013 19:18:54 +0000 (11:18 -0800)]
Merge branch 'nd/fix-directory-attrs-off-by-one' into maint

The attribute mechanism didn't allow limiting attributes to be
applied to only a single directory itself with "path/" like the
exclude mechanism does.  The initial implementation of this that was
merged to 'maint' and 1.8.1.1 had severe performance degradations.

* nd/fix-directory-attrs-off-by-one:
  attr: avoid calling find_basename() twice per path
  attr: fix off-by-one directory component length calculation