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

35071 Commits

Author SHA1 Message Date
John Keeping
0079d6ebd7 Documentation/Makefile: make AsciiDoc dblatex dir configurable
On my system this is in /usr/share/asciidoc/dblatex not
/etc/asciidoc/dblatex.  Extract this portion of the path to a variable
so that is can be set in config.mak.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-03 12:21:19 -07:00
Jeff King
1bbcc224cc http: refactor options to http_get_*
Over time, the http_get_strbuf function has grown several
optional parameters. We now have a bitfield with multiple
boolean options, as well as an optional strbuf for returning
the content-type of the response. And a future patch in this
series is going to add another strbuf option.

Treating these as separate arguments has a few downsides:

  1. Most call sites need to add extra NULLs and 0s for the
     options they aren't interested in.

  2. The http_get_* functions are actually wrappers around
     2 layers of low-level implementation functions. We have
     to pass these options through individually.

  3. The http_get_strbuf wrapper learned these options, but
     nobody bothered to do so for http_get_file, even though
     it is backed by the same function that does understand
     the options.

Let's consolidate the options into a single struct. For the
common case of the default options, we'll allow callers to
simply pass a NULL for the options struct.

The resulting code is often a few lines longer, but it ends
up being easier to read (and to change as we add new
options, since we do not need to update each call site).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-30 17:21:59 -07:00
Kirill A. Shutemov
568950388b rebase -i: respect core.abbrev
collapse_todo_ids() uses `git rev-parse --short=7' to abbreviate
commit ids before showing them to the user in a text editor.  Let's
drop argument from --short to the configured value instead (still
defaulting to 7).

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-30 14:34:50 -07:00
Jeff King
132b70a2ed http_request: factor out curlinfo_strbuf
When we retrieve the content-type of an http response, curl
gives us a pointer to internal storage, which we then copy
into a strbuf. Let's factor out the get-and-copy routine,
which can be used for getting other curl info.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-30 13:04:45 -07:00
Jeff King
3d1fb769b2 http_get_file: style fixes
Besides being ugly, the extra parentheses are idiomatic for
suppressing compiler warnings when we are assigning within a
conditional. We aren't doing that here, and they just
confuse the reader.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-30 13:04:31 -07:00
Matthieu Moy
9cd755b2fc RelNotes/1.8.5: direct script writers to "git status --porcelain"
[jn: with wording tweak from Keshav Kini]

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 17:05:02 -07:00
Philip Oakley
e49c8f33ab remote set-head -h: add long options to synopsis
Document --auto and --delete alongside their short forms -a and -d in
the first line of 'git remote set-head -h' output.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 16:51:27 -07:00
Philip Oakley
159543e831 remote doc: document long forms of set-head options
"git remote set-head" has always supported --add and --delete
as synonyms for the -a and -d option but forgot to document
them.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 16:49:18 -07:00
Nguyễn Thái Ngọc Duy
8d3d28f5db clone: tighten "local paths with colons" check a bit
commit 6000334 (clone: allow cloning local paths with colons in them -
2013-05-04) made it possible to specify a path that has colons in it
without file://, e.g. ../foo:bar/somewhere. But the check was a bit
sloppy.

Consider the url '[foo]:bar'. The '[]' unwrapping code will turn the
string to 'foo\0:bar'. In effect this new string is the same as
'foo/:bar' in the check "path < strchrnul(host, '/')", which mistakes
it for a local path (with '/' before the first ':') when it's actually
not.

So disable the check for '/' before ':' when the URL has been mangled
by '[]' unwrapping.

[jn: with tests from Jeff King]

Noticed-by: Morten Stenshorne <mstensho@opera.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 14:47:49 -07:00
Stefan Beller
6dab2781a1 contrib: remove ciabot
Almost a year ago the CIA service irrevocably crashed.  The CIA author
had plans to revive the service, but the effort has since sunk without
trace.

Projects tend to use "irker" instead these days.  Repository hook
scripts for irker ship with the irker distribution.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Acked-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26 15:49:36 -07:00
Jonathan Nieder
8de8e40caa Sync with Git 1.8.4.1 2013-09-26 15:36:57 -07:00
Jonathan Nieder
02a110ad43 Git 1.8.4.1
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
v1.8.4.1
2013-09-26 15:01:41 -07:00
John Keeping
6562928ae9 merge-recursive: fix parsing of "diff-algorithm" option
The "diff-algorithm" option to the recursive merge strategy takes the
name of the algorithm as an option, but it uses strcmp on the option
string to check if it starts with "diff-algorithm=", meaning that this
options cannot actually be used.

Fix this by switching to prefixcmp.  At the same time, clarify the
following line by using strlen instead of a hard-coded length, which
also makes it consistent with nearby code.

Reported-by: Luke Noel-Storr <luke.noel-storr@integrate.co.uk>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26 13:52:16 -07:00
Jonathan Nieder
437ce600fb Merge branch 'mm/rebase-continue-freebsd-WB' into maint
* mm/rebase-continue-freebsd-WB:
  rebase: fix run_specific_rebase's use of "return" on FreeBSD
2013-09-26 12:41:14 -07:00
Jonathan Nieder
76deaab4e8 Merge branch 'km/svn-1.8-serf-only' into maint
* km/svn-1.8-serf-only:
  Git.pm: revert _temp_cache use of temp_is_locked
  git-svn: allow git-svn fetching to work using serf
  Git.pm: add new temp_is_locked function
2013-09-26 12:34:23 -07:00
Jonathan Nieder
be5e85016f Merge branch 'js/xread-in-full' into maint
* js/xread-in-full:
  stream_to_pack: xread does not guarantee to read all requested bytes
2013-09-26 12:30:44 -07:00
Jonathan Nieder
31d757d512 Merge branch 'bc/send-email-ssl-die-message-fix' into maint
* bc/send-email-ssl-die-message-fix:
  send-email: don't call methods on undefined values
2013-09-26 12:27:29 -07:00
Jonathan Nieder
5636a20070 Merge branch 'bc/submodule-status-ignored'
* bc/submodule-status-ignored:
  Improve documentation concerning the status.submodulesummary setting
  submodule: don't print status output with ignore=all
  submodule: fix confusing variable name
2013-09-24 23:36:08 -07:00
Jonathan Nieder
80f165a58a Merge branch 'cc/replace-with-the-same-type'
* cc/replace-with-the-same-type:
  Doc: 'replace' merge and non-merge commits
  t6050-replace: use some long option names
  replace: allow long option names
  Documentation/replace: add Creating Replacement Objects section
  t6050-replace: add test to clean up all the replace refs
  t6050-replace: test that objects are of the same type
  Documentation/replace: state that objects must be of the same type
  replace: forbid replacing an object with one of a different type
2013-09-24 23:35:24 -07:00
Jonathan Nieder
d0c789084c Merge branch 'kb/msvc-compile'
* kb/msvc-compile:
  Windows: do not redefine _WIN32_WINNT
  MinGW: Fix stat definitions to work with MinGW runtime version 4.0
  MSVC: fix stat definition hell
  MSVC: fix compile errors due to macro redefinitions
  MSVC: fix compile errors due to missing libintl.h
2013-09-24 23:31:58 -07:00
Jonathan Nieder
87bcf148d7 Merge branch 'nd/unpack-entry-optim-in-pack-objects'
* nd/unpack-entry-optim-in-pack-objects:
  pack-objects: no crc check when the cached version is used
2013-09-24 23:29:55 -07:00
Jonathan Nieder
7f794aab3e Merge branch 'jk/shortlog-tolerate-broken-commit'
* jk/shortlog-tolerate-broken-commit:
  shortlog: ignore commits with missing authors
2013-09-24 23:29:00 -07:00
Jonathan Nieder
a301889980 Merge branch 'jc/strcasecmp-pure-inline'
* jc/strcasecmp-pure-inline:
  mailmap: work around implementations with pure inline strcasecmp
2013-09-24 23:28:13 -07:00
Jonathan Nieder
b7f571618c Merge branch 'sg/complete-untracked-filter'
* sg/complete-untracked-filter:
  completion: improve untracked directory filtering for filename completion
2013-09-24 23:27:44 -07:00
Jonathan Nieder
40b77322d2 Merge branch 'nd/fetch-pack-error-reporting-fix'
* nd/fetch-pack-error-reporting-fix:
  fetch-pack.c: show correct command name that fails
2013-09-24 23:27:02 -07:00
Jonathan Nieder
eb34959e10 Merge branch 'es/contacts-in-subdir'
* es/contacts-in-subdir:
  contacts: fix to work in subdirectories
2013-09-24 23:25:23 -07:00
Jonathan Nieder
1939ce67ed Merge branch 'jc/push-cas'
* jc/push-cas:
  t5541: mark passing c-a-s test as success
2013-09-24 23:22:03 -07:00
Jonathan Nieder
962393b5d9 Merge branch 'maint'
* maint:
  git-remote-mediawiki: bugfix for pages w/ >500 revisions
2013-09-24 23:19:00 -07:00
Michael S. Tsirkin
ccba805681 doc: don't claim that cherry calls patch-id
The id is already different for binary files.  The hash used is an
implementation detail, so let's just document how diffs are compared.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-24 15:54:48 -07:00
Benoit Person
1d905f74fd git-remote-mediawiki: bugfix for pages w/ >500 revisions
Mediawiki introduces a new API for queries w/ more than 500 results in
version 1.21. That change triggered an infinite loop while cloning a
mediawiki with such a page.

The latest API renamed and moved the "continuing" information in the
response, necessary to build the next query. The code failed to retrieve
that information but still detected that it was in a "continuing
query". As a result, it launched the same query over and over again.

If a "continuing" information is detected in the response (old or new),
the next query is updated accordingly. If not, we quit assuming it's not
a continuing query.

Reported-by: Benjamin Cathey
Signed-off-by: Benoit Person <benoit.person@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-24 12:42:21 -07:00
Johan Herland
af1748b31e sample pre-commit hook: use --bool when retrieving config var
Currently if you set

	[hooks]
		allowNonAscii

(or allownonascii = 1, or = yes) in your .git/config then the sample
pre-commit misinterprets the value as "false" and rejects non-ASCII
filenames.  Use "git config --bool" to get the usual nicer boolean
handling.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-24 12:26:49 -07:00
Sebastian Schuberth
debce6ac2a clone: add a period after "done" to end the sentence
We have a period in other places after "done" (see e.g. clone_local), so
we should have one here, too.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-24 12:18:24 -07:00
Brandon Casey
083afc0ec0 contrib/git-credential-gnome-keyring.c: remove unused die() function
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-23 10:58:07 -07:00
Brandon Casey
e72aefc9ec contrib/git-credential-gnome-keyring.c: remove unnecessary pre-declarations
These are all defined before they are used, so it is not necessary to
pre-declare them.  Remove the pre-declarations.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-23 10:58:07 -07:00
Junio C Hamano
128a96c984 Update draft release notes to 1.8.5 for the fifth batch of topics
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-20 12:42:02 -07:00
Junio C Hamano
7b8315bb59 Merge branch 'jk/upload-pack-keepalive'
When running "fetch -q", a long silence while the sender side
computes the set of objects to send can be mistaken by proxies as
dropped connection.  The server side has been taught to send a small
empty messages to keep the connection alive.

* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation
2013-09-20 12:39:05 -07:00
Junio C Hamano
f406140baa Merge branch 'fc/at-head'
Instead of typing four capital letters "HEAD", you can say "@" now,
e.g. "git log @".

* fc/at-head:
  Add new @ shortcut for HEAD
  sha1-name: pass len argument to interpret_branch_name()
2013-09-20 12:38:10 -07:00
Junio C Hamano
005a1de380 Merge branch 'dw/check-ignore-sans-index'
"git check-ignore" follows the same rule as "git add" and "git
status" in that the ignore/exclude mechanism does not take effect
on paths that are already tracked.  With "--no-index" option, it
can be used to diagnose which paths that should have been ignored
have been mistakenly added to the index.

* dw/check-ignore-sans-index:
  check-ignore: Add option to ignore index contents
2013-09-20 12:37:32 -07:00
Junio C Hamano
b4980c63ac Merge branch 'mm/commit-template-squelch-advice-messages'
From the commit log template, remove irrelevant "advice" messages
that are shared with "git status" output.

* mm/commit-template-squelch-advice-messages:
  commit: disable status hints when writing to COMMIT_EDITMSG
  wt-status: turn advice_status_hints into a field of wt_status
  commit: factor status configuration is a helper function
2013-09-20 12:36:32 -07:00
Junio C Hamano
9a86b89941 Merge branch 'bk/refs-multi-update'
Give "update-refs" a "--stdin" option to read multiple update
requests and perform them in an all-or-none fashion.

* bk/refs-multi-update:
  update-ref: add test cases covering --stdin signature
  update-ref: support multiple simultaneous updates
  refs: add update_refs for multiple simultaneous updates
  refs: add function to repack without multiple refs
  refs: factor delete_ref loose ref step into a helper
  refs: factor update_ref steps into helpers
  refs: report ref type from lock_any_ref_for_update
  reset: rename update_refs to reset_refs
2013-09-20 12:36:12 -07:00
Junio C Hamano
087350398e Merge branch 'nr/git-cd-to-a-directory'
Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.

* nr/git-cd-to-a-directory:
  t0056: "git -C" test updates
  git: run in a directory given with -C option
2013-09-20 12:35:42 -07:00
Junio C Hamano
f26f250b44 Merge branch 'mm/rebase-continue-freebsd-WB'
Work around a bug in FreeBSD shell that caused a regression to "git
rebase" in v1.8.4.  May need to be later applied to 'maint'.

* mm/rebase-continue-freebsd-WB:
  rebase: fix run_specific_rebase's use of "return" on FreeBSD
2013-09-20 12:34:37 -07:00
Junio C Hamano
b05fc49adc Merge branch 'jh/checkout-auto-tracking'
Fix a minor regression in v1.8.3.2 and later that made it
impossible to base your local work on anything but a local branch
of the upstream repository you are tracking from.

* jh/checkout-auto-tracking:
  t3200: fix failure on case-insensitive filesystems
  branch.c: Relax unnecessary requirement on upstream's remote ref name
  t3200: Add test demonstrating minor regression in 41c21f2
  Refer to branch.<name>.remote/merge when documenting --track
  t3200: Minor fix when preparing for tracking failure
  t2024: Fix &&-chaining and a couple of typos
2013-09-20 12:31:57 -07:00
Junio C Hamano
26e53f8ac0 Merge branch 'bc/http-backend-allow-405'
When the webserver responds with "405 Method Not Allowed", it
should tell the client what methods are allowed with the "Allow"
header.

* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
2013-09-20 12:30:54 -07:00
Junio C Hamano
3fb9d685db Merge branch 'np/lookup-object-hashing'
Micro optimize hash function used in the object hash table.

* np/lookup-object-hashing:
  lookup_object: remove hashtable_index() and optimize hash_obj()
2013-09-20 12:30:49 -07:00
Junio C Hamano
08092082b7 Merge branch 'hu/cherry-pick-previous-branch'
Just like "git checkout -" knows to check out and "git merge -"
knows to merge the branch you were previously on, "git cherry-pick"
now understands "git cherry-pick -" to pick from the previous
branch.

* hu/cherry-pick-previous-branch:
  cherry-pick: allow "-" as abbreviation of '@{-1}'
2013-09-20 12:29:58 -07:00
Junio C Hamano
6d3e1f2e45 Merge branch 'mm/status-without-comment-char'
"git status" now omits the prefix to make its output a comment in a
commit log editor, which is not necessary for human consumption.

We may want to tighten the output to omit unnecessary trailing blank
lines, but that does not have to be in the scope of this series.

* mm/status-without-comment-char:
  t7508: avoid non-portable sed expression
  status: add missing blank line after list of "other" files
  tests: don't set status.displayCommentPrefix file-wide
  status: disable display of '#' comment prefix by default
  submodule summary: ignore --for-status option
  wt-status: use argv_array API
  builtin/stripspace.c: fix broken indentation
2013-09-20 12:29:01 -07:00
Junio C Hamano
638924fec2 Merge branch 'rh/peeling-tag-to-tag'
Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
"foo" is not a tag.  "git rev-parse --verify v1.0^{tag}" would be a
more convenient way to say "test $(git cat-file -t v1.0) = tag".

* rh/peeling-tag-to-tag:
  peel_onion: do not assume length of x_type globals
  peel_onion(): add support for <rev>^{tag}
2013-09-20 12:27:18 -07:00
Junio C Hamano
2e6e3e82ee Merge branch 'jx/branch-vv-always-compare-with-upstream'
"git branch -v -v" (and "git status") did not distinguish among a
branch that does not build on any other branch, a branch that is in
sync with the branch it builds on, and a branch that is configured
to build on some other branch that no longer exists.

* jx/branch-vv-always-compare-with-upstream:
  status: always show tracking branch even no change
  branch: report invalid tracking branch as gone
2013-09-20 12:26:57 -07:00
Junio C Hamano
238504b014 Merge branch 'nd/fetch-into-shallow'
When there is no sufficient overlap between old and new history
during a fetch into a shallow repository, we unnecessarily sent
objects the sending side knows the receiving end has.

* nd/fetch-into-shallow:
  Add testcase for needless objects during a shallow fetch
  list-objects: mark more commits as edges in mark_edges_uninteresting
  list-objects: reduce one argument in mark_edges_uninteresting
  upload-pack: delegate rev walking in shallow fetch to pack-objects
  shallow: add setup_temporary_shallow()
  shallow: only add shallow graft points to new shallow file
  move setup_alternate_shallow and write_shallow_commits to shallow.c
2013-09-20 12:25:32 -07:00