Commit graph

35054 commits

Author SHA1 Message Date
Felipe Contreras 9e57ac55ce revision: trivial style fixes
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:48:05 -07:00
Felipe Contreras 35b2fa5ba3 pretty: trivial style fix
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:47:41 -07:00
Felipe Contreras c44726438f describe: trivial style fixes
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:47:35 -07:00
Felipe Contreras 23cd01ec53 transport-helper: trivial style fix
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:47:22 -07:00
Felipe Contreras 57b15ead77 sha1-name: trivial style cleanup
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:47:19 -07:00
Felipe Contreras 54d07f2e25 branch: trivial style fix
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:46:55 -07:00
Felipe Contreras 19ecb564ad revision: add missing include
Otherwise we might not have 'struct diff_options'.

[jc: needs a matching follow-up patch to remove inclusion of diff.h
from *.c files that do not themselves use anything from diff.h]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:46:03 -07:00
Junio C Hamano 5a3fd6afd4 doc/pull: clarify the illustrations
The second illustration that shows the history after "git pull"
spelled the remote-tracking branch with "remotes/" prefix, which
is not necessary.  Drop it.

To match the assumption that a remote-tracking branch is used to
keep track of the advancement of the master at the origin, update
the first illustration that shows the history before "git pull"
to show the distinction between the master currently at origin and
the stale origin/master remote-tracking branch.

Noticed-by: Felipe Contreras <felipe.contreras@gmail.com>
Helped-by: Max Horn <max@quendi.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 13:45:29 -07:00
Felipe Contreras 501a75a7b3 t: replace pulls with merges
This is what the code intended.

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 11:12:26 -07:00
Felipe Contreras 90f867b9a5 merge: simplify ff-only option
No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-31 11:12:24 -07:00
Junio C Hamano 42817b96b1 Git 1.8.5-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-30 12:17:47 -07:00
Junio C Hamano 05ad292d61 Merge branch 'maint'
* maint:
  t5570: Update for clone-progress-to-stderr branch
2013-10-30 12:11:22 -07:00
Junio C Hamano 149a8134a7 Merge branch 'jk/refs-c-squelch-gcc'
* jk/refs-c-squelch-gcc:
  silence gcc array-bounds warning
2013-10-30 12:11:04 -07:00
Junio C Hamano 7522c589c9 Merge branch 'jk/date-c-double-semicolon'
* jk/date-c-double-semicolon:
  drop redundant semicolon in empty while
2013-10-30 12:11:01 -07:00
Junio C Hamano c02e1e4a07 Merge branch 'nd/lift-path-max'
* nd/lift-path-max:
  checkout_entry(): clarify the use of topath[] parameter
  entry.c: convert checkout_entry to use strbuf
2013-10-30 12:10:56 -07:00
Junio C Hamano f989180262 Merge branch 'tr/valgrind-test-fix'
* tr/valgrind-test-fix:
  Revert "test-lib: allow prefixing a custom string before "ok N" etc."
  Revert "test-lib: support running tests under valgrind in parallel"
2013-10-30 12:10:52 -07:00
Junio C Hamano 0040d6eb23 Merge branch 'tr/gitk-doc-update'
* tr/gitk-doc-update:
  Documentation: revamp gitk(1)
2013-10-30 12:10:50 -07:00
Junio C Hamano 832ee79ab8 Merge branch 'jl/pack-transfer-avoid-double-close'
The codepath that send_pack() calls pack_objects() mistakenly
closed the same file descriptor twice, leading to potentially
closing a wrong file descriptor that was opened in the meantime.

* jl/pack-transfer-avoid-double-close:
  Clear fd after closing to avoid double-close error
2013-10-30 12:10:45 -07:00
Junio C Hamano 02882bc834 Merge branch 'sb/git-svn-docs-indent-with-ht'
* sb/git-svn-docs-indent-with-ht:
  git-svn docs: Use tabs consistently within the ascii doc
2013-10-30 12:10:34 -07:00
Junio C Hamano 4cebbe6f55 Merge branch 'nd/magic-pathspec'
All callers to parse_pathspec() must choose between getting no
pathspec or one path that is limited to the current directory
when there is no paths given on the command line, but there were
two callers that violated this rule, triggering a BUG().

* nd/magic-pathspec:
  Fix calling parse_pathspec with no paths nor PATHSPEC_PREFER_* flags
2013-10-30 12:10:33 -07:00
Junio C Hamano 414b7033b1 Merge branch 'nd/gc-lock-against-each-other'
* nd/gc-lock-against-each-other:
  gc: remove gc.pid file at end of execution
2013-10-30 12:10:27 -07:00
Junio C Hamano 779503c5eb Merge branch 'hn/log-graph-color-octopus'
* hn/log-graph-color-octopus:
  graph: fix coloring around octopus merges
2013-10-30 12:10:21 -07:00
Junio C Hamano f101b888f2 Merge branch 'mm/checkout-auto-track-fix'
"git checkout topic", when there is not yet a local "topic" branch
but there is a unique remote-tracking branch for a remote "topic"
branch, pretended as if "git checkout -t -b topic remote/$r/topic"
(for that unique remote $r) was run. This hack however was not
implemented for "git checkout topic --".

