1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 23:07:55 +01:00
Commit graph

31841 commits

Author SHA1 Message Date
Junio C Hamano
41e81d2fb9 Merge branch 'jk/python-styles'
* jk/python-styles:
  CodingGuidelines: add Python coding guidelines
2013-02-07 14:41:31 -08:00
Junio C Hamano
e7f7600360 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
2013-02-07 14:41:24 -08:00
Junio C Hamano
2f19ada7f8 Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05 16:20:16 -08:00
Junio C Hamano
b36ab1abd3 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
2013-02-05 16:13:52 -08:00
Junio C Hamano
e34c7e2b51 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
2013-02-05 16:13:32 -08:00
Junio C Hamano
6d81ce0543 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
2013-02-05 16:13:12 -08:00
Junio C Hamano
15778842bd 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()
2013-02-05 16:12:43 -08:00
Junio C Hamano
8278a7bdc1 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
2013-02-05 16:12:33 -08:00
Junio C Hamano
f51a757faf Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 10:44:26 -08:00
Junio C Hamano
4c2c5537c3 Merge branch 'maint'
* maint:
  Start preparing for 1.8.1.3
2013-02-04 10:26:11 -08:00
Junio C Hamano
3e515b0d40 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
2013-02-04 10:25:34 -08:00
Junio C Hamano
9aea11dbc1 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
  ...
2013-02-04 10:25:30 -08:00
Junio C Hamano
d5365b4327 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
2013-02-04 10:25:18 -08:00
Junio C Hamano
27d46a7072 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
2013-02-04 10:25:14 -08:00
Junio C Hamano
370855e967 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"
2013-02-04 10:25:04 -08:00
Junio C Hamano
099ba556d0 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
2013-02-04 10:24:50 -08:00
Junio C Hamano
149a4211a4 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"
2013-02-04 10:23:49 -08:00
Junio C Hamano
42f50f8d01 Start preparing for 1.8.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 10:21:10 -08:00
Junio C Hamano
390ac27a18 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
2013-02-04 10:04:58 -08:00
Junio C Hamano
6cc01490c3 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
2013-02-04 10:04:44 -08:00
Junio C Hamano
7f3d409cd1 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
2013-02-04 10:04:26 -08:00
Junio C Hamano
3d00a5c148 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
2013-02-04 10:04:23 -08:00
Junio C Hamano
61947de909 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
2013-02-04 10:04:10 -08:00
Junio C Hamano
ba8748e6d6 Merge branch 'jc/help' into maint
* jc/help:
  help: include <common-cmds.h> only in one file
2013-02-04 10:04:06 -08:00
Junio C Hamano
686b895928 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?
2013-02-04 10:03:41 -08:00
Junio C Hamano
2173205f5c 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"
2013-02-04 10:03:35 -08:00
Junio C Hamano
5617394f71 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
2013-02-04 10:03:13 -08:00
Jonathan Nieder
6978934713 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>
2013-02-01 18:09:33 -08:00
Thomas Ackermann
afeef30c34 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>
2013-02-01 13:54:46 -08:00
Junio C Hamano
7a7d05b62e 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>
2013-02-01 13:54:46 -08:00
Thomas Ackermann
19b4d3d4ff 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>
2013-02-01 13:53:33 -08:00
Thomas Ackermann
0859c969db 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>
2013-02-01 13:53:33 -08:00
Thomas Ackermann
2de9b71138 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>
2013-02-01 13:53:33 -08:00
Thomas Ackermann
48a8c26c62 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>
2013-02-01 13:53:25 -08:00
Junio C Hamano
bcd45b4085 Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 12:52:08 -08:00
Junio C Hamano
d3c0f7773f 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
2013-02-01 12:40:52 -08:00
Junio C Hamano
4acfff9dda 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
2013-02-01 12:40:16 -08:00
Junio C Hamano
97fbc23ad7 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
2013-02-01 12:40:10 -08:00
Junio C Hamano
a14daf8b91 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
2013-02-01 12:40:05 -08:00
Junio C Hamano
67d9c41c4a 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
2013-02-01 12:39:59 -08:00
Junio C Hamano
51a1d232a7 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
2013-02-01 12:39:46 -08:00
Junio C Hamano
d8dc823e32 Merge branch 'as/test-cleanup'
* as/test-cleanup:
  t7102 (reset): don't hardcode SHA-1 in expected outputs
2013-02-01 12:39:42 -08:00
Junio C Hamano
ba96aa67be 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
2013-02-01 12:39:37 -08:00
Junio C Hamano
2532d891a4 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
2013-02-01 12:39:24 -08:00
Junio C Hamano
e28efb1998 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>
2013-01-31 20:30:55 -08:00
Junio C Hamano
e2afb0be90 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>
2013-01-31 20:30:55 -08:00
Junio C Hamano
4ae6d4699f 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>
2013-01-31 20:30:55 -08:00
Stephen Boyd
7dac3f8321 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>
2013-01-31 11:10:44 -08:00
Fraser Tweedale
1d2c14df16 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>
2013-01-31 08:09:53 -08:00
Junio C Hamano
9a6c84e6e9 Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
  gitk: Ignore gitk-wish buildproduct
2013-01-30 13:52:44 -08:00