Commit Graph

31265 Commits

Author SHA1 Message Date
Thomas Ackermann
0a85441cdb Remove Documentation/pt_BR/gittutorial.txt
This file is rather outdated and IMHO shouldn't be there in the first place.
(If there are translations of the Git documentation they are better be kept
separate from the original documentation.)

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-27 08:42:33 -08:00
Simon Oosthoek
126b59692b make __git_ps1 accept a third parameter in pcmode
The optional third parameter when __git_ps1 is used in
PROMPT_COMMAND mode as format string for printf to further
customize the way the git status string is embedded in the
user's PS1 prompt.

Signed-off-by: Simon Oosthoek <s.oosthoek@xs4all.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-26 11:52:36 -08:00
Junio C Hamano
8666df02da t9200: let "cvs init" create the test repository
Some platforms (e.g. NetBSD 6.0) seem to configure their CVS to
allow "cvs init" in an existing directory only to members of
"cvsadmin".

Instead of preparing an empty directory and then running "cvs init"
on it, let's run "cvs init" and let it create the necessary
directory.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-24 17:42:07 -08:00
Junio C Hamano
86c3e6ed51 Merge branch 'maint' 2012-12-22 20:40:07 -08:00
Junio C Hamano
c2999adcd5 Merge branch 'jc/doc-diff-blobs' into maint
* jc/doc-diff-blobs:
  Documentation: Describe "git diff <blob> <blob>" separately
2012-12-22 20:38:07 -08:00
Junio C Hamano
a7b5e9141e Merge branch 'cr/doc-checkout-branch' into maint
* cr/doc-checkout-branch:
  Documentation/git-checkout.txt: document 70c9ac2 behavior
  Documentation/git-checkout.txt: clarify usage
2012-12-22 20:38:02 -08:00
Junio C Hamano
2b1965863b Merge branch 'ta/api-index-doc' into maint
* ta/api-index-doc:
  Remove misleading date from api-index-skel.txt
2012-12-22 20:37:42 -08:00
Junio C Hamano
ffcd76bda9 Merge branch 'as/doc-for-devs' into maint
* as/doc-for-devs:
  Documentation: move support for old compilers to CodingGuidelines
  SubmittingPatches: add convention of prefixing commit messages
2012-12-22 20:37:33 -08:00
Junio C Hamano
e970ec356b Merge branch 'sl/readme-gplv2' into maint
* sl/readme-gplv2:
  README: it does not matter who the current maintainer is
  README: Git is released under the GPLv2, not just "the GPL"
2012-12-22 20:37:27 -08:00
Junio C Hamano
21b340181b Merge branch 'jc/fetch-tags-doc' into maint
* jc/fetch-tags-doc:
  fetch --tags: clarify documentation
2012-12-22 20:37:22 -08:00
Junio C Hamano
df54d59566 Merge branch 'nd/index-format-doc' into maint
* nd/index-format-doc:
  index-format.txt: clarify what is "invalid"
2012-12-22 20:37:09 -08:00
Junio C Hamano
ccc3ae799c Merge branch 'jk/mailmap-cleanup' into maint
* jk/mailmap-cleanup:
  contrib: update stats/mailmap script
  .mailmap: normalize emails for Linus Torvalds
  .mailmap: normalize emails for Jeff King
  .mailmap: fix broken entry for Martin Langhoff
  .mailmap: match up some obvious names/emails
2012-12-22 20:36:42 -08:00
Junio C Hamano
66afe50b43 Merge branch 'ta/doc-cleanup' into maint
* ta/doc-cleanup:
  Documentation: build html for all files in technical and howto
  Documentation/howto: convert plain text files to asciidoc
  Documentation/technical: convert plain text files to asciidoc
  Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
  Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
  Split over-long synopsis in git-fetch-pack.txt into several lines
2012-12-22 20:35:34 -08:00
Thomas Ackermann
854dfda8be Sort howto documents in howto-index.txt
Howto documents in howto-index.txt were listed in a rather
random order. So better sort them.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22 20:26:56 -08:00
Michael Schubert
248a8849fa git-subtree: fix typo in manpage
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22 20:21:48 -08:00
Michael Schubert
f228dade3d git-subtree: ignore git-subtree executable
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22 20:21:26 -08:00
Junio C Hamano
b3cf6f3b8d Git 1.8.1-rc3
The changes since -rc2 are mostly documentation updates.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-22 11:48:47 -08:00
Junio C Hamano
b10c4add03 Merge branch 'ta/new-command-howto'
* ta/new-command-howto:
  Move ./technical/api-command.txt to ./howto/new-command.txt
