Commit graph

27466 commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason 952fba9c63 Fix a bitwise negation assignment issue spotted by Sun Studio
Change direct and indirect assignments of the bitwise negation of 0 to
uint32_t variables to have a "U" suffix. I.e. ~0U instead of ~0. This
eliminates warnings under Sun Studio 12 Update 1:

    "vcs-svn/string_pool.c", line 11: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "vcs-svn/string_pool.c", line 81: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "vcs-svn/repo_tree.c", line 112: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "vcs-svn/repo_tree.c", line 112: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)
    "test-treap.c", line 34: warning: initializer will be sign-extended: -1 (E_INIT_SIGN_EXTEND)

The semantics are still the same as demonstrated by this program:

    $ cat test.c && make test && ./test
    #include <stdio.h>
    #include <stdint.h>

    int main(void)
    {
        uint32_t foo = ~0;
        uint32_t bar = ~0U;

        printf("foo = <%u> bar = <%u>\n", foo, bar);

        return 0;
    }
    cc     test.c   -o test
    "test.c", line 5: warning: initializer will be sign-extended: -1
    foo = <4294967295> bar = <4294967295>

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 10:19:40 -08:00
Ævar Arnfjörð Bjarmason d7a10c3140 Fix an enum assignment issue spotted by Sun Studio
In builtin/fast-export.c we'd assign to variables of the
tag_of_filtered_mode enum type with constants defined for the
signed_tag_mode enum.

We'd get the intended value since both the value we were assigning
with and the one we actually wanted had the same positional within
their respective enums, but doing it this way makes no sense.

This issue was spotted by Sun Studio 12 Update 1:

    "builtin/fast-export.c", line 54: warning: enum type mismatch: op "=" (E_ENUM_TYPE_MISMATCH_OP)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21 10:19:04 -08:00
Junio C Hamano 3daff7c319 Merge branch 'maint'
* maint:
  builtin/init-db.c: eliminate -Wformat warning on Solaris
2011-12-20 16:34:20 -08:00
Ævar Arnfjörð Bjarmason 97f261b1e7 builtin/init-db.c: eliminate -Wformat warning on Solaris
On Solaris systems we'd warn about an implicit cast of mode_t when we
printed things out with the %d format. We'd get this warning under GCC
4.6.0 with Solaris headers:

    builtin/init-db.c: In function ‘separate_git_dir’:
    builtin/init-db.c:354:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘mode_t’ [-Wformat]

We've been doing this ever since v1.7.4.1-296-gb57fb80. Just work
around this by adding an explicit cast.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 16:02:08 -08:00
Junio C Hamano 8d68493f20 Merge branch 'mh/ref-api'
* mh/ref-api:
  add_ref(): take a (struct ref_entry *) parameter
  create_ref_entry(): extract function from add_ref()
  repack_without_ref(): remove temporary
  resolve_gitlink_ref_recursive(): change to work with struct ref_cache
  Pass a (ref_cache *) to the resolve_gitlink_*() helper functions
  resolve_gitlink_ref(): improve docstring
  get_ref_dir(): change signature
  refs: change signatures of get_packed_refs() and get_loose_refs()
  is_dup_ref(): extract function from sort_ref_array()
  add_ref(): add docstring
  parse_ref_line(): add docstring
  is_refname_available(): remove the "quiet" argument
  clear_ref_array(): rename from free_ref_array()
  refs: rename parameters result -> sha1
  refs: rename "refname" variables
  struct ref_entry: document name member

Conflicts:
	cache.h
	refs.c
2011-12-20 13:25:53 -08:00
Junio C Hamano 184a541fb5 Merge branch 'jc/advice-doc'
* jc/advice-doc:
  advice: Document that they all default to true
2011-12-20 13:25:29 -08:00
Junio C Hamano 835fbdb67a Merge branch 'jc/request-pull-show-head-4'
* jc/request-pull-show-head-4:
  request-pull: do not emit "tag" before the tagname
  request-pull: update the "pull" command generation logic
2011-12-20 13:25:27 -08:00
Junio C Hamano 4d466b69fe Merge branch 'jc/pull-signed-tag'
* jc/pull-signed-tag:
  commit: do not lose mergetag header when not amending
2011-12-20 13:24:12 -08:00
Junio C Hamano 1b048b197d Merge branch 'jc/checkout-m-twoway'
* jc/checkout-m-twoway:
  t/t2023-checkout-m.sh: fix use of test_must_fail
