summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-03write first for-merge ref to FETCH_HEAD firstLibravatar Joey Hess25-102/+114
The FETCH_HEAD refname is supposed to refer to the ref that was fetched and should be merged. However all fetched refs are written to .git/FETCH_HEAD in an arbitrary order, and resolve_ref_unsafe simply takes the first ref as the FETCH_HEAD, which is often the wrong one, when other branches were also fetched. The solution is to write the for-merge ref(s) to FETCH_HEAD first. Then, unless --append is used, the FETCH_HEAD refname behaves as intended. If the user uses --append, they presumably are doing so in order to preserve the old FETCH_HEAD. While we are at it, update an old example in the read-tree documentation that implied that each entry in FETCH_HEAD only has the object name, which is not true for quite a while. [jc: adjusted tests] Signed-off-by: Joey Hess <joey@kitenet.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-22Update draft release notes in preparation for 1.7.9-rc0Libravatar Junio C Hamano1-1/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-22Merge branch 'tr/bash-read-unescaped'Libravatar Junio C Hamano1-6/+6
* tr/bash-read-unescaped: bash completion: use read -r everywhere
2011-12-22Merge branch 'ab/sun-studio-portability'Libravatar Junio C Hamano8-22/+22
* ab/sun-studio-portability: Appease Sun Studio by renaming "tmpfile" Fix a bitwise negation assignment issue spotted by Sun Studio Fix an enum assignment issue spotted by Sun Studio
2011-12-22Merge branch 'tr/doc-sh-setup'Libravatar Junio C Hamano1-0/+10
* tr/doc-sh-setup: git-sh-setup: make require_clean_work_tree part of the interface
2011-12-22Merge branch 'rr/revert-cherry-pick'Libravatar Junio C Hamano3-49/+90
* rr/revert-cherry-pick: t3502, t3510: clarify cherry-pick -m failure t3510 (cherry-pick-sequencer): use exit status revert: simplify getting commit subject in format_todo() revert: tolerate extra spaces, tabs in insn sheet revert: make commit subjects in insn sheet optional revert: free msg in format_todo()
2011-12-22Merge branch 'tr/pty-all'Libravatar Junio C Hamano1-0/+4
* tr/pty-all: test-terminal: set output terminals to raw mode
2011-12-22Merge branch 'jn/maint-gitweb-utf8-fix'Libravatar Junio C Hamano1-4/+8
* jn/maint-gitweb-utf8-fix: gitweb: Fix fallback mode of to_utf8 subroutine gitweb: Output valid utf8 in git_blame_common('data') gitweb: esc_html() site name for title in OPML gitweb: Call to_utf8() on input string in chop_and_escape_str()
2011-12-22Update draft release notes to 1.7.9Libravatar Junio C Hamano1-27/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-22Merge branch 'jk/maint-strbuf-missing-init'Libravatar Junio C Hamano2-2/+2
* jk/maint-strbuf-missing-init: commit, merge: initialize static strbuf Conflicts: builtin/merge.c
2011-12-22Merge branch 'jc/maint-lf-to-crlf-keep-crlf'Libravatar Junio C Hamano1-10/+50
* jc/maint-lf-to-crlf-keep-crlf: lf_to_crlf_filter(): resurrect CRLF->CRLF hack
2011-12-22Merge branch 'rs/diff-tree-combined-clean-up'Libravatar Junio C Hamano5-50/+29
* rs/diff-tree-combined-clean-up: submodule: use diff_tree_combined_merge() instead of diff_tree_combined() pass struct commit to diff_tree_combined_merge() use struct sha1_array in diff_tree_combined()
2011-12-22Merge branch 'jk/maint-push-v-is-verbose'Libravatar Junio C Hamano1-5/+5
* jk/maint-push-v-is-verbose: make "git push -v" actually verbose
2011-12-22Merge branch 'tr/grep-threading'Libravatar Junio C Hamano4-43/+88
* tr/grep-threading: grep: disable threading in non-worktree case grep: enable threading with -p and -W using lazy attribute lookup grep: load funcname patterns for -W
2011-12-22Merge branch 'jk/pretty-reglog-ent'Libravatar Junio C Hamano5-0/+48
* jk/pretty-reglog-ent: pretty: give placeholders to reflog identity
2011-12-22Merge branch 'jk/follow-rename-score'Libravatar Junio C Hamano1-0/+1
* jk/follow-rename-score: use custom rename score during --follow
2011-12-22Merge branch 'jk/doc-fsck'Libravatar Junio C Hamano1-18/+8
* jk/doc-fsck: docs: brush up obsolete bits of git-fsck manpage Conflicts: Documentation/git-fsck.txt
2011-12-22Merge branch 'nd/war-on-nul-in-commit'Libravatar Junio C Hamano10-17/+33
* nd/war-on-nul-in-commit: commit_tree(): refuse commit messages that contain NULs Convert commit_tree() to take strbuf as message merge: abort if fails to commit Conflicts: builtin/commit.c commit.c commit.h
2011-12-22Merge branch 'jk/maint-do-not-feed-stdin-to-tests'Libravatar Junio C Hamano1-1/+2
* jk/maint-do-not-feed-stdin-to-tests: test-lib: redirect stdin of tests
2011-12-22Merge branch 'jn/test-cleanup-7006'Libravatar Junio C Hamano1-56/+17
* jn/test-cleanup-7006: test: errors preparing for a test are not special
2011-12-22Merge branch 'ef/setenv-putenv'Libravatar Junio C Hamano1-2/+8
* ef/setenv-putenv: compat/setenv.c: error if name contains '=' compat/setenv.c: update errno when erroring out
2011-12-22Merge branch 'jk/git-prompt'Libravatar Junio C Hamano12-60/+374
* jk/git-prompt: contrib: add credential helper for OS X Keychain Makefile: OS X has /dev/tty Makefile: linux has /dev/tty credential: use git_prompt instead of git_getpass prompt: use git_terminal_prompt add generic terminal prompt function refactor git_getpass into generic prompt function move git_getpass to its own source file imap-send: don't check return value of git_getpass imap-send: avoid buffer overflow Conflicts: Makefile
2011-12-22Merge branch 'jk/http-push-to-empty'Libravatar Junio C Hamano2-3/+36
* jk/http-push-to-empty: remote-curl: don't pass back fake refs Conflicts: remote-curl.c
2011-12-21Sync with v1.7.8.1Libravatar Junio C Hamano5-14/+35
2011-12-21Git 1.7.8.1Libravatar Junio C Hamano1-4/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21Merge branch 'jl/submodule-status-failure-report' into maintLibravatar Junio C Hamano1-2/+2
* jl/submodule-status-failure-report: diff/status: print submodule path when looking for changes fails
2011-12-21Merge branch 'tr/userdiff-c-returns-pointer' into maintLibravatar Junio C Hamano1-1/+1
* tr/userdiff-c-returns-pointer: userdiff: allow * between cpp funcname words
2011-12-21Merge branch 'bc/maint-apply-check-no-patch' into maintLibravatar Junio C Hamano3-6/+25
* 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-21Merge branch 'cn/maint-lf-to-crlf-filter' into maintLibravatar Junio C Hamano1-14/+40
* cn/maint-lf-to-crlf-filter: lf_to_crlf_filter(): tell the caller we added "\n" when draining convert: track state in LF-to-CRLF filter
2011-12-21Merge branch 'jk/maint-upload-archive' into maintLibravatar Junio C Hamano2-4/+22
* jk/maint-upload-archive: archive: don't let remote clients get unreachable commits
2011-12-21bash completion: use read -r everywhereLibravatar Thomas Rast1-6/+6
We use the 'read' command without -r, so that it treats '\' as an escape character, in several places. This breaks the loop reading refnames from git-for-each-ref in __git_refs() if there are refnames such as "foo'bar", in which case for-each-ref helpfully quotes them as $ git update-ref "refs/remotes/test/foo'bar" HEAD $ git for-each-ref --shell --format="ref=%(refname:short)" "refs/remotes" ref='test/foo'\''bar' Interpolating the \' here will read "ref='test/foo'''bar'" instead, and eval then chokes on the unbalanced quotes. However, since none of the read loops _want_ to have backslashes interpolated, it's much safer to use read -r everywhere. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21clone: the -o option has nothing to do with <branch>Libravatar Carlos Martín Nieto1-2/+2
It is to give an alternate <name> instead of "origin" to the remote we are cloning from. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21builtin/log: remove redundant initializationLibravatar Michael Schubert1-2/+0
"abbrev" and "commit_format" in struct rev_info get initialized in init_revisions - no need to reinit in cmd_log_init_defaults. Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21Merge branch 'ms/commit-cc-option-helpstring' into maintLibravatar Junio C Hamano1-1/+1
* ms/commit-cc-option-helpstring: builtin/commit: add missing '/' in help message
2011-12-21builtin/commit: add missing '/' in help messageLibravatar Michael Schubert1-1/+1
Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21Appease Sun Studio by renaming "tmpfile"Libravatar Ævar Arnfjörð Bjarmason4-16/+16
On Solaris the system headers define the "tmpfile" name, which'll cause Git compiled with Sun Studio 12 Update 1 to whine about us redefining the name: "pack-write.c", line 76: warning: name redefined by pragma redefine_extname declared static: tmpfile (E_PRAGMA_REDEFINE_STATIC) "sha1_file.c", line 2455: warning: name redefined by pragma redefine_extname declared static: tmpfile (E_PRAGMA_REDEFINE_STATIC) "fast-import.c", line 858: warning: name redefined by pragma redefine_extname declared static: tmpfile (E_PRAGMA_REDEFINE_STATIC) "builtin/index-pack.c", line 175: warning: name redefined by pragma redefine_extname declared static: tmpfile (E_PRAGMA_REDEFINE_STATIC) Just renaming the "tmpfile" variable to "tmp_file" in the relevant places is the easiest way to fix this. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-21Fix a bitwise negation assignment issue spotted by Sun StudioLibravatar Ævar Arnfjörð Bjarmason3-4/+4
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-21Fix an enum assignment issue spotted by Sun StudioLibravatar Ævar Arnfjörð Bjarmason1-2/+2
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-20Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: builtin/init-db.c: eliminate -Wformat warning on Solaris
2011-12-20builtin/init-db.c: eliminate -Wformat warning on SolarisLibravatar Ævar Arnfjörð Bjarmason1-1/+1
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-20git-sh-setup: make require_clean_work_tree part of the interfaceLibravatar Thomas Rast1-0/+10
92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error message, 2010-10-19) refactored git's own checking to a function in git-sh-setup. This is a very useful thing for script writers, so document it. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-12-20Merge branch 'mh/ref-api'Libravatar Junio C Hamano3-258/+284
* 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-20Merge branch 'jc/advice-doc'Libravatar Junio C Hamano1-11/+8
* jc/advice-doc: advice: Document that they all default to true
2011-12-20Merge branch 'jc/request-pull-show-head-4'Libravatar Junio C Hamano2-9/+38
* 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-20Merge branch 'jc/pull-signed-tag'Libravatar Junio C Hamano1-1/+5
* jc/pull-signed-tag: commit: do not lose mergetag header when not amending
2011-12-20Merge branch 'jc/checkout-m-twoway'Libravatar Junio C Hamano1-1/+3
* jc/checkout-m-twoway: t/t2023-checkout-m.sh: fix use of test_must_fail
2011-12-20t/t2023-checkout-m.sh: fix use of test_must_failLibravatar Ævar Arnfjörð Bjarmason1-1/+3
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-20commit: do not lose mergetag header when not amendingLibravatar Junio C Hamano1-1/+5
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-20Merge branch 'tr/cache-tree'Libravatar Junio C Hamano1-4/+2
* tr/cache-tree: t0090: be prepared that 'wc -l' writes leading blanks
2011-12-20t0090: be prepared that 'wc -l' writes leading blanksLibravatar Johannes Sixt1-4/+2
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>