* mm/checkout-auto-track-fix:
  checkout: proper error message on 'git checkout foo bar --'
  checkout: allow dwim for branch creation for "git checkout $branch --"
2013-10-30 12:10:16 -07:00
Junio C Hamano 504c1942a9 Merge branch 'sg/t3600-nul-sha1-fix'
* sg/t3600-nul-sha1-fix:
  t3600: fix broken "choking git rm" test
2013-10-30 12:10:09 -07:00
Junio C Hamano 0bfc7c10d8 Merge branch 'fc/styles'
C coding style fixes.

* fc/styles:
  block-sha1/sha1.c: have SP around arithmetic operators
  base85.c: have SP around arithmetic operators
  archive.c: have SP around arithmetic operators
  alloc.c: have SP around arithmetic operators
  abspath.c: have SP around arithmetic operators
  alias: have SP around arithmetic operators
  C: have space around && and || operators
2013-10-30 12:10:06 -07:00
Junio C Hamano 9907d1359c Merge branch 'jc/upload-pack-send-symref'
One long-standing flaw in the pack transfer protocol used by "git
clone" was that there was no way to tell the other end which branch
"HEAD" points at, and the receiving end needed to guess.  A new
capability has been defined in the pack protocol to convey this
information so that cloning from a repository with more than one
branches pointing at the same commit where the HEAD is at now
reliably sets the initial branch in the resulting repository.

* jc/upload-pack-send-symref:
  t5570: Update for clone-progress-to-stderr branch
  t5570: Update for symref capability
  clone: test the new HEAD detection logic
  connect: annotate refs with their symref information in get_remote_head()
  connect.c: make parse_feature_value() static
  upload-pack: send non-HEAD symbolic refs
  upload-pack: send symbolic ref information as capability
  upload-pack.c: do not pass confusing cb_data to mark_our_ref()
  t5505: fix "set-head --auto with ambiguous HEAD" test
2013-10-30 12:10:06 -07:00
Junio C Hamano 177f0a4009 Merge branch 'jk/http-auth-redirects'
Handle the case where http transport gets redirected during the
authorization request better.

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes
2013-10-30 12:09:53 -07:00
Brian Gernhardt d619cfc749 t5570: Update for clone-progress-to-stderr branch
git clone now reports its progress to standard error, which throws off
t5570.  Using test_i18ngrep instead of test_cmp allows the test to be
more flexible by only looking for the expected error and ignoring any
other output from the program.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-30 10:39:42 -07:00
Junio C Hamano 0d6cf2471f Almost -rc0 for 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28 10:53:03 -07:00
Junio C Hamano cfd10568b0 Sync with v1.8.4.2 2013-10-28 10:51:53 -07:00
Junio C Hamano f43bc33e44 Merge branch 'sb/repack-in-c'
Finishing touches to update documentation.

* sb/repack-in-c:
  Reword repack documentation to no longer state it's a script
2013-10-28 10:43:41 -07:00
Junio C Hamano 9f279af862 Merge branch 'sg/prompt-svn-remote-fix'
Bash portability fix.

* sg/prompt-svn-remote-fix:
  bash prompt: don't use '+=' operator in show upstream code path
2013-10-28 10:43:38 -07:00
Junio C Hamano 2125261b63 Merge branch 'jk/split-broken-ident'
Make the fall-back parsing of commit objects with broken author or
committer lines more robust to pick up the timestamps.

* jk/split-broken-ident:
  split_ident: parse timestamp from end of line
2013-10-28 10:43:32 -07:00
Junio C Hamano 93542d90c0 Merge branch 'jk/remote-literal-string-leakfix'
* jk/remote-literal-string-leakfix:
  remote: do not copy "origin" string literal
2013-10-28 10:43:28 -07:00
Junio C Hamano bb2fd90c7b Merge branch 'ew/keepalive'
* ew/keepalive:
  http: use curl's tcp keepalive if available
  http: enable keepalive on TCP sockets
2013-10-28 10:43:24 -07:00
Junio C Hamano 2d99baab2f Merge branch 'jc/revision-range-unpeel'
"git rev-list --objects ^v1.0^ v1.0" gave v1.0 tag itself in the
output, but "git rev-list --objects v1.0^..v1.0" did not.

* jc/revision-range-unpeel:
  revision: do not peel tags used in range notation
2013-10-28 10:43:16 -07:00
Junio C Hamano e22c1c7f19 Merge branch 'jx/relative-path-regression-fix'
* jx/relative-path-regression-fix:
  Use simpler relative_path when set_git_dir
  relative_path should honor dos-drive-prefix
  test: use unambigous leading path (/foo) for MSYS
2013-10-28 10:42:30 -07:00
Junio C Hamano dcb11cca50 Git 1.8.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28 10:21:29 -07:00
Junio C Hamano df1ef917c6 Merge branch 'jk/clone-progress-to-stderr' into maint
"git clone" gave some progress messages to the standard output, not to
the standard error, and did not allow suppressing them with the
"--no-progress" option.