2011-12-20 13:24:08 -08:00
Ævar Arnfjörð Bjarmason 5cd7fadc07 t/t2023-checkout-m.sh: fix use of test_must_fail
Change an invocation of test_must_fail() to be inside a
test_expect_success() as is our usual pattern. Having it outside
caused our tests to fail under prove(1) since we wouldn't print a
newline before TAP output:

    CONFLICT (content): Merge conflict in both.txt
    # GETTEXT POISON #ok 2 - -m restores 2-way conflicted+resolved file

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 13:24:02 -08:00
Junio C Hamano 0074d18dc0 commit: do not lose mergetag header when not amending
The earlier ed7a42a (commit: teach --amend to carry forward extra headers,
2011-11-08) broke "git merge/pull; edit to fix conflict; git commit"
workflow by forgetting that commit_tree_extended() takes the whole extra
header list.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 13:22:41 -08:00
Junio C Hamano 3fabe9966b Merge branch 'tr/cache-tree'
* tr/cache-tree:
  t0090: be prepared that 'wc -l' writes leading blanks
2011-12-20 12:16:04 -08:00
Johannes Sixt 4cd6755656 t0090: be prepared that 'wc -l' writes leading blanks
Use 'printf %d $(whatever|wc -l)' so that the shell removes the blanks
for us.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20 11:15:16 -08:00
Junio C Hamano 876a6f4991 Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-19 16:39:54 -08:00
Junio C Hamano 2dccad3c6f Merge branch 'ab/enable-i18n'
* ab/enable-i18n:
  i18n: add infrastructure for translating Git with gettext

Conflicts:
	Makefile
2011-12-19 16:06:41 -08:00
Junio C Hamano 85878dd0c9 Merge branch 'ew/keepalive'
* ew/keepalive:
  enable SO_KEEPALIVE for connected TCP sockets
2011-12-19 16:06:32 -08:00
Junio C Hamano 7f1068e21e Merge branch 'jc/checkout-m-twoway'
* jc/checkout-m-twoway:
  checkout_merged(): squelch false warning from some gcc
  Test 'checkout -m -- path'
  checkout -m: no need to insist on having all 3 stages
2011-12-19 16:06:22 -08:00
Junio C Hamano 1d3a035d6d Merge branch 'jk/maint-push-over-dav'
* jk/maint-push-over-dav:
  http-push: enable "proactive auth"
  t5540: test DAV push with authentication

Conflicts:
	http.c
2011-12-19 16:05:59 -08:00
Junio C Hamano b3ae9d8e57 Merge branch 'jk/fetch-no-tail-match-refs'
* jk/fetch-no-tail-match-refs:
  connect.c: drop path_match function
  fetch-pack: match refs exactly
  t5500: give fully-qualified refs to fetch-pack
  drop "match" parameter from get_remote_heads
2011-12-19 16:05:55 -08:00
Junio C Hamano 2e05710a16 Merge branch 'nd/resolve-ref'
* nd/resolve-ref:
  Rename resolve_ref() to resolve_ref_unsafe()
  Convert resolve_ref+xstrdup to new resolve_refdup function
  revert: convert resolve_ref() to read_ref_full()
2011-12-19 16:05:50 -08:00
Junio C Hamano b8fc5abd73 Merge branch 'jn/maint-sequencer-fixes'
* jn/maint-sequencer-fixes:
  revert: stop creating and removing sequencer-old directory
  Revert "reset: Make reset remove the sequencer state"
  revert: do not remove state until sequence is finished
  revert: allow single-pick in the middle of cherry-pick sequence
  revert: pass around rev-list args in already-parsed form
  revert: allow cherry-pick --continue to commit before resuming
  revert: give --continue handling its own function
2011-12-19 16:05:45 -08:00
Junio C Hamano ea4ef30487 Merge branch 'jk/maint-snprintf-va-copy'
* jk/maint-snprintf-va-copy:
  compat/snprintf: don't look at va_list twice
2011-12-19 16:05:38 -08:00
Junio C Hamano b052781fef Merge branch 'jk/maint-mv'
* jk/maint-mv:
  mv: be quiet about overwriting
  mv: improve overwrite warning
  mv: make non-directory destination error more clear
  mv: honor --verbose flag
  docs: mention "-k" for both forms of "git mv"
2011-12-19 16:05:34 -08:00
Junio C Hamano ab2fadefab Merge branch 'ci/stripspace-docs'
* ci/stripspace-docs:
  Update documentation for stripspace
2011-12-19 16:05:31 -08:00
Junio C Hamano 9293aac2b1 Merge branch 'rr/test-chaining'
* rr/test-chaining:
  t3401: use test_commit in setup
  t3401: modernize style
  t3040 (subprojects-basic): fix '&&' chaining, modernize style
  t1510 (worktree): fix '&&' chaining
  t3030 (merge-recursive): use test_expect_code
  test: fix '&&' chaining
  t3200 (branch): fix '&&' chaining
