1
0
mirror of https://github.com/git/git.git synced 2024-10-22 12:28:32 +02:00
Commit Graph

34986 Commits

Author SHA1 Message Date
Junio C Hamano
d6a58b7773 Merge branch 'es/name-hash-no-trailing-slash-in-dirs'
Clean up the internal of the name-hash mechanism used to work
around case insensitivity on some filesystems to cleanly fix a
long-standing API glitch where the caller of cache_name_exists()
that ask about a directory with a counted string was required to
have '/' at one location past the end of the string.

* es/name-hash-no-trailing-slash-in-dirs:
  dir: revert work-around for retired dangerous behavior
  name-hash: stop storing trailing '/' on paths in index_state.dir_hash
  employ new explicit "exists in index?" API
  name-hash: refactor polymorphic index_name_exists()
2013-10-17 15:55:16 -07:00
Junio C Hamano
be98d915be Merge branch 'jk/trailing-slash-in-pathspec'
Code refactoring.

* jk/trailing-slash-in-pathspec:
  reset: handle submodule with trailing slash
  rm: re-use parse_pathspec's trailing-slash removal
2013-10-17 15:55:14 -07:00
Junio C Hamano
f52752d36a Merge branch 'lc/filter-branch-too-many-refs'
"git filter-branch" in a repository with many refs blew limit of
command line length.

* lc/filter-branch-too-many-refs:
  Allow git-filter-branch to process large repositories with lots of branches.
2013-10-17 15:55:12 -07:00
Junio C Hamano
ff6e1b887f Merge branch 'jc/checkout-detach-doc'
"git checkout [--detach] <commit>" was listed poorly in the
synopsis section of its documentation.

* jc/checkout-detach-doc:
  checkout: update synopsys and documentation on detaching HEAD
2013-10-17 15:55:08 -07:00
Junio C Hamano
83f18cdd71 Sync with maint
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-17 15:54:28 -07:00
Junio C Hamano
92ab409055 Start preparing for 1.8.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-17 15:50:45 -07:00
Junio C Hamano
9432c6aaa5 Merge branch 'jk/upload-pack-keepalive' into maint
* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation
2013-10-17 15:46:01 -07:00
Junio C Hamano
968792eeeb Merge branch 'bc/http-backend-allow-405' into maint
* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
2013-10-17 15:46:00 -07:00
Junio C Hamano
da39d5e0bc Merge branch 'jc/cvsserver-perm-bit-fix' into maint
* jc/cvsserver-perm-bit-fix:
  cvsserver: pick up the right mode bits
2013-10-17 15:45:58 -07:00
Junio C Hamano
fa0963dac7 Merge branch 'js/add-i-mingw' into maint
* js/add-i-mingw:
  add--interactive: fix external command invocation on Windows
2013-10-17 15:45:56 -07:00
Junio C Hamano
f8aeacfa1f Merge branch 'nd/git-dir-pointing-at-gitfile' into maint
* nd/git-dir-pointing-at-gitfile:
  Make setup_git_env() resolve .git file when $GIT_DIR is not specified
2013-10-17 15:45:55 -07:00
Junio C Hamano
7d9dd6da4a Merge branch 'jk/has-sha1-file-retry-packed' into maint
* jk/has-sha1-file-retry-packed:
  has_sha1_file: re-check pack directory before giving up
2013-10-17 15:45:54 -07:00
Junio C Hamano
87b24a42ea Merge branch 'ap/commit-author-mailmap' into maint
* ap/commit-author-mailmap:
  commit: search author pattern against mailmap
2013-10-17 15:45:52 -07:00
Junio C Hamano
f8a3fd28fd Merge branch 'es/rebase-i-no-abbrev' into maint
* es/rebase-i-no-abbrev:
  rebase -i: fix short SHA-1 collision
  t3404: rebase -i: demonstrate short SHA-1 collision
  t3404: make tests more self-contained