* jk/clone-progress-to-stderr:
  clone: always set transport options
  clone: treat "checking connectivity" like other progress
  clone: send diagnostic messages to stderr
2013-10-28 10:19:24 -07:00
Junio C Hamano da212eabec Merge branch 'jk/format-patch-from' into maint
"format-patch --from=<whom>" forgot to omit unnecessary in-body from
line, i.e. when <whom> is the same as the real author.

* jk/format-patch-from:
  format-patch: print in-body "From" only when needed
2013-10-28 10:18:43 -07:00
Junio C Hamano 77bc4302dc Merge branch 'jk/shortlog-tolerate-broken-commit' into maint
"git shortlog" used to choke and die when there is a malformed commit
(e.g. missing authors); it now simply ignore such a commit and keeps
going.

* jk/shortlog-tolerate-broken-commit:
  shortlog: ignore commits with missing authors
2013-10-28 10:17:31 -07:00
Junio C Hamano b28325d3ab Merge branch 'jk/diff-algo' into maint
"git merge-recursive" did not parse its "--diff-algorithm=" command
line option correctly.

* jk/diff-algo:
  merge-recursive: fix parsing of "diff-algorithm" option
2013-10-28 10:16:11 -07:00
Torstein Hegge 3fa366668a test-lib: fix typo in comment
Point test writers to the test_expect_* functions properly.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28 09:18:25 -07:00
Christian Couder 3fc0dca9ce sha1_file: move comment about return value where it belongs
Commit 5b0864070 (sha1_object_info_extended: make type calculation
optional, Jul 12 2013) changed the return value of the
sha1_object_info_extended function to 0/-1 for success/error.

Previously this function returned the object type for success or
-1 for error. But unfortunately the above commit forgot to change
or move the comment above this function that says "returns enum
object_type or negative".

To fix this inconsistency, let's move the comment above the
sha1_object_info function where it is still true.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28 09:07:01 -07:00
Jeff King a4165851e7 silence gcc array-bounds warning
In shorten_unambiguous_ref, we build and cache a reverse-map of the
rev-parse rules like this:

  static char **scanf_fmts;
  static int nr_rules;
  if (!nr_rules) {
	  for (; ref_rev_parse_rules[nr_rules]; nr_rules++)
		  ... generate scanf_fmts ...
  }

where ref_rev_parse_rules is terminated with a NULL pointer.
Compiling with "gcc -O2 -Wall" does not cause any problems, but
compiling with "-O3 -Wall" generates:

  $ make CFLAGS='-O3 -Wall' refs.o
  refs.c: In function ‘shorten_unambiguous_ref’:
  refs.c:3379:29: warning: array subscript is above array bounds [-Warray-bounds]
     for (; ref_rev_parse_rules[nr_rules]; nr_rules++)

Curiously, we can silence this by explicitly nr_rules to 0
in the beginning of the loop, even though the compiler
should be able to tell that we follow this code path only
when nr_rules is already 0.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-24 15:41:56 -07:00
Jeff King 38db01b7fb drop redundant semicolon in empty while
The extra semi-colon is harmless, since we really do want
the while loop to do nothing. But it does trigger a warning
from clang.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-24 15:41:01 -07:00
Junio C Hamano af2a651d2e checkout_entry(): clarify the use of topath[] parameter
The said function has this signature:

	extern int checkout_entry(struct cache_entry *ce,
				  const struct checkout *state,
				  char *topath);

At first glance, it might appear that the caller of checkout_entry()
can specify to which path the contents are written out by the last
parameter, and it is tempting to add "const" in front of its type.

In reality, however, topath[] is to point at a buffer to store the
temporary path generated by the callchain originating from this
function, and the temporary path is always short, much shorter than
the buffer prepared by its only caller in builtin/checkout-index.c.

Document the code a bit to clarify so that future callers know how
to use the function better.

Noticed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-24 14:59:39 -07:00
Nguyễn Thái Ngọc Duy fd356f6aa8 entry.c: convert checkout_entry to use strbuf
The old code does not do boundary check so any paths longer than
PATH_MAX can cause buffer overflow. Replace it with strbuf to handle
paths of arbitrary length.

The OS may reject if the path is too long though. But in that case we
report the cause (e.g. name too long) and usually move on to checking
out the next entry.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-24 14:58:37 -07:00
Ramsay Jones 70900eda4a http.c: Spell the null pointer as NULL
Commit 1bbcc224 ("http: refactor options to http_get_*", 28-09-2013)
changed the type of final 'options' argument of the http_get_file()
function from an int to an 'struct http_get_options' pointer.
However, it neglected to update the (single) call site. Since this
call was passing '0' to that argument, it was (correctly) being
interpreted as a null pointer. Change to argument to NULL.

Noticed by sparse. ("Using plain integer as NULL pointer")

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-24 14:42:26 -07:00
Junio C Hamano 3d092bfc6f Update draft release notes to 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-23 13:37:27 -07:00