2011-12-19 16:05:25 -08:00
Junio C Hamano 33e7fefef6 Merge branch 'tr/cache-tree'
* tr/cache-tree:
  reset: update cache-tree data when appropriate
  commit: write cache-tree data when writing index anyway
  Refactor cache_tree_update idiom from commit
  Test the current state of the cache-tree optimization
  Add test-scrap-cache-tree
2011-12-19 16:05:20 -08:00
Junio C Hamano 367d20ec6b Merge branch 'jk/credentials'
* jk/credentials:
  t: add test harness for external credential helpers
  credentials: add "store" helper
  strbuf: add strbuf_add*_urlencode
  Makefile: unix sockets may not available on some platforms
  credentials: add "cache" helper
  docs: end-user documentation for the credential subsystem
  credential: make relevance of http path configurable
  credential: add credential.*.username
  credential: apply helper config
  http: use credential API to get passwords
  credential: add function for parsing url components
  introduce credentials API
  t5550: fix typo
  test-lib: add test_config_global variant

Conflicts:
	strbuf.c
2011-12-19 16:05:16 -08:00
Junio C Hamano f032d66ddb request-pull: do not emit "tag" before the tagname
The whole point of the recent update to allow "git pull $url $tagname" is
so that the integrator does not have to store the (signed) tag that is
used to convey authenticity to be recorded in the resulting merge in the
local repository's tag namespace.  Asking for a merge be made with "git
pull $url tag $tagname" defeats it.

Note that the request can become ambiguous if the requestor has a branch
with the same name as the tag, but that is not a new problem limited to
pulling. I wouldn't mind if somebody wants to add disambiguation to the
find_matching_ref logic in the script as a separate patch, though.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-19 11:59:57 -08:00
Junio C Hamano 26e94af0ba advice: Document that they all default to true
By definition, the default value of "advice.*" variables must be true and
they all control various additional help messages that are designed to aid
new users. Setting one to false is to tell Git that the user understands
the nature of the error and does not need the additional verbose help
message.

Also fix the asciidoc markup for linkgit:git-checkout[1] in the
description of the detachedHead advice by removing an excess colon.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-18 21:38:55 -08:00
Pete Wyckoff d16520499d git-p4: fix skipSubmitEdit regression
Commit 7c766e5 (git-p4: introduce skipSubmitEdit, 2011-12-04)
made it easier to automate submission to p4, but broke the most
common case.

Add a test for when the user really does edit and save the change
template, and fix the bug that causes the test to fail.

Also add a confirmation message when submission is cancelled.

Reported-by: Michael Horowitz <michael.horowitz@ieee.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-17 18:20:27 -08:00
Junio C Hamano ee22802493 Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-16 22:45:03 -08:00
Junio C Hamano a2add8570c Merge branch 'jc/commit-amend-no-edit'
* jc/commit-amend-no-edit:
  test: commit --amend should honor --no-edit
  commit: honour --no-edit
  t7501 (commit): modernize style
  test: remove a porcelain test that hard-codes commit names
  test: add missing "&&" after echo command
2011-12-16 22:33:56 -08:00
Junio C Hamano 48b303675a Merge branch 'jc/stream-to-pack'
* jc/stream-to-pack:
  bulk-checkin: replace fast-import based implementation
  csum-file: introduce sha1file_checkpoint
  finish_tmp_packfile(): a helper function
  create_tmp_packfile(): a helper function
  write_pack_header(): a helper function

Conflicts:
	pack.h
2011-12-16 22:33:40 -08:00
Junio C Hamano e45c9b03c3 Merge branch 'aw/rebase-i-stop-on-failure-to-amend'
* aw/rebase-i-stop-on-failure-to-amend:
  rebase -i: interrupt rebase when "commit --amend" failed during "reword"
2011-12-16 22:33:37 -08:00
Junio C Hamano e9bba5340e Merge branch 'jh/fast-import-notes'
* jh/fast-import-notes:
  fast-import: Fix incorrect fanout level when modifying existing notes refs
  t9301: Add 2nd testcase exposing bugs in fast-import's notes fanout handling
  t9301: Fix testcase covering up a bug in fast-import's notes fanout handling
2011-12-16 22:33:34 -08:00
Junio C Hamano 0bbaa5c076 Merge branch 'jk/upload-archive-use-start-command'
* jk/upload-archive-use-start-command:
  upload-archive: use start_command instead of fork