2012-12-21 15:19:25 -08:00
Junio C Hamano
814a1924b4 Merge branch 'jc/doc-diff-blobs'
"git diff <blob> <blob>" was not documented and was only hinted as
an extension to "git diff <commit> <commit> -- <pathspec>", but
comparison between two blobs are more special than that.  It does
not take any pathspec to begin with.

* jc/doc-diff-blobs:
  Documentation: Describe "git diff <blob> <blob>" separately
2012-12-21 15:19:13 -08:00
Junio C Hamano
51bf6bea51 Merge branch 'cr/doc-checkout-branch'
Document the magic "git checkout <no-such-branch>" hack to create
local branch out of a remote tracking branch that hasn't been
documented so far.

* cr/doc-checkout-branch:
  Documentation/git-checkout.txt: document 70c9ac2 behavior
  Documentation/git-checkout.txt: clarify usage
2012-12-21 15:19:08 -08:00
Junio C Hamano
6600dcbd30 Merge branch 'ta/api-index-doc'
* ta/api-index-doc:
  Remove misleading date from api-index-skel.txt
2012-12-21 15:19:04 -08:00
Junio C Hamano
53096bf0af Merge branch 'jk/avoid-mailto-invalid-in-doc'
Avoids invalid sample e-mail addresses from becoming mailto links
in the formatted output.

* jk/avoid-mailto-invalid-in-doc:
  Documentation: don't link to example mail addresses
2012-12-21 15:18:57 -08:00
Junio C Hamano
c2c6a70a54 Merge branch 'as/doc-for-devs'
It might be a better idea to move the text the bottom one adds to
the extended description from the quick checklist part.

* as/doc-for-devs:
  Documentation: move support for old compilers to CodingGuidelines
  SubmittingPatches: add convention of prefixing commit messages
2012-12-21 15:18:47 -08:00
Junio C Hamano
19b4520ba9 Merge branch 'sl/readme-gplv2'
Clarify that the project as a whole is GPLv2 only, with some parts
borrowed under different licenses that are compatible with GPLv2.

* sl/readme-gplv2:
  README: it does not matter who the current maintainer is
  README: Git is released under the GPLv2, not just "the GPL"
2012-12-21 15:18:41 -08:00
Junio C Hamano
73cf1b540e Merge branch 'jc/fetch-tags-doc'
"git fetch --tags" was explained as if it were "git fetch
--no-no-tags", which is not the case, causing confusion.

* jc/fetch-tags-doc:
  fetch --tags: clarify documentation
2012-12-21 15:18:35 -08:00
Junio C Hamano
d34ccd6df7 Merge branch 'nd/index-format-doc'
* nd/index-format-doc:
  index-format.txt: clarify what is "invalid"
2012-12-21 15:18:32 -08:00
Junio C Hamano
80c78e11a0 Merge branch 'sl/git-svn-docs'
* sl/git-svn-docs:
  git-svn: Note about tags.
  git-svn: Expand documentation for --follow-parent
  git-svn: Recommend use of structure options.
  git-svn: Document branches with at-sign(@).
2012-12-21 15:18:27 -08:00
Junio C Hamano
675a0fe297 Merge branch 'jk/mailmap-cleanup'
Update various entries in our .mailmap file.

* jk/mailmap-cleanup:
  contrib: update stats/mailmap script
  .mailmap: normalize emails for Linus Torvalds
  .mailmap: normalize emails for Jeff King
  .mailmap: fix broken entry for Martin Langhoff
  .mailmap: match up some obvious names/emails
2012-12-21 15:18:20 -08:00
Thomas Ackermann
81670e9bfc Move ./technical/api-command.txt to ./howto/new-command.txt
The contents of this document does not describe any particular API, but
is more about the way to add a new command, which belongs to the "How To"
section of the documentation suite.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-21 10:35:53 -08:00
Rene Bredlau
75e9a405d4 http.c: Avoid username prompt for certifcate credentials
If sslCertPasswordProtected is set to true do not ask for username to decrypt rsa key. This question is pointless, the key is only protected by a password. Internaly the username is simply set to "".

Signed-off-by: Rene Bredlau <git@unrelated.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-21 10:19:40 -08:00
Jeff King
b3f1280ec7 refs: do not use cached refs in repack_without_ref
When we delete a ref that is packed, we rewrite the whole
packed-refs file and simply omit the ref that no longer
exists. However, we base the rewrite on whatever happens to
be in our refs cache, not what is necessarily on disk. That
opens us up to a race condition if another process is
simultaneously packing the refs, as we will overwrite their
newly-made pack-refs file with our potentially stale data,
losing commits.