Conflicts:
	t/t3404-rebase-interactive.sh
2013-10-17 15:45:50 -07:00
Junio C Hamano
9a3a02b605 Merge branch 'rt/rebase-p-no-merge-summary' into maint
* rt/rebase-p-no-merge-summary:
  rebase --preserve-merges: ignore "merge.log" config
2013-10-17 15:45:45 -07:00
Junio C Hamano
6f89c2714a Merge branch 'es/rebase-i-respect-core-commentchar' into maint
* es/rebase-i-respect-core-commentchar:
  rebase -i: fix cases ignoring core.commentchar
2013-10-17 15:45:24 -07:00
SZEDER Gábor
ddeaf7ef0d t4254: modernize tests
- Don't start tests with 'test $? = 0' to catch preparation done
  outside the test_expect_success block.

- Move writing the bogus patch and the expected output into the
  appropriate test_expect_success blocks.

- Use the test_must_fail helper instead of manually checking for
  non-zero exit code.

- Use the debug-friendly test_path_is_file helper instead of 'test -f'.

- No space after '>'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-17 15:05:53 -07:00
Junio C Hamano
1d25dd416f Update draft release notes to 1.8.5
List notable topics that graduated during Jonathan's interim
maintainership.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 12:27:45 -07:00
Junio C Hamano
1668b7d78f Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: Warn about changing default for --prefix in Git v2.0
  Documentation/git-svn: Promote the use of --prefix in docs + examples
  git-svn.txt: elaborate on rev_map files
  git-svn.txt: replace .git with $GIT_DIR
  git-svn.txt: reword description of gc command
  git-svn.txt: fix AsciiDoc formatting error
  git-svn: fix signed commit parsing
2013-10-16 10:45:58 -07:00
Brandon Casey
15f7221686 contrib/git-credential-gnome-keyring.c: support really ancient gnome-keyring
The gnome-keyring lib (0.4) distributed with RHEL 4.X is really ancient
and does not provide most of the synchronous functions that even ancient
releases do.  Thankfully, we're only using one function that is missing.
Let's emulate gnome_keyring_item_delete_sync() by calling the asynchronous
function and then triggering the event loop processing until our
callback is called.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:33 -07:00
Brandon Casey
5a3db11053 contrib/git-credential-gnome-keyring.c: support ancient gnome-keyring
The gnome-keyring lib distributed with RHEL 5.X is ancient and does
not provide a few of the functions/defines that more recent versions
do, but mostly the API is the same.  Let's provide the missing bits
via macro definitions and function implementation.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:33 -07:00
Brandon Casey
81c57e2c9d contrib/git-credential-gnome-keyring.c: report failure to store password
Produce an error message when we fail to store a password to the keyring.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:33 -07:00
Brandon Casey
3006297a0e contrib/git-credential-gnome-keyring.c: use glib messaging functions
Rather than roll our own, let's use the messaging functions provided
by glib.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:32 -07:00
Brandon Casey
68a65f5fe5 contrib/git-credential-gnome-keyring.c: use glib memory allocation functions
Rather than roll our own, let's use the memory allocation/free routines
provided by glib.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:32 -07:00
Brandon Casey
da2727f23c contrib/git-credential-gnome-keyring.c: use secure memory for reading passwords
gnome-keyring provides functions to allocate non-pageable memory (if
possible).  Let's use them to allocate memory that may be used to hold
secure data read from the keyring.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:32 -07:00
Brandon Casey
9fe3e6cf9e contrib/git-credential-gnome-keyring.c: use secure memory functions for passwds
gnome-keyring provides functions for allocating non-pageable memory (if
possible) intended to be used for storing passwords.  Let's use them.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
8bb7a54c57 contrib/git-credential-gnome-keyring.c: use gnome helpers in keyring_object()
Rather than carefully allocating memory for sprintf() to write into,
let's make use of the glib helper function g_strdup_printf(), which
makes things a lot easier and less error-prone.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
ff55c47d0f contrib/git-credential-gnome-keyring.c: set Gnome application name
Since this is a Gnome application, let's set the application name to
something reasonable.  This will be displayed in Gnome dialog boxes
e.g. the one that prompts for the user's keyring password.