2011-12-16 22:33:30 -08:00
Junio C Hamano 09bb4eb4f1 Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
  gitk: Make vi-style keybindings more vi-like
  gitk: Make "touching paths" search support backslashes
  gitk: Show modified files with separate work tree
  gitk: Simplify calculation of gitdir
  gitk: Run 'git rev-parse --git-dir' only once
  gitk: Put temporary directory inside .git
  gitk: Fix "External diff" with separate work tree
  gitk: Fix "blame parent commit" with separate work tree
  gitk: Fix "show origin of this line" with separate work tree
  gitk: Fix file highlight when run in subdirectory
  gitk: Update copyright
  gitk: When a commit contains a note, mark it with a yellow box
  gitk: Remember time zones from author and commit timestamps
  gitk: Remove unused $cdate array
2011-12-16 22:18:42 -08:00
Junio C Hamano fe46fa9d26 request-pull: update the "pull" command generation logic
The old code that insisted on asking for the tip of a branch to be pulled
were not updated when we started allowing for a tag to be pulled. When a
tag points at an older part of the history and there is no branch that
points at the tagged commit, the script failed to say which ref is to be
pulled.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-16 09:25:20 -08:00
Junio C Hamano 335c6e403d checkout_merged(): squelch false warning from some gcc
gcc 4.6.2 (there may be others) does not realize that the variable "mode"
can never be used uninitialized in this function and issues a false warning
under -Wuninitialized option.

Squelch it with an unnecessary initialization; it is not like a single
assignment matters to the performance in this codepath that writes out
to the filesystem with checkout_entry() anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-15 10:10:11 -08:00
Junio C Hamano 10f4eb652e Update draft release notes to 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-13 23:09:27 -08:00
Junio C Hamano b3f17ac3d6 Merge branch 'ks/tag-cleanup'
* ks/tag-cleanup:
  git-tag: introduce --cleanup option

Conflicts:
	builtin/tag.c
2011-12-13 23:07:47 -08:00
Junio C Hamano 91c23f76ce Merge branch 'jl/submodule-status-failure-report'
* jl/submodule-status-failure-report:
  diff/status: print submodule path when looking for changes fails
2011-12-13 23:00:52 -08:00
Junio C Hamano 357ba5cf0d Merge branch 'tr/userdiff-c-returns-pointer'
* tr/userdiff-c-returns-pointer:
  userdiff: allow * between cpp funcname words
2011-12-13 22:57:19 -08:00
Junio C Hamano b661a4bc1e Merge branch 'bc/maint-apply-check-no-patch'
* bc/maint-apply-check-no-patch:
  builtin/apply.c: report error on failure to recognize input
  t/t4131-apply-fake-ancestor.sh: fix broken test
2011-12-13 22:56:22 -08:00
Junio C Hamano 424f30a5ae Merge branch 'nd/ignore-might-be-precious'
* nd/ignore-might-be-precious:
  checkout,merge: disallow overwriting ignored files with --no-overwrite-ignore
2011-12-13 22:55:07 -08:00
Junio C Hamano b2dd021120 Merge branch 'jn/branch-move-to-self'
* jn/branch-move-to-self:
  Allow checkout -B <current-branch> to update the current branch
  branch: allow a no-op "branch -M <current-branch> HEAD"
2011-12-13 22:53:08 -08:00
Junio C Hamano a96a89f715 Merge branch 'cn/maint-lf-to-crlf-filter'
* cn/maint-lf-to-crlf-filter:
  convert: track state in LF-to-CRLF filter
2011-12-13 22:49:45 -08:00
Junio C Hamano 5c3659432d Merge branch 'tj/maint-imap-send-remove-unused'
* tj/maint-imap-send-remove-unused:
  imap-send: Remove unused 'use_namespace' variable
2011-12-13 22:49:19 -08:00
Junio C Hamano 3c4b5ad5a5 Merge branch 'jk/maint-upload-archive'
* jk/maint-upload-archive:
  archive: don't let remote clients get unreachable commits
2011-12-13 22:47:38 -08:00
Junio C Hamano 6fa625a6b7 Merge branch 'jn/gitweb-side-by-side-diff'
* jn/gitweb-side-by-side-diff:
  gitweb: Add navigation to select side-by-side diff
  gitweb: Use href(-replay=>1,...) for formats links in "commitdiff"
  t9500: Add basic sanity tests for side-by-side diff in gitweb
  t9500: Add test for handling incomplete lines in diff by gitweb
  gitweb: Give side-by-side diff extra CSS styling
  gitweb: Add a feature to show side-by-side diff
  gitweb: Extract formatting of diff chunk header
  gitweb: Refactor diff body line classification
2011-12-13 22:46:57 -08:00