You can demonstrate the race like this:

  # setup some repositories
  git init --bare parent &&
  (cd parent && git config core.logallrefupdates true) &&
  git clone parent child &&
  (cd child && git commit --allow-empty -m base)

  # in one terminal, repack the refs repeatedly
  cd parent &&
  while true; do
	git pack-refs --all
  done

  # in another terminal, simultaneously push updates to
  # master, and create and delete an unrelated ref
  cd child &&
  while true; do
	git push origin HEAD:newbranch &&
	git commit --allow-empty -m foo
	us=`git rev-parse master` &&
	git push origin master &&
	git push origin :newbranch &&
	them=`git --git-dir=../parent rev-parse master` &&
	if test "$them" != "$us"; then
		echo >&2 "$them" != "$us"
		exit 1
	fi
  done

In many cases the two processes will conflict over locking
the packed-refs file, and the deletion of newbranch will
simply fail.  But eventually you will hit the race, which
happens like this:

  1. We push a new commit to master. It is already packed
     (from the looping pack-refs call). We write the new
     value (let us call it B) to $GIT_DIR/refs/heads/master,
     but the old value (call it A) remains in the
     packed-refs file.

  2. We push the deletion of newbranch, spawning a
     receive-pack process. Receive-pack advertises all refs
     to the client, causing it to iterate over each ref; it
     caches the packed refs in memory, which points at the
     stale value A.

  3. Meanwhile, a separate pack-refs process is running. It
     runs to completion, updating the packed-refs file to
     point master at B, and deleting $GIT_DIR/refs/heads/master
     which also pointed at B.

  4. Back in the receive-pack process, we get the
     instruction to delete :newbranch. We take a lock on
     packed-refs (which works, as the other pack-refs
     process has already finished). We then rewrite the
     contents using the cached refs, which contain the stale
     value A.

The resulting packed-refs file points master once again at
A. The loose ref which would override it to point at B was
deleted (rightfully) in step 3. As a result, master now
points at A. The only trace that B ever existed in the
parent is in the reflog: the final entry will show master
moving from A to B, even though the ref still points at A
(so you can detect this race after the fact, because the
next reflog entry will move from A to C).

We can fix this by invalidating the packed-refs cache after
we have taken the lock. This means that we will re-read the
packed-refs file, and since we have the lock, we will be
sure that what we read will be atomically up-to-date when we
write (it may be out of date with respect to loose refs, but
that is OK, as loose refs take precedence).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-21 08:10:22 -08:00
Thomas Ackermann
18499ba694 Remove duplicate entry in ./Documentation/Makefile
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 10:24:23 -08:00
Junio C Hamano
38104ca6b9 compat/fnmatch: update old-style definition to ANSI
We try to avoid touching borrowed code, but we encourage people to
write without old-style definition and compile with -Werror these
days, and on platforms that need to use NO_FNMATCH, these three
functions make the compilation fail.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 10:20:59 -08:00
Junio C Hamano
5a02966685 t9020: use configured Python to run the test helper
The test helper svnrdump_sim.py is used as "svnrdump" during the
execution of this test, but the arrangement was not optimal:

 - it relied on symbolic links;
 - unportable "export VAR=VAL" was used;
 - GIT_BUILD_DIR variable was not quoted correctly;
 - it assumed that the Python interpreter is in /usr/bin/ and
   called "python" (i.e. not "python2.7" etc.)

Rework this by writing a small shell script that spawns the right
Python interpreter, using the right quoting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 07:46:59 -08:00
Junio C Hamano
2d3ac9ad67 t3600: Avoid "cp -a", which is a GNUism
With d4a7ffa (tests: "cp -a" is a GNUism, 2012-10-08), we got rid of
most of them, but the ones in a topic that was still in flight were
missed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 07:46:44 -08:00
Junio C Hamano
ecd3e2f425 Merge branch 'jc/maint-test-portability' into 'jc/test-portability'
* jc/maint-test-portability:
  t4014: fix arguments to grep
  t9502: do not assume GNU tar
  t0200: "locale" may not exist
2012-12-19 07:46:05 -08:00
Junio C Hamano
27f6342f61 t4014: fix arguments to grep
These "expect-failure" tests were not looking for the right string
in the patch file.  For example:

	grep "^ *"S. E. Cipient" <scipient@example.com>\$" patch5