We add an include statement for glib.h and add the glib-2.0 cflags and
libs to the compilation arguments, but both of these are really noops
since glib is already a dependency of gnome-keyring.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
73bbc0796b contrib/git-credential-gnome-keyring.c: ensure buffer is non-empty before accessing
Ensure buffer length is non-zero before attempting to access the last
element.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
fb2763746f contrib/git-credential-gnome-keyring.c: strlen() returns size_t, not ssize_t
Also, initialization is not necessary since it is assigned before it is
used.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:30 -07:00
Brandon Casey
7a6d6423c5 contrib/git-credential-gnome-keyring.c: exit non-zero when called incorrectly
If the correct arguments were not specified, this program should exit
non-zero.  Let's do so.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:30 -07:00
Brandon Casey
18fe5add33 contrib/git-credential-gnome-keyring.c: add static where applicable
Mark global variable and functions as static.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:29 -07:00
Brandon Casey
4bc47cc009 contrib/git-credential-gnome-keyring.c: *style* use "if ()" not "if()" etc.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:34:26 -07:00
Junio C Hamano
9768648144 Merge branch 'maint'
* maint:
  git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY
  clone --branch: refuse to clone if upstream repo is empty
2013-10-15 16:15:00 -07:00
Steffen Prohaska
3991e91063 git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY
git-prune-packed operates on GIT_OBJECT_DIRECTORY, not
GIT_OBJECT_DIR.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 16:01:22 -07:00
Steffen Prohaska
6fb02165a3 git.txt: fix asciidoc syntax of --*-pathspecs
Labeled lists require a double colon.

[jc] I eyeballed the output from

        git grep '[^:]:$' Documentation/\*.txt

     and the patch fixes all breakages of this kind.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 15:47:05 -07:00
Philip Oakley
08f8d5d0c0 doc/cli: make "dot repository" an independent bullet point
The way to spell the current repository with a '.' dot is
independent from how the pathspec allows globs expanded by Git.

Make them two separate bullet items in the enumeration.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-15 14:58:21 -07:00
Stefan Saasen
2b7ca916fc mergetool--lib: Fix typo in the merge/difftool help
The help text for the `tool` flag should mention:

    --tool=<tool>

instead of:

    --tool-<tool>

Signed-off-by: Stefan Saasen <ssaasen@atlassian.com>
Reviewed-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:28:38 -07:00
Ramsay Jones
9371322a60 sparse: suppress some "using sizeof on a function" warnings
Sparse issues an "using sizeof on a function" warning for each
call to curl_easy_setopt() which sets an option that takes a
function pointer parameter. (currently 12 such warnings over 4
files.)

The warnings relate to the use of the "typecheck-gcc.h" header
file which adds a layer of type-checking macros to the curl
function invocations (for gcc >= 4.3 and !__cplusplus). As part
of the type-checking layer, 'sizeof' is applied to the function
parameter of curl_easy_setopt(). Note that, in the context of
sizeof, the function to function pointer conversion is not
performed and that sizeof(f) != sizeof(&f).

A simple solution, therefore, would be to replace the function
name in each such call to curl_easy_setopt() with an explicit
function pointer expression (i.e. replace f with &f).

However, the "typecheck-gcc.h" header file is only conditionally
included, in addition to the gcc and C++ checks mentioned above,
depending on the CURL_DISABLE_TYPECHECK preprocessor variable.

In order to suppress the warnings, we use target-specific variable
assignments to add -DCURL_DISABLE_TYPECHECK to SPARSE_FLAGS for
each file affected (http-push.c, http.c, http-walker.c and
remote-curl.c).

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:22:28 -07:00
Ramsay Jones
f737684d34 format-patch doc: Thunderbird wraps lines unless mailnews.wraplength=0
The Thunderbird section of the 'MUA-specific hints' contains three
different approaches to setting up the mail client to leave patch
emails unmolested. The second approach (configuration) has a step
missing when configuring the composition window not to wrap. In
particular, the "mailnews.wraplength" configuration variable needs
to be set to zero. Update the documentation to add the missing
setting.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:20:01 -07:00
Jonathan Nieder
a43948bae9 Merge branch 'rj/highlight-test-hang'
* rj/highlight-test-hang:
  gitweb test: fix highlight test hang on Linux Mint
2013-10-14 16:19:31 -07:00
Ramsay Jones
7202db8647 gitweb test: fix highlight test hang on Linux Mint
Linux Mint has an implementation of the highlight command (unrelated
to the one from http://www.andre-simon.de) that works as a simple
filter. The script uses 'sed' to add terminal colour escape codes
around text matching a regular expression. When t9500-*.sh attempts
to run "highlight --version", the script simply hangs waiting for
input. (See https://bugs.launchpad.net/linuxmint/+bug/815005).

The tool required by gitweb can be installed from the 'highlight'
package. Unfortunately, given the default $PATH, this leads to the
tool having lower precedence than the script.

In order to avoid hanging the test, add '</dev/null' to the command
line of the highlight invocation. Also, since the 'highlight' tool
requred by gitweb produces '--version' output (and the script does
not), saving the command output allows a simple check for the wrong
'highlight'.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:19:15 -07:00
Ramsay Jones
ec145c9c2e wrapper.c: only define gitmkstemps if needed
When the NO_MKSTEMPS build variable is not set, the gitmkstemps
function is dead code.  Use a preprocessor conditional to only include
the definition when needed.

Noticed by sparse.  ("'gitmkstemps' was not declared. Should it be
static?")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:16:00 -07:00
Ramsay Jones
ce1e846207 refs.c: spell NULL pointer as NULL
A call to update_ref_lock() passes '0' to the 'int *type_p' parameter.
Noticed by sparse.  ("Using plain integer as NULL pointer")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:10:50 -07:00
Ramsay Jones
0b4dc66169 config.c: mark file-local function static
Commit 7192777 refactors git_parse_ulong, which is public, into a more
generic function.  But since we kept the git_parse_ulong wrapper, only
that part needs to be public; nobody outside the file calls the
lower-level git_parse_unsigned.

Noticed with sparse.  ("'git_parse_unsigned' was not declared. Should
it be static?")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Explained-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 16:00:37 -07:00
brian m. carlson
b75a6ca7f3 CodingGuidelines: style for multi-line comments
The style for multi-line comments is often mentioned and should be documented
for clarity.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 12:48:06 -07:00
Jonathan Nieder
110f415ce8 Merge branch 'nv/doc-config-signingkey'
* nv/doc-config-signingkey:
  config doc: user.signingkey is also used for signed commits
2013-10-14 12:45:50 -07:00
Nicolas Vigier
f0551693cc config doc: user.signingkey is also used for signed commits
The description of the user.signingkey option only mentioned its use
when creating a signed tag. Make it clear that is is also used when
creating signed commits.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 12:45:22 -07:00
Ralf Thielow
a3552aba55 clone --branch: refuse to clone if upstream repo is empty
Since 920b691 (clone: refuse to clone if --branch
points to bogus ref) we refuse to clone with option
"-b" if the specified branch does not exist in the
(non-empty) upstream. If the upstream repository is empty,
the branch doesn't exist, either. So refuse the clone too.

Reported-by: Robert Mitwicki <robert.mitwicki@opensoftware.pl>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 12:26:15 -07:00
Jonathan Nieder
774282d16a Merge branch 'sb/checkout-test-complex-path'
* sb/checkout-test-complex-path:
  checkout test: enable test with complex relative path
2013-10-14 11:09:30 -07:00