was looking for "^ *S." in these three files:

    "E."
    "Cipient <scipient@example.com>$"
    "patch5"

With some implementations of grep, the lack of file "E." was
reported as an error, leading to the failure of the test.

With other implementations of grep, the pattern "^ *S." matched what
was in patch5, without diagnosing the missing files as an error, and
made these tests unexpectedly pass.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 07:45:13 -08:00
Junio C Hamano
2060ed50e7 t9502: do not assume GNU tar
The check_snapshot function makes sure that no cruft outside the
repository hierarchy is added to the tar archive.  The output from
"tar tf" on the resulting archive is inspected to see if there is
anything that does not begin with "$prefix/".

There are two issues with this implementation:

 - Traditional tar implemenations that do not understand
   pax_global_header will write it out as if it is a plain file at
   the top-level;

 - Some implementations of tar do not add trailing slash when
   showing a directory entry (i.e. the output line for the entire
   archive will show "$prefix", not "$prefix/").

Fix them so that what we want to validate can be tested with
traditional tar implementations.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 07:44:29 -08:00
Junio C Hamano
7b90363099 t0200: "locale" may not exist
On systems without "locale" installed, t0200-gettext-basic.sh leaked
error messages when checking if some test locales are available.
Hide them, as they are not very useful.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 07:44:20 -08:00
Junio C Hamano
252f922b19 Merge branch 'maint'
* maint:
  t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
2012-12-18 15:35:01 -08:00
Junio C Hamano
f7be59b477 xmkstemp(): avoid showing truncated template more carefully
Some implementations of xmkstemp() leaves the given in/out buffer
truncated when they return with failure.

6cf6bb3 (Improve error messages when temporary file creation fails,
2010-12-18) attempted to show the real filename we tried to create
(but failed), and if that is not available due to such truncation,
to show the original template that was given by the caller.

But it failed to take into account that the given template could
have "directory/" in front, in which case the truncation point may
not be template[0] but somewhere else.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 13:02:33 -08:00
Junio C Hamano
bd52900df4 Documentation: Describe "git diff <blob> <blob>" separately
As it was not a common operation, it was described as if it is a
side note for the more common two-commit variant, but this mode
behaves very differently, e.g. it does not make any sense to ask
recursive behaviour, or give the command a pathspec.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:35:28 -08:00
Junio C Hamano
086cb91153 t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
These tests themselves are properly protected by the GPG
prerequisite, but one of the set-up steps outside the
test_expect_success block unconditionally assumed that there is a
gpghome/ directory, which is not true if GPG is not being used.

It may be a good idea to move the whole set-up steps in the test but
that is a follow-up topic.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:26:24 -08:00
Chris Rorvick
00bb4378c7 Documentation/git-checkout.txt: document 70c9ac2 behavior
Document the behavior implemented in 70c9ac2 (DWIM "git checkout
frotz" to "git checkout -b frotz origin/frotz").

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:07:44 -08:00
Chris Rorvick
e1cdf63316 Documentation/git-checkout.txt: clarify usage
The forms of checkout that do not take a path are lumped together in
the DESCRIPTION section, but the description for this group is
dominated by explanation of the -b|-B form.

Split these apart for more clarity.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:04:52 -08:00
Junio C Hamano
b7cd0c9b69 Sync with 'maint' 2012-12-18 10:51:22 -08:00
Junio C Hamano
8e8c8817cd Merge branch 'jk/pickaxe-textconv' into maint
"git log -p -S<string>" now looks for the <string> after applying
the textconv filter (if defined); earlier it inspected the contents
of the blobs without filtering.
2012-12-18 10:50:07 -08:00
Sitaram Chamarty
31d66aa408 clarify -M without % symbol in diff-options
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 08:46:15 -08:00
Jean-Noël AVILA
94bc671a1f Add directory pattern matching to attributes
The manpage of gitattributes says: "The rules how the pattern
matches paths are the same as in .gitignore files" and the gitignore
pattern matching has a pattern ending with / for directory matching.

This rule is specifically relevant for the 'export-ignore' rule used
for git archive.

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-17 22:07:23 -08:00
Sven Strickroth
e9263e4580 git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
git-svn reads usernames and other user queries from an interactive
terminal. This cause GUIs (w/o STDIN connected) to hang waiting forever
for git-svn to complete (http://code.google.com/p/tortoisegit/issues/detail?id=967).

This change extends the Git::prompt helper, so that it can also be used
for non password queries, and makes use of it instead of using
hand-rolled prompt-response code that only works with the interactive
terminal.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-17 17:21:26 -08:00