Git development
 help / color / mirror / Atom feed
* Re: problem cloning via http since v1.6.6-rc0
From: Tay Ray Chuan @ 2010-01-21  1:34 UTC (permalink / raw)
  To: Yaroslav Halchenko; +Cc: git
In-Reply-To: <20100121004756.GA18213@onerussian.com>

Hi,

On Thu, Jan 21, 2010 at 8:47 AM, Yaroslav Halchenko
<debian@onerussian.com> wrote:
> Cloning of the repository works fine with v1.6.5.7 but fails with v1.6.6-rc0.

this sounds like around the time the smart http protocol was introduced.

> fatal: http://git.debian.org/git/pkg-exppsy/pymvpa.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?
>
> on the server, 1.6.3.3 version of git was used to run git
> update-server-info.

hmm, are you using the WebDAV-flavour or the smart http protocol to
host the repository?

-- 
Cheers,
Ray Chuan

^ permalink raw reply

* Re: [ANNOUNCE] Git 1.6.6.1
From: tytso @ 2010-01-21  1:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vpr54xote.fsf@alter.siamese.dyndns.org>

On Wed, Jan 20, 2010 at 04:51:41PM -0800, Junio C Hamano wrote:
> The latest maintenance release Git 1.6.6.1 is available at the
> usual places:

Did you perhaps forget to push out the tags corresponding to 1.6.6.1
and 1.6.5.8?

Thanks,

						- Ted

^ permalink raw reply

* problem cloning via http since v1.6.6-rc0
From: Yaroslav Halchenko @ 2010-01-21  0:47 UTC (permalink / raw)
  To: git

Dear Git Developers,

Some users of our project started recently to complain that they could not
clone the repository via http (git:// wasn't a choice due to heavy firewalling)
and because http:// was used as a protocol to get sources in some distributions
(e.g. macports).

Cloning of the repository works fine with v1.6.5.7 but fails with v1.6.6-rc0.
I haven't done full bisection since that repository is relatively bulky and
poor server is quite loaded anyways, so I thought you just would get a clue
without going brute-force.  But here are the details:  in case of failing
operation, I immediately get failure:

$> GIT_TRACE=2 ./git clone http://git.debian.org/git/pkg-exppsy/pymvpa.git
trace: built-in: git 'clone' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git'
warning: templates not found /home/yoh/share/git-core/templates
Initialized empty Git repository in /home/yoh/proj/misc/git/pymvpa/.git/
trace: run_command: 'remote-curl' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git'
trace: exec: 'git' 'remote-curl' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git'
trace: exec: 'git-remote-curl' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git'
trace: run_command: 'git-remote-curl' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git' 'http://git.debian.org/git/pkg-exppsy/pymvpa.git'
fatal: http://git.debian.org/git/pkg-exppsy/pymvpa.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

on the server, 1.6.3.3 version of git was used to run git
update-server-info.

Thanks in advance
-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

^ permalink raw reply

* Re: What's cooking in git.git (Jan 2010, #06; Wed, 20)
From: Sverre Rabbelier @ 2010-01-21  1:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vljfsxos5.fsf@alter.siamese.dyndns.org>

Heya,

On Thu, Jan 21, 2010 at 01:52, Junio C Hamano <gitster@pobox.com> wrote:
> * jh/notes (2010-01-17) 23 commits
>  - builtin-gc: Teach the new --notes option to garbage-collect notes
>  - Notes API: gc_notes(): Prune notes that belong to non-existing objects
>  - t3305: Verify that removing notes triggers automatic fanout consolidation
>  - builtin-notes: Teach -d option for deleting existing notes
>  - Teach builtin-notes to remove empty notes
>  - Teach notes code to properly preserve non-notes in the notes tree
>  - t3305: Verify that adding many notes with git-notes triggers increased fanout
>  - t3301: Verify successful annotation of non-commits
>  - Builtin-ify git-notes
>  - Refactor notes concatenation into a flexible interface for combining notes
>  - Notes API: Allow multiple concurrent notes trees with new struct notes_tree
>  - Notes API: write_notes_tree(): Store the notes tree in the database
>  - Notes API: for_each_note(): Traverse the entire notes tree with a callback
>  - Notes API: get_note(): Return the note annotating the given object
>  - Notes API: remove_note(): Remove note objects from the notes tree structure
>  - Notes API: add_note(): Add note objects to the internal notes tree structure
>  - Notes API: init_notes(): Initialize the notes tree from the given notes ref
>  - Add tests for checking correct handling of $GIT_NOTES_REF and core.notesRef
>  - Notes API: get_commit_notes() -> format_note() + remove the commit restriction
>  - Minor non-functional fixes to notes.c
>  (merged to 'next' on 2010-01-02 at ae42130)
>  + Add more testcases to test fast-import of notes
>  + Rename t9301 to t9350, to make room for more fast-import tests
>  + fast-import: Proper notes tree manipulation
>
> Updated with a re-roll.

Just checking, you reverted all from next (with exception of the first
three), and now re-queued it to pu, with the first three still in
next? Or did I mis-remember and did only the first three make it to
next in the first place?

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply

* Re: how to clone from github behindd a proxy?
From: Tay Ray Chuan @ 2010-01-21  0:54 UTC (permalink / raw)
  To: Tim Michelsen; +Cc: git
In-Reply-To: <loom.20100120T102323-689@post.gmane.org>

Hi,

On Wed, Jan 20, 2010 at 5:29 PM, Tim Michelsen
<timmichelsen@gmx-topmail.de> wrote:
> git clone http://github.com/rwl/traitsbackendpyjamas
> Initialized empty Git repository in D:\sourcecode/traitsbackendpyjamas/.git/
> * Couldn't find host github.com in the _netrc file; using defaults
> * About to connect() to proxy proxy.example.com on port 8000 (#0)
> *   Trying 149.233.100.7... * Connected to proxy.example.com (149.233.100.7)
> port 8000 (#0)
>  GET http://github.com/rwl/traitsbackendpyjamas/info/refs HTTP/1.1
> User-Agent: git/1.6.5.1.1366.g8ed9
> Host: github.com
> Accept: */*
> Proxy-Connection: Keep-Alive
> Pragma: no-cache
>
> * The requested URL returned error: 404
> * Closing connection #0
> fatal: http://github.com/rwl/traitsbackendpyjamas/info/refs not found: did you
> run git update-server-info on the server?

this isn't a problem with your proxy - git connects to your proxy fine.

The problem is that the info/refs file isn't found at the repo URL you
specified.

I think for github repos, you need to put a ".git" behind the url, so
you should try cloning from

  http://github.com/rwl/traitsbackendpyjamas.git

instead.

-- 
Cheers,
Ray Chuan

^ permalink raw reply

* What's cooking in git.git (Jan 2010, #06; Wed, 20)
From: Junio C Hamano @ 2010-01-21  0:52 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'.  The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.

--------------------------------------------------
[Graduated to "master"]

* sr/gfi-options (2009-12-04) 7 commits
  (merged to 'next' on 2010-01-10 at 8b305fb)
 + fast-import: add (non-)relative-marks feature
 + fast-import: allow for multiple --import-marks= arguments
 + fast-import: test the new option command
 + fast-import: add option command
 + fast-import: add feature command
 + fast-import: put marks reading in its own function
 + fast-import: put option parsing code in separate functions

* tc/smart-http-restrict (2010-01-14) 5 commits
  (merged to 'next' on 2010-01-16 at 71fc84c)
 + Test t5560: Fix test when run with dash
  (merged to 'next' on 2010-01-06 at 82736cb)
 + Smart-http tests: Test http-backend without curl or a webserver
 + Smart-http tests: Break test t5560-http-backend into pieces
 + Smart-http tests: Improve coverage in test t5560
 + Smart-http: check if repository is OK to export before serving it

* tc/clone-v-progress (2009-12-26) 4 commits
  (merged to 'next' on 2010-01-10 at ec2bfd7)
 + clone: use --progress to force progress reporting
 + clone: set transport->verbose when -v/--verbose is used
 + git-clone.txt: reword description of progress behaviour
 + check stderr with isatty() instead of stdout when deciding to show progress

* jk/run-command-use-shell (2010-01-01) 8 commits
  (merged to 'next' on 2010-01-10 at 7479e2a)
 + t4030, t4031: work around bogus MSYS bash path conversion
 + diff: run external diff helper with shell
 + textconv: use shell to run helper
 + editor: use run_command's shell feature
 + run-command: optimize out useless shell calls
 + run-command: convert simple callsites to use_shell
 + t0021: use $SHELL_PATH for the filter script
 + run-command: add "use shell" option

* jn/makefile (2010-01-06) 4 commits
  (merged to 'next' on 2010-01-10 at f5a5d42)
 + Makefile: consolidate .FORCE-* targets
 + Makefile: learn to generate listings for targets requiring special flags
 + Makefile: use target-specific variable to pass flags to cc
 + Makefile: regenerate assembler listings when asked

* jc/maint-1.6.1-checkout-m-custom-merge (2010-01-06) 1 commit
  (merged to 'next' on 2010-01-10 at df14116)
 + checkout -m path: fix recreating conflicts

* jh/commit-status (2010-01-13) 2 commits
  (merged to 'next' on 2010-01-13 at 0905d59)
 + t7502: test commit.status, --status and --no-status
 + commit: support commit.status, --status, and --no-status

* tc/test-locate-httpd (2010-01-02) 1 commit
  (merged to 'next' on 2010-01-06 at 9d913e5)
 + t/lib-http.sh: Restructure finding of default httpd location

* js/windows (2010-01-15) 7 commits
 + Do not use date.c:tm_to_time_t() from compat/mingw.c
 + MSVC: Windows-native implementation for subset of Pthreads API
 + MSVC: Fix an "incompatible pointer types" compiler warning
 + Windows: avoid the "dup dance" when spawning a child process
 + Windows: simplify the pipe(2) implementation
 + Windows: boost startup by avoiding a static dependency on shell32.dll
 + Windows: disable Python

* dp/maint-1.6.5-fast-import-non-commit-tag (2010-01-14) 1 commit
  (merged to 'next' on 2010-01-16 at f95ea8e)
 + fast-import: tag may point to any object type

* nd/include-termios-for-osol (2010-01-11) 1 commit
  (merged to 'next' on 2010-01-16 at 3160c76)
 + Add missing #include to support TIOCGWINSZ on Solaris

* pc/uninteresting-submodule-disappear-upon-switch-branches (2010-01-11) 1 commit
  (merged to 'next' on 2010-01-16 at b06ca1a)
 + Remove empty directories when checking out a commit with fewer submodules

* jc/rerere (2009-12-04) 1 commit
  (merged to 'next' on 2010-01-10 at e295b7f)
 + Teach --[no-]rerere-autoupdate option to merge, revert and friends

* rr/core-tutorial (2010-01-16) 1 commit
  (merged to 'next' on 2010-01-16 at d9dd8bd)
 + Documentation: Update git core tutorial clarifying reference to scripts

* il/push-set-upstream (2010-01-16) 1 commit
  (merged to 'next' on 2010-01-16 at e3a7a60)
 + Add push --set-upstream

* jk/warn-author-committer-after-commit (2010-01-17) 6 commits
  (merged to 'next' on 2010-01-17 at c2bb7fd)
 + user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
 + commit.c::print_summary: do not release the format string too early
  (merged to 'next' on 2010-01-16 at f22c077)
 + commit: allow suppression of implicit identity advice
 + commit: show interesting ident information in summary
 + strbuf: add strbuf_addbuf_percentquote
 + strbuf_expand: convert "%%" to "%"

* jc/ident (2010-01-17) 5 commits
  (merged to 'next' on 2010-01-19 at 9fba1c0)
 + ident.c: replace fprintf with fputs to suppress compiler warning
  (merged to 'next' on 2010-01-17 at 625670d)
 + user_ident_sufficiently_given(): refactor the logic to be usable from elsewhere
 + ident.c: treat $EMAIL as giving user.email identity explicitly
  (merged to 'next' on 2010-01-10 at f1f9ded)
 + ident.c: check explicit identity for name and email separately
 + ident.c: remove unused variables

* tr/http-push-ref-status (2010-01-08) 6 commits
  (merged to 'next' on 2010-01-16 at 7e872ac)
 + transport-helper.c::push_refs(): emit "no refs" error message
 + transport-helper.c::push_refs(): ignore helper-reported status if ref is not to be pushed
 + transport.c::transport_push(): make ref status affect return value
 + refactor ref status logic for pushing
 + t5541-http-push.sh: add test for unmatched, non-fast-forwarded refs
 + t5541-http-push.sh: add tests for non-fast-forward pushes

* bk/fix-relative-gitdir-file (2010-01-08) 2 commits
  (merged to 'next' on 2010-01-16 at cc4ae57)
 + Handle relative paths in submodule .git files
 + Test update-index for a gitlink to a .git file

* sd/cd-p-show-toplevel (2010-01-12) 2 commits
  (merged to 'next' on 2010-01-16 at 57d6d31)
 + Use $(git rev-parse --show-toplevel) in cd_to_toplevel().
 + Add 'git rev-parse --show-toplevel' option.

* jc/symbol-static (2010-01-18) 17 commits
  (merged to 'next' on 2010-01-18 at d063267)
 + Replace parse_blob() with an explanatory comment
 + symlinks.c: remove unused functions
 + object.c: remove unused functions
 + strbuf.c: remove unused function
 + sha1_file.c: remove unused function
 + mailmap.c: remove unused function
  (merged to 'next' on 2010-01-17 at d7346b1)
 + utf8.c: mark file-local function static
 + submodule.c: mark file-local function static
 + quote.c: mark file-local function static
 + remote-curl.c: mark file-local function static
 + read-cache.c: mark file-local functions static
 + parse-options.c: mark file-local function static
 + entry.c: mark file-local function static
 + http.c: mark file-local functions static
 + pretty.c: mark file-local function static
 + builtin-rev-list.c: mark file-local function static
 + bisect.c: mark file-local function static

* mh/rebase-fixup (2010-01-14) 23 commits
  (merged to 'next' on 2010-01-16 at 7ccb228)
 + rebase -i: Retain user-edited commit messages after squash/fixup conflicts
 + t3404: Set up more of the test repo in the "setup" step
 + rebase -i: For fixup commands without squashes, do not start editor
 + rebase -i: Change function make_squash_message into update_squash_message
 + rebase -i: Extract function do_with_author
 + rebase -i: Handle the author script all in one place in do_next
 + rebase -i: Extract a function "commit_message"
 + rebase -i: Simplify commit counting for generated commit messages
 + rebase -i: Improve consistency of commit count in generated commit messages
 + t3404: Test the commit count in commit messages generated by "rebase -i"
 + rebase -i: Introduce a constant AMEND
 + rebase -i: Introduce a constant AUTHOR_SCRIPT
 + rebase -i: Document how temporary files are used
 + rebase -i: Use symbolic constant $MSG consistently
 + rebase -i: Use "test -n" instead of "test ! -z"
 + rebase -i: Inline expression
 + rebase -i: Remove dead code
 + rebase -i: Make the condition for an "if" more transparent
  (merged to 'next' on 2010-01-12 at e84eab0)
 + rebase-i: Ignore comments and blank lines in peek_next_command
 + lib-rebase: Allow comments and blank lines to be added to the rebase script
 + lib-rebase: Provide clearer debugging info about what the editor did
 + Add a command "fixup" to rebase --interactive
 + t3404: Use test_commit to set up test repository
 (this branch is used by ns/rebase-auto-squash.)

* ns/rebase-auto-squash (2009-12-08) 1 commit
  (merged to 'next' on 2010-01-06 at da4e2f5)
 + rebase -i --autosquash: auto-squash commits
 (this branch uses mh/rebase-fixup.)

* da/difftool (2010-01-15) 10 commits
  (merged to 'next' on 2010-01-16 at 609f0da)
 + difftool: Update copyright notices to list each year separately
 + difftool: Use eval to expand '--extcmd' expressions
 + difftool: Add '-x' and as an alias for '--extcmd'
 + t7800-difftool.sh: Simplify the --extcmd test
  (merged to 'next' on 2010-01-10 at 749c870)
 + git-diff.txt: Link to git-difftool
 + difftool: Allow specifying unconfigured commands with --extcmd
 + difftool--helper: Remove use of the GIT_MERGE_TOOL variable
 + difftool--helper: Update copyright and remove distracting comments
  (merged to 'next' on 2010-01-06 at e957395)
 + git-difftool: Add '--gui' for selecting a GUI tool
 + t7800-difftool: Set a bogus tool for use by tests

* mm/conflict-advice (2010-01-12) 1 commit
  (merged to 'next' on 2010-01-16 at b83be11)
 + Be more user-friendly when refusing to do something because of conflict.

* jc/maint-strbuf-add-fix-doubling (2010-01-12) 1 commit
  (merged to 'next' on 2010-01-16 at 5959eee)
 + strbuf_addbuf(): allow passing the same buf to dst and src

* jc/maint-1.6.4-grep-lookahead (2010-01-10) 1 commit
  (merged to 'next' on 2010-01-13 at 20f8f4b)
 + grep: optimize built-in grep by skipping lines that do not hit
 (this branch is used by jc/grep-lookahead and jc/maint-grep-lookahead.)

* jc/maint-grep-lookahead (2010-01-12) 0 commits
 (this branch uses jc/maint-1.6.4-grep-lookahead; is used by jc/grep-lookahead.)

* jc/grep-lookahead (2010-01-15) 4 commits
  (merged to 'next' on 2010-01-17 at 4a5be2d)
 + grep --no-index: allow use of "git grep" outside a git repository
 + grep: prepare to run outside of a work tree
  (merged to 'next' on 2010-01-13 at 20f8f4b)
 + grep: rip out pessimization to use fixmatch()
 + grep: rip out support for external grep
 (this branch uses jc/maint-1.6.4-grep-lookahead and jc/maint-grep-lookahead.)

* jc/ls-files-ignored-pathspec (2010-01-08) 4 commits
  (merged to 'next' on 2010-01-16 at d36016a)
 + ls-files: fix overeager pathspec optimization
 + read_directory(): further split treat_path()
 + read_directory_recursive(): refactor handling of a single path into a separate function
 + t3001: test ls-files -o ignored/dir

* js/exec-error-report (2010-01-12) 4 commits
  (merged to 'next' on 2010-01-16 at 0e28d02)
 + Improve error message when a transport helper was not found
 + start_command: detect execvp failures early
 + run-command: move wait_or_whine earlier
 + start_command: report child process setup errors to the parent's stderr

* jc/cache-unmerge (2009-12-25) 9 commits
  (merged to 'next' on 2010-01-13 at 2290c44)
 + rerere forget path: forget recorded resolution
 + rerere: refactor rerere logic to make it independent from I/O
 + rerere: remove silly 1024-byte line limit
 + resolve-undo: teach "update-index --unresolve" to use resolve-undo info
 + resolve-undo: "checkout -m path" uses resolve-undo information
 + resolve-undo: allow plumbing to clear the information
 + resolve-undo: basic tests
 + resolve-undo: record resolved conflicts in a new index extension section
 + builtin-merge.c: use standard active_cache macros
 (this branch is used by jc/conflict-marker-size.)

--------------------------------------------------
[New Topics]

* jc/conflict-marker-size (2010-01-16) 8 commits
  (merged to 'next' on 2010-01-18 at f1f6023)
 + rerere: honor conflict-marker-size attribute
 + rerere: prepare for customizable conflict marker length
 + conflict-marker-size: new attribute
 + rerere: use ll_merge() instead of using xdl_merge()
 + merge-tree: use ll_merge() not xdl_merge()
 + xdl_merge(): allow passing down marker_size in xmparam_t
 + xdl_merge(): introduce xmparam_t for merge specific parameters
 + git_attr(): fix function signature

* ag/maint-apply-too-large-p (2010-01-17) 1 commit
  (merged to 'next' on 2010-01-18 at 8bd106a)
 + builtin-apply.c: Skip filenames without enough components

* jc/grep-author-all-match-implicit (2010-01-17) 1 commit
 - "log --author=me --grep=it" should find intersection, not union

* ag/patch-header-verify (2010-01-18) 1 commit
  (merged to 'next' on 2010-01-18 at 2cd0ddc)
 + builtin-apply.c: fix the --- and +++ header filename consistency check

* il/branch-set-upstream (2010-01-18) 2 commits
  (merged to 'next' on 2010-01-18 at b9b0993)
 + branch: warn and refuse to set a branch as a tracking branch of itself.
 + Add branch --set-upstream

* il/remote-updates (2010-01-18) 1 commit
  (merged to 'next' on 2010-01-18 at 5c3e805)
 + Add git remote set-url

* bw/cvsimport (2010-01-19) 3 commits
  (merged to 'next' on 2010-01-19 at 63f4c8d)
 + cvsimport: standarize system() calls to external git tools
 + cvsimport: standarize open() calls to external git tools
 + cvsimport: modernize callouts to git subcommands

* jc/checkout-merge-base (2010-01-19) 1 commit
  (merged to 'next' on 2010-01-19 at 3665110)
 + Fix "checkout A..." synonym for "checkout A...HEAD" on Windows

* jc/maint-refresh-index-is-optional-for-status (2010-01-19) 1 commit
 - status: don't require the repository to be writable

* il/rev-glob (2010-01-20) 2 commits
 - rev-parse --branches/--tags/--remotes=pattern
 - rev-parse --glob

This is a re-rolled "--namespace=" one.

--------------------------------------------------
[Will merge to 'master' after a bit more cooking in 'next']

* nd/status-partial-refresh (2010-01-17) 2 commits
  (merged to 'next' on 2010-01-19 at 64f0c0b)
 + rm: only refresh entries that we may touch
  (merged to 'next' on 2010-01-16 at f77bc8f)
 + status: only touch path we may need to check

* jl/submodule-diff (2010-01-18) 4 commits
  (merged to 'next' on 2010-01-20 at 95cb513)
 + Performance optimization for detection of modified submodules
  (merged to 'next' on 2010-01-17 at 525075b)
 + git status: Show uncommitted submodule changes too when enabled
  (merged to 'next' on 2010-01-16 at 0a99e3c)
 + Teach diff that modified submodule directory is dirty
 + Show submodules as modified when they contain a dirty work tree

* jc/fix-tree-walk (2009-09-14) 7 commits
  (merged to 'next' on 2010-01-13 at 1c01b87)
 + read-tree --debug-unpack
 + unpack-trees.c: look ahead in the index
 + unpack-trees.c: prepare for looking ahead in the index
 + Aggressive three-way merge: fix D/F case
 + traverse_trees(): handle D/F conflict case sanely
 + more D/F conflict tests
 + tests: move convenience regexp to match object names to test-lib.sh

Resurrected from "Ejected" category.  This is fix for a tricky codepath
and testing and improving before it hits 'master' is greatly appreciated.
(I have been using this in my private build for some time).

* ap/merge-backend-opts (2008-07-18) 7 commits
  (merged to 'next' on 2010-01-18 at cb1f6b7)
 + Document that merge strategies can now take their own options
 + Extend merge-subtree tests to test -Xsubtree=dir.
 + Make "subtree" part more orthogonal to the rest of merge-recursive.
 + pull: Fix parsing of -X<option>
 + Teach git-pull to pass -X<option> to git-merge
 + git merge -X<option>
 + git-merge-file --ours, --theirs

--------------------------------------------------
[Cooking]

* js/refer-upstream (2010-01-19) 3 commits
  (merged to 'next' on 2010-01-20 at 5a5547a)
 + Teach @{upstream} syntax to strbuf_branchanme()
 + t1506: more test for @{upstream} syntax
 + Introduce <branch>@{upstream} notation

Updated to teach the new syntax to commands like "checkout" and "merge"
that want to behave better when they know what were given was a branch
name, not a random SHA-1.

* jh/notes (2010-01-17) 23 commits
 - builtin-gc: Teach the new --notes option to garbage-collect notes
 - Notes API: gc_notes(): Prune notes that belong to non-existing objects
 - t3305: Verify that removing notes triggers automatic fanout consolidation
 - builtin-notes: Teach -d option for deleting existing notes
 - Teach builtin-notes to remove empty notes
 - Teach notes code to properly preserve non-notes in the notes tree
 - t3305: Verify that adding many notes with git-notes triggers increased fanout
 - t3301: Verify successful annotation of non-commits
 - Builtin-ify git-notes
 - Refactor notes concatenation into a flexible interface for combining notes
 - Notes API: Allow multiple concurrent notes trees with new struct notes_tree
 - Notes API: write_notes_tree(): Store the notes tree in the database
 - Notes API: for_each_note(): Traverse the entire notes tree with a callback
 - Notes API: get_note(): Return the note annotating the given object
 - Notes API: remove_note(): Remove note objects from the notes tree structure
 - Notes API: add_note(): Add note objects to the internal notes tree structure
 - Notes API: init_notes(): Initialize the notes tree from the given notes ref
 - Add tests for checking correct handling of $GIT_NOTES_REF and core.notesRef
 - Notes API: get_commit_notes() -> format_note() + remove the commit restriction
 - Minor non-functional fixes to notes.c
  (merged to 'next' on 2010-01-02 at ae42130)
 + Add more testcases to test fast-import of notes
 + Rename t9301 to t9350, to make room for more fast-import tests
 + fast-import: Proper notes tree manipulation

Updated with a re-roll.

* jh/gitweb-cached (2010-01-13) 9 commits
 - gitweb: File based caching layer (from git.kernel.org)
 - gitweb: Convert output to using indirect file handle
 - gitweb: cleanup error message produced by undefined $site_header
 - gitweb: add a get function to compliment print_sort_th
 - gitweb: add a get function to compliment print_local_time
 - gitweb: Makefile improvements
 - gitweb: Add option to force version match
 - gitweb: change die_error to take "extra" argument for extended die information
 - gitweb: Load checking

Replaced with a re-roll.  Update to t9500 is probably needed.

* jc/branch-d (2009-12-29) 1 commit
  (merged to 'next' on 2010-01-10 at 61a14b7)
 + branch -d: base the "already-merged" safety on the branch it merges with

^ permalink raw reply

* [ANNOUNCE] Git 1.6.6.1
From: Junio C Hamano @ 2010-01-21  0:51 UTC (permalink / raw)
  To: git

The latest maintenance release Git 1.6.6.1 is available at the
usual places:

  http://www.kernel.org/pub/software/scm/git/

  git-1.6.6.1.tar.{gz,bz2}			(source tarball)
  git-htmldocs-1.6.6.1.tar.{gz,bz2}		(preformatted docs)
  git-manpages-1.6.6.1.tar.{gz,bz2}		(preformatted docs)

The RPM binary packages for a few architectures are found in:

  RPMS/$arch/git-*-1.6.6.1-1.fc11.$arch.rpm	(RPM)

Git v1.6.6.1 Release Notes
==========================

Fixes since v1.6.6
------------------

 * "git blame" did not work well when commit lacked the author name.

 * "git branch -a name" wasn't diagnosed as an error.

 * "git count-objects" did not handle packfiles that are bigger than 4G on
   platforms with 32-bit off_t.

 * "git checkout -m other" while on a branch that does not have any commit
   segfaulted, instead of failing.

 * "git fast-import" choked when fed a tag that do not point at a
   commit.

 * "git grep" finding from work tree files could have fed garbage to
   the underlying regexec(3).

 * "git grep -L" didn't show empty files (they should never match, and
   they should always appear in -L output as unmatching).

 * "git rebase -i" did not abort cleanly if it failed to launch the editor.

 * "git reset --hard" did not work correctly when GIT_WORK_TREE environment
   variable is used to point at the root of the true work tree.

 * http-backend was not listed in the command list in the documentation.

 * Building on FreeBSD (both 7 and 8) needs OLD_ICONV set in the Makefile

 * "git checkout -m some-branch" while on an unborn branch crashed.

Other minor documentation updates are included.

^ permalink raw reply

* [ANNOUNCE] Git 1.6.5.8
From: Junio C Hamano @ 2010-01-21  0:50 UTC (permalink / raw)
  To: git

An maintenance release Git 1.6.5.8 is available at the usual places:

  http://www.kernel.org/pub/software/scm/git/

  git-1.6.5.8.tar.{gz,bz2}			(source tarball)
  git-htmldocs-1.6.5.8.tar.{gz,bz2}		(preformatted docs)
  git-manpages-1.6.5.8.tar.{gz,bz2}		(preformatted docs)

The RPM binary packages for a few architectures are found in:

  RPMS/$arch/git-*-1.6.5.8-1.fc11.$arch.rpm	(RPM)

Git v1.6.5.8 Release Notes
==========================

Fixes since v1.6.5.7
--------------------

* "git count-objects" did not handle packfiles that are bigger than 4G on
  platforms with 32-bit off_t.

* "git rebase -i" did not abort cleanly if it failed to launch the editor.

* "git blame" did not work well when commit lacked the author name.

* "git fast-import" choked when handling a tag that points at an object
  that is not a commit.

* "git reset --hard" did not work correctly when GIT_WORK_TREE environment
  variable is used to point at the root of the true work tree.

* "git grep" fed a buffer that is not NUL-terminated to underlying
  regexec().

* "git checkout -m other" while on a branch that does not have any commit
  segfaulted, instead of failing.

* "git branch -a other" should have diagnosed the command as an error.

Other minor documentation updates are also included.

^ permalink raw reply

* Re: Dangerous new server status for deleted files
From: Johan Herland @ 2010-01-21  0:28 UTC (permalink / raw)
  To: Pal-Kristian Engstad; +Cc: git, Simon Hausmann, Junio C Hamano
In-Reply-To: <4B5764A6.30504@naughtydog.com>

On Wednesday 20 January 2010, Pal-Kristian Engstad wrote:
> Our new Perforce server (P4D/NTX64/2009.2/228098 2009/12/16) seems to be
> giving out 'move/delete' instead of the old 'delete' status for files
> that are moved within the repo. Attached is the simple patch to fix it.
> (By the way: How do you "sign off" a patch?) This is urgent, as it will
> corrupt git repos trying to track a Perforce depot.

Hi, and welcome to the Git community.

The patch itself may be fine, but you should probably read 
Documentation/SubmittingPatches for hints on the customs of this list. For 
example: We prefer patches _inline_ in the mail, so that it's easier to 
review and comment on them. The Documentation/SubmittingPatches also 
explains what is meant by a sign-off, and how to sign-off your patches.


Have fun! :)

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

^ permalink raw reply

* Re: git locate
From: SungHyun Nam @ 2010-01-21  0:11 UTC (permalink / raw)
  To: Git List
In-Reply-To: <alpine.DEB.1.00.1001201021060.31129@intel-tinevez-2-302>

Hello,

Johannes Schindelin wrote:
>
> On Tue, 19 Jan 2010, Jakub Narebski wrote:
>
>> Johannes Schindelin<Johannes.Schindelin@gmx.de>  writes:
>>
>>> On Wed, 20 Jan 2010, John Tapsell wrote:
>>>
>>>>    Could we add a:  git locate<filename>        or git find<filename>
>>>
>>> How about "git ls-files \*<filename>"?
>>
>> Or "git ls-files '*filename'...
>>
>> ... but how to make an (git) alias for this?
>
> Add something like this to your $HOME/.gitconfig:
>
> [alias]
>          locate = !sh -c 'git ls-files "\\*$1"' -

The alias 'git locate' and the command 'git ls-files' runs
differently if I run them in a subdirectory.
Is it expected?

[master] ~/srcs/git[299]$ git locate urls.txt
Documentation/urls.txt
[master] ~/srcs/git[300]$ git ls-files '*urls.txt'
Documentation/urls.txt
[master] ~/srcs/git[301]$ cd t
[master] ~/srcs/git/t[302]$ git locate urls.txt
Documentation/urls.txt
[master] ~/srcs/git/t[303]$ git ls-files '*urls.txt'
[master] ~/srcs/git/t[304]$

Thanks,
namsh

^ permalink raw reply

* Re: git notes: notes
From: Junio C Hamano @ 2010-01-20 23:14 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Michael J Gruber, Joey Hess, Johan Herland, git
In-Reply-To: <alpine.DEB.1.00.1001202354070.4985@pacific.mpi-cbg.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Makes sense, and the patch actually removes what could be seen as an ugly 
> side effect (why it only ONELINE not getting notes?).

Thanks.

The motivation was that the user should be able to get notes even under
ONELINE mode if desired.  But then the call to get_commit_notes() may want
to inspect the commit format being used and tweak the flag parameter; right
now it always sends NOTES_SHOW_HEADER and NOTES_INDENT.

> I would agree with Peff about the mention of --pretty disabling notes 
> (unless asked for by a user format) in the commit notes as well as in the 
> pretty options,...

Actually I am of two minds regarding --pretty={short,medium} and the
like.  The "how about this" patch may be the safest for people who are
used to read "log --pretty=xxx" output with scripts, but it does look
inconsistent and hard to explain to new people who do not even know that
there were versions of git that does not know about notes.

> but I fully disagree on the need for tests.  We should not 
> have a thorough test suite that runs for days on end, but we should 
> concentrate on things that are more likely to get broken.  And the added 
> code is just too obvious for that.

I agree with that principle, but it doesn't explain nor justify the lack
of tests for format-patch, which would have caught the breakage a lot
earlier.

Or perhaps we all (not just you but I am just as guilty) misjudged "things
that are more likely to get broken", even though we are very well aware
that touching log-tree infrastructure will have fallout all over the "log"
family.

^ permalink raw reply

* Re: git notes: notes
From: Jeff King @ 2010-01-20 23:06 UTC (permalink / raw)
  To: Johannes Schindelin
  Cc: Junio C Hamano, Michael J Gruber, Joey Hess, Johan Herland, git
In-Reply-To: <alpine.DEB.1.00.1001202354070.4985@pacific.mpi-cbg.de>

On Wed, Jan 20, 2010 at 11:58:07PM +0100, Johannes Schindelin wrote:

> I would agree with Peff about the mention of --pretty disabling notes 
> (unless asked for by a user format) in the commit notes as well as in the 
> pretty options, but I fully disagree on the need for tests.  We should not 
> have a thorough test suite that runs for days on end, but we should 
> concentrate on things that are more likely to get broken.  And the added 
> code is just too obvious for that.

Sure, we don't have to go all out. But I think there is some confusion
right now about just what behavior we _should_ have, so I think
documenting it in the form of tests is reasonable.

-Peff

^ permalink raw reply

* Re: [PATCH 1/4] engine.pl: Fix a recent breakage of the buildsystem generator
From: Sebastian Schuberth @ 2010-01-20 22:54 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, Johannes Sixt, GIT Mailing-list
In-Reply-To: <4B575838.2010504@ramsay1.demon.co.uk>

On 20.01.2010 20:23, Ramsay Jones wrote:

 > '-o' or connective. This resulted in the buildsystem generator
 > mistaking the conditional 'rm' for a linker command. In order

Thanks for spotting the cause of this! Some comments:

1. How about deleting lines 183-185 in same run? That commented out 
code, too, is missing the escapes for the pipes that Pete mentioned anyway.

-#        } elsif ($text =~ /^test / && $text =~ /|| rm -f /) {
-#            # commands removing executables, if they exist
-#


2. Couldn't we reduce the test to just

+        if ($text =~ /^test /) {
+            # options to test may be mistaken for linker options
+            next;
+        }
+

3. If the above won't do for some reason, I'd still prefer something like

+        if ($text =~ /^test / && $text =~ / -o /) {
+            # options to test may be mistaken for linker options
+            next;
+        }
+

as it makes more clear what's the problem in such lines.

-- 
Sebastian Schuberth

^ permalink raw reply

* Re: git notes: notes
From: Johannes Schindelin @ 2010-01-20 22:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Michael J Gruber, Joey Hess, Johan Herland, git
In-Reply-To: <7v3a201lpz.fsf@alter.siamese.dyndns.org>

Hi,

On Wed, 20 Jan 2010, Junio C Hamano wrote:

> Subject: Fix "log" family not to be too agressive about showing notes
> 
> Giving "Notes" information in the default output format of "log" and
> "show" is a sensible progress (the user has asked for it by having the
> notes), but for some commands (e.g. "format-patch") spewing notes into the
> formatted commit log message without being asked is too aggressive.
> 
> Enable notes output only for "log", "show", "whatchanged" by default;
> other users can ask for it by setting show_notes field to true.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---

Makes sense, and the patch actually removes what could be seen as an ugly 
side effect (why it only ONELINE not getting notes?).

I would agree with Peff about the mention of --pretty disabling notes 
(unless asked for by a user format) in the commit notes as well as in the 
pretty options, but I fully disagree on the need for tests.  We should not 
have a thorough test suite that runs for days on end, but we should 
concentrate on things that are more likely to get broken.  And the added 
code is just too obvious for that.

(Anybody remember the initial suggestion for testing git-commit before 
making it builtin?  It had something like 70 tests.)

Ciao,
Dscho

^ permalink raw reply

* Re: git equivalent to clearcase wink-in
From: Sverre Rabbelier @ 2010-01-20 22:34 UTC (permalink / raw)
  To: Mike Hommey, Johan Herland; +Cc: Jamie Wellnitz, Richard Assal, git
In-Reply-To: <20100120211251.GA26274@glandium.org>

Heya,

On Wed, Jan 20, 2010 at 22:12, Mike Hommey <mh@glandium.org> wrote:
> Surely the ccache directory could be shared on nfs or some other network
> filesystem. Or object file could be checked in, which is imho ugly, but
> should work (better to do that on a separate branch)

Ha! It could even be stored as a note on the tree object? The whole
notes business seems to be nearing a usable stage. Or maybe notes are
text-only, mhhh. Johan?

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply

* Re: git notes: notes
From: Junio C Hamano @ 2010-01-20 22:33 UTC (permalink / raw)
  To: Jeff King
  Cc: Michael J Gruber, Joey Hess, Johannes Schindelin, Johan Herland,
	git
In-Reply-To: <20100120222548.GD15936@coredump.intra.peff.net>

Jeff King <peff@peff.net> writes:

> No tests or docs, of course. :) You can squash the --pretty=raw test
> from my patch, but you will need to exercise --show-notes and
> --no-show-notes, too, as well as checking other formats and things like
> format-patch. So probably writing your own tests will make it easier to
> more thoroughly check each case.

Thanks, but Ugh.

Didn't I say elsewhere that I am too busy to become a janitor for
everybody's itch, especially for topics that are merely "Meh" to me?

If there is no volunteer, I might be forced to do something about it, but
no promises, and I am reasonably certain that not much will happen at my
end for coming 48 hours, as I am cutting 1.6.6.1 (and perhaps 1.6.5.8) and
looking at other topics in 'next' that deserve to go to 1.7.0-rc0.

^ permalink raw reply

* Re: git notes: notes
From: Jeff King @ 2010-01-20 22:25 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Michael J Gruber, Joey Hess, Johannes Schindelin, Johan Herland,
	git
In-Reply-To: <7v3a201lpz.fsf@alter.siamese.dyndns.org>

On Wed, Jan 20, 2010 at 01:59:36PM -0800, Junio C Hamano wrote:

> Subject: Fix "log" family not to be too agressive about showing notes
> 
> Giving "Notes" information in the default output format of "log" and
> "show" is a sensible progress (the user has asked for it by having the
> notes), but for some commands (e.g. "format-patch") spewing notes into the
> formatted commit log message without being asked is too aggressive.
> 
> Enable notes output only for "log", "show", "whatchanged" by default;
> other users can ask for it by setting show_notes field to true.

What I didn't get out of reading this but did from reading the code (I
think) is what you meant by "by default" here. That is, doing:

  git log

will show notes, but neither

  git log --pretty=raw

nor even

  git log --pretty=medium

will do so, even though the latter otherwise produces identical output
to the default.

That seems like a reasonable rule to me, but I just wanted to make sure
that was both what was happening and what was intended.

> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  builtin-log.c |    2 ++
>  commit.h      |    1 +
>  log-tree.c    |    1 +
>  pretty.c      |    2 +-
>  revision.c    |    4 ++++
>  revision.h    |    1 +
>  6 files changed, 10 insertions(+), 1 deletions(-)

No tests or docs, of course. :) You can squash the --pretty=raw test
from my patch, but you will need to exercise --show-notes and
--no-show-notes, too, as well as checking other formats and things like
format-patch. So probably writing your own tests will make it easier to
more thoroughly check each case.

-Peff

^ permalink raw reply

* Re: git-merge segfault in 1.6.6 and master
From: Junio C Hamano @ 2010-01-20 22:21 UTC (permalink / raw)
  To: Tim Olsen; +Cc: git, Miklos Vajna, Johannes Schindelin
In-Reply-To: <4B577C3F.7040608@brooklynpenguin.com>

Tim Olsen <tim@brooklynpenguin.com> writes:

> At the beginning of merge_recursive(), the local mrtree appears to be
> set to some globally defined mrtree which is not null:

No; that "assignment" is just to squelch warning from gcc.  mrtree at that
point is uninitialized.

> In merge_trees(), mrtree is the argument **result.  It is at line 1255
> that write_tree_from_memory nulls out the pointee of result:
> ...
> Then in write_tree_from_memory() we find the offending return NULL at
> line 210:
>
> Breakpoint 8, write_tree_from_memory (o=0x7fffffffd560) at
> merge-recursive.c:210
> (gdb) list
> 205				struct cache_entry *ce = active_cache[i];
> 206				if (ce_stage(ce))
> 207					output(o, 0, "%d %.*s", ce_stage(ce),
> 208					       (int)ce_namelen(ce), ce->name);
> 209			}
> 210			return NULL;
> 211		}
> 212	
> 213		if (!active_cache_tree)
> 214			active_cache_tree = cache_tree();
> (gdb)

Are you saying write_tree_from_memory() is returning NULL?  That probably
means that in the recursive (i.e. the step that first merges multiple
common ancestors into one) case the merge is getting conflicts.  Do you
see these "There are unmerged index entries" output?

In the recursive case (i.e. o->call_depth is non-zero), process_renames()
and process_entry() are supposed to be forcing the conflicts resolved,
recording the contents with conflict markers if necessary, before the
control gets to that point, so it clearly is a bug very specific to the
recursive merge implementation.

^ permalink raw reply

* Re: git notes: notes
From: Jeff King @ 2010-01-20 22:21 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Joey Hess, git
In-Reply-To: <7vy6jszaz0.fsf@alter.siamese.dyndns.org>

On Wed, Jan 20, 2010 at 02:07:47PM -0800, Junio C Hamano wrote:

> > -	if (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW)
> > +	if (context->show_notes ||
> > +	    (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW))
> >  		get_commit_notes(commit, sb, encoding,
> >  				 NOTES_SHOW_HEADER | NOTES_INDENT);
> 
> Heh, without this hunk I would have thought Peff and Gitster were the same
> person ;-).
> 
> Once you introduce --no-notes, the above condition would not work well.

Yeah, I know, or I would have just added the 2 lines for
--no-show-notes. :) I think your patch is better; I'll comment on it
separately.

-Peff

^ permalink raw reply

* Re: git notes: notes
From: Junio C Hamano @ 2010-01-20 22:07 UTC (permalink / raw)
  To: Jeff King; +Cc: Joey Hess, git
In-Reply-To: <20100120214152.GC9107@coredump.intra.peff.net>

Jeff King <peff@peff.net> writes:

> diff --git a/pretty.c b/pretty.c
> index 0674027..95fe39a 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -1094,7 +1094,8 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
>  	if (fmt == CMIT_FMT_EMAIL && sb->len <= beginning_of_body)
>  		strbuf_addch(sb, '\n');
>  
> -	if (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW)
> +	if (context->show_notes ||
> +	    (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW))
>  		get_commit_notes(commit, sb, encoding,
>  				 NOTES_SHOW_HEADER | NOTES_INDENT);

Heh, without this hunk I would have thought Peff and Gitster were the same
person ;-).

Once you introduce --no-notes, the above condition would not work well.

^ permalink raw reply

* Re: git notes: notes
From: Junio C Hamano @ 2010-01-20 21:59 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Joey Hess, Johannes Schindelin, Johan Herland, git
In-Reply-To: <7veilk1o3s.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Michael J Gruber <git@drmicha.warpmail.net> writes:
>
>> No, but outputting the note as part of the log is the standard. So for
>> example, when you do a format-patch | apply cycle, format-patch will
>> insert the note as part of the commit message, and apply will *store*
>> the note text (including Note:\n) as part of the commit message of the
>> new commit.
>
> Thanks; that was the kind of breakage report I was looking for (and wished
> to have heard a lot earlier).  Personally I find it is unexcusable that
> format-patch defaults to giving notes.
>
>> So, I would say the notes feature is not that well integrated right now,
>
> No question about it.

How about solving it this way?

It _could_ break some tests, if the set of tests were carefully written to
cover not only the positive ("I am showing off my shiny new toy") cases
but also the negative ("These commands share the same codepath touched by
the series, but I don't intend to change their behaviour, and here is to
make sure the new toy does not affect them") cases and the latter set
assumed it is ok to sprinkle notes in commit log messages without being
asked, but I haven't tried running the test suite yet.

---
Subject: Fix "log" family not to be too agressive about showing notes

Giving "Notes" information in the default output format of "log" and
"show" is a sensible progress (the user has asked for it by having the
notes), but for some commands (e.g. "format-patch") spewing notes into the
formatted commit log message without being asked is too aggressive.

Enable notes output only for "log", "show", "whatchanged" by default;
other users can ask for it by setting show_notes field to true.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin-log.c |    2 ++
 commit.h      |    1 +
 log-tree.c    |    1 +
 pretty.c      |    2 +-
 revision.c    |    4 ++++
 revision.h    |    1 +
 6 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index 41b6df4..da0ba1d 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -41,6 +41,8 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
 	rev->commit_format = CMIT_FMT_DEFAULT;
 	if (fmt_pretty)
 		get_commit_format(fmt_pretty, rev);
+	else
+		rev->show_notes = 1;
 	rev->verbose_header = 1;
 	DIFF_OPT_SET(&rev->diffopt, RECURSIVE);
 	rev->show_root_diff = default_show_root;
diff --git a/commit.h b/commit.h
index e5332ef..2c0742b 100644
--- a/commit.h
+++ b/commit.h
@@ -70,6 +70,7 @@ struct pretty_print_context
 	const char *after_subject;
 	enum date_mode date_mode;
 	int need_8bit_cte;
+	int show_notes;
 	struct reflog_walk_info *reflog_info;
 };
 
diff --git a/log-tree.c b/log-tree.c
index 0fdf159..27afcf6 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -284,6 +284,7 @@ void show_log(struct rev_info *opt)
 	struct pretty_print_context ctx = {0};
 
 	opt->loginfo = NULL;
+	ctx.show_notes = opt->show_notes;
 	if (!opt->verbose_header) {
 		graph_show_commit(opt->graph);
 
diff --git a/pretty.c b/pretty.c
index 8f5bd1a..b2ee7fe 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1094,7 +1094,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
 	if (fmt == CMIT_FMT_EMAIL && sb->len <= beginning_of_body)
 		strbuf_addch(sb, '\n');
 
-	if (fmt != CMIT_FMT_ONELINE)
+	if (context->show_notes)
 		get_commit_notes(commit, sb, encoding,
 				 NOTES_SHOW_HEADER | NOTES_INDENT);
 
diff --git a/revision.c b/revision.c
index 25fa14d..03c280f 100644
--- a/revision.c
+++ b/revision.c
@@ -1165,6 +1165,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
 	} else if (!prefixcmp(arg, "--pretty=") || !prefixcmp(arg, "--format=")) {
 		revs->verbose_header = 1;
 		get_commit_format(arg+9, revs);
+	} else if (!strcmp(arg, "--show-notes")) {
+		revs->show_notes = 1;
+	} else if (!strcmp(arg, "--no-notes")) {
+		revs->show_notes = 0;
 	} else if (!strcmp(arg, "--oneline")) {
 		revs->verbose_header = 1;
 		get_commit_format("oneline", revs);
diff --git a/revision.h b/revision.h
index d368003..4167c1e 100644
--- a/revision.h
+++ b/revision.h
@@ -80,6 +80,7 @@ struct rev_info {
 	/* Format info */
 	unsigned int	shown_one:1,
 			show_merge:1,
+			show_notes:1,
 			abbrev_commit:1,
 			use_terminator:1,
 			missing_newline:1,

^ permalink raw reply related

* Re: git-merge segfault in 1.6.6 and master
From: Tim Olsen @ 2010-01-20 21:57 UTC (permalink / raw)
  To: git; +Cc: git, Miklos Vajna, Johannes Schindelin
In-Reply-To: <7vocko3802.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Thanks.

Thanks for taking the time to look into this!

> 
> Since you can build and run git yourself, can I ask you to run another
> experiment with this one-liner patch applied?

It appears that a segfault still happens with your patch applied, but
this time it is caught:

tolsen@neurofunk:~/git/site-build-dav-sync-05 [git:build-dav-sync-05]$
git merge origin/deployed
error: merge-recursive died of signal 11
Merge with strategy recursive failed.
tolsen@neurofunk:~/git/site-build-dav-sync-05 [git:build-dav-sync-05]$


> "common = NULL" means merged_common_ancestors->tree is NULL in the caller.
> Somebody is passing a bogus commit in "ca" (aka common ancestors) list
> when calling merge_recursive(), or forgetting to parse them before calling
> it.  In your debugger could you find out where it comes from and what it
> has before this call into merge_trees() is made?  Specifically, what the
> "ca" list at 0x7b3c00 contains, and how "merged_common_ancestors" at
> 0x121e360 looks like. in this trace we see below:

Here is the replay of the flow of execution from the first time we enter
merge_recursive().  The repository has been modified slightly so the
pointers are different this time but the segfault is still happening
(I'll stop modifying the repository now ;-) .

Upon entering merge_recursive() for the first time, ca is a two-item
list and both items have non-null trees:

Breakpoint 1, merge_recursive (o=0x7fffffffd560, h1=0x793350,
h2=0x7932c0, ca=0x7b4a40, result=0x7fffffffd5d8) at merge-recursive.c:1286
(gdb) p *ca
$1 = {item = 0x793db8, next = 0x7b4a20}
(gdb) p *(ca->next)
$2 = {item = 0x793aa0, next = 0x0}
(gdb) p ca->item->tree
$3 = (struct tree *) 0x77be10
(gdb) p ca->next->item->tree
$4 = (struct tree *) 0x77b488
(gdb)

Then on line 1303, the head of ca is popped off into
merged_common_ancestors:

Breakpoint 2, merge_recursive (o=0x7fffffffd560, h1=0x793350,
h2=0x7932c0, ca=0x7b4a20, result=0x7fffffffd5d8) at merge-recursive.c:1304
(gdb) list
1299			for (iter = ca; iter; iter = iter->next)
1300				output_commit_title(o, iter->item);
1301		}
1302	
1303		merged_common_ancestors = pop_commit(&ca);
1304		if (merged_common_ancestors == NULL) {
1305			/* if there is no common ancestor, make an empty tree */
1306			struct tree *tree = xcalloc(1, sizeof(struct tree));
1307	
1308			tree->object.parsed = 1;
(gdb) p merged_common_ancestors
$5 = (struct commit *) 0x793db8
(gdb) p ca
$8 = (struct commit_list *) 0x7b4a20

merge_recursive() is then called recursively at line 1329 with a pointer
to merged_common_ancestors passed as the "result" argument:

Breakpoint 3, merge_recursive (o=0x7fffffffd560, h1=0x793350,
h2=0x7932c0, ca=0x7b4a20, result=0x7fffffffd5d8) at merge-recursive.c:1329
(gdb) list
1324			discard_cache();
1325			saved_b1 = o->branch1;
1326			saved_b2 = o->branch2;
1327			o->branch1 = "Temporary merge branch 1";
1328			o->branch2 = "Temporary merge branch 2";
1329			merge_recursive(o, merged_common_ancestors, iter->item,
1330					NULL, &merged_common_ancestors);
1331			o->branch1 = saved_b1;
1332			o->branch2 = saved_b2;
1333			o->call_depth--;
(gdb)

In the second call to merged_common_ancestors(), result's pointee is
replaced by a commit with a null tree at line 1347:

Breakpoint 4, merge_recursive (o=0x7fffffffd560, h1=0x793db8,
h2=0x793aa0, ca=0x0, result=0x7fffffffd500) at merge-recursive.c:1347
(gdb) n
(gdb) p (*result)->tree
$10 = (struct tree *) 0x0
(gdb) list
1343		clean = merge_trees(o, h1->tree, h2->tree,
merged_common_ancestors->tree,
1344				    &mrtree);
1345	
1346		if (o->call_depth) {
1347			*result = make_virtual_commit(mrtree, "merged tree");
1348			commit_list_insert(h1, &(*result)->parents);
1349			commit_list_insert(h2, &(*result)->parents->next);
1350		}
1351		flush_output(o);
1352		return clean;
(gdb)

make_virtual_commit() is just setting its tree to mrtree:

Breakpoint 5, make_virtual_commit (tree=0x0, comment=0x5016fc "merged
tree") at merge-recursive.c:44
(gdb) list
39	 * A virtual commit has (const char *)commit->util set to the name.
40	 */
41	
42	static struct commit *make_virtual_commit(struct tree *tree, const
char *comment)
43	{
44		struct commit *commit = xcalloc(1, sizeof(struct commit));
45		commit->tree = tree;
46		commit->util = (void*)comment;
47		/* avoid warnings */
48		commit->object.parsed = 1;
(gdb)
49		return commit;
50	}

At the beginning of merge_recursive(), the local mrtree appears to be
set to some globally defined mrtree which is not null:

Breakpoint 1, merge_recursive (o=0x7fffffffd560, h1=0x793db8,
h2=0x793aa0, ca=0x0, result=0x7fffffffd500) at merge-recursive.c:1286
(gdb) p mrtree
$13 = (struct tree *) 0x7ffff732d0ac
(gdb) list
1281		struct commit_list *iter;
1282		struct commit *merged_common_ancestors;
1283		struct tree *mrtree = mrtree;
1284		int clean;
1285	
1286		if (show(o, 4)) {
1287			output(o, 4, "Merging:");
1288			output_commit_title(o, h1);
1289			output_commit_title(o, h2);
1290		}
(gdb)

Which leads me to believe the problem is in the call to merge_trees() at
line 1343:

Breakpoint 6, merge_recursive (o=0x7fffffffd560, h1=0x793db8,
h2=0x793aa0, ca=0x0, result=0x7fffffffd500) at merge-recursive.c:1343
(gdb) list
1338	
1339		discard_cache();
1340		if (!o->call_depth)
1341			read_cache();
1342	
1343		clean = merge_trees(o, h1->tree, h2->tree,
merged_common_ancestors->tree,
1344				    &mrtree);
1345	
1346		if (o->call_depth) {
1347			*result = make_virtual_commit(mrtree, "merged tree");
(gdb)

In merge_trees(), mrtree is the argument **result.  It is at line 1255
that write_tree_from_memory nulls out the pointee of result:

Breakpoint 7, merge_trees (o=0x7fffffffd560, head=0x77be10,
merge=0x77b488, common=0x77c0b8, result=0x7fffffffd478) at
merge-recursive.c:1255
(gdb) p *result
$16 = (struct tree *) 0x7ffff732d0ac
(gdb) n
(gdb) p *result
$17 = (struct tree *) 0x0
(gdb) list
1252			clean = 1;
1253	
1254		if (o->call_depth)
1255			*result = write_tree_from_memory(o);
1256	
1257		return clean;
1258	}
1259	
1260	static struct commit_list *reverse_commit_list(struct commit_list
*list)
1261	{
(gdb)

Then in write_tree_from_memory() we find the offending return NULL at
line 210:

Breakpoint 8, write_tree_from_memory (o=0x7fffffffd560) at
merge-recursive.c:210
(gdb) list
205				struct cache_entry *ce = active_cache[i];
206				if (ce_stage(ce))
207					output(o, 0, "%d %.*s", ce_stage(ce),
208					       (int)ce_namelen(ce), ce->name);
209			}
210			return NULL;
211		}
212	
213		if (!active_cache_tree)
214			active_cache_tree = cache_tree();
(gdb)


Let me know if you need any more information.

Thanks,
Tim

^ permalink raw reply

* Re: [PATCH 4/4] msvc: Add a definition of NORETURN compatible with  msvc compiler
From: Erik Faye-Lund @ 2010-01-20 21:45 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, Johannes Sixt, GIT Mailing-list
In-Reply-To: <4B575D48.9070508@ramsay1.demon.co.uk>

On Wed, Jan 20, 2010 at 8:45 PM, Ramsay Jones
<ramsay@ramsay1.demon.co.uk> wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
>
> I thought that Erik had already submitted this patch along with
> those that resulted in commits a4f3131c and 18660bc9. However, I
> don't seem to be able to find it anywhere! (maybe I only imagined
> it).
>
> If you find Erik's patch, please apply that instead...
>

I don't think I ever sent one - I haven't bothered to set up msvc for
git compilation, so I only did the preparation (and I think I sent a
comment about how it could be done).

So, thanks for following it up! :)

-- 
Erik "kusma" Faye-Lund

^ permalink raw reply

* Re: git notes: notes
From: Jeff King @ 2010-01-20 21:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Joey Hess, git
In-Reply-To: <20100120213137.GA9107@coredump.intra.peff.net>

On Wed, Jan 20, 2010 at 04:31:38PM -0500, Jeff King wrote:

> We can start with this patch, which clears up Joey's problem.
> 
> -- >8 --
> Subject: [PATCH] don't show notes for --pretty=raw
> 
> The --pretty=raw format of the log family is likely to be
> used by scripts. Such scripts may parse the output into
> records on blank lines, since doing so in the past has
> always worked. However, with the recently added notes
> output, such parsers will see an extra stanza for any
> commits that have notes.
> 
> This patch turns off the notes output for the raw format to
> avoid breaking such scripts.

And the second half would be something like the patch below implementing
--show-notes, so that things like "gitk" which can handle the new
feature can turn it on.

I'm not that happy with this patch, though. If we have --show-notes, we
should probably have --no-show-notes, which this doesn't do, since a
lack of --show-notes simply means "do whatever the format dictates".

Also, passing everything through a pretty_print_context seems kind of
hack-ish, as we just end up copying items from the rev-list context into
the pp_context. I did so here only in the log_tree_commit case. I don't
think there are other places which would want to propagate it, but I
might have missed one. I wonder if we would do better to simply past the
rev-list options into pretty_print_commit and let it pick what it wants
out of the struct.

Anyway, I am out of time to work on git for now, so maybe somebody who
cares more about notes can pick this up. I think the first patch (the
one I am replying to) should definitely go in to un-break Joey's case
(or an alternative patch that turns it off in even more cases), and
people who care about it can fight about whether and by what mechanism
things like gitk should see the notes.

-- >8 --
Subject: [PATCH] teach log family to --show-notes

Most log formats will implicitly show commit notes, but the
raw format will not. Callers can now explicitly call
--show-notes to enable them.

Signed-off-by: Jeff King <peff@peff.net>
---
 commit.h         |    1 +
 log-tree.c       |    1 +
 pretty.c         |    3 ++-
 revision.c       |    2 ++
 revision.h       |    1 +
 t/t3301-notes.sh |   16 ++++++++++++++++
 6 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/commit.h b/commit.h
index 24128d7..4646751 100644
--- a/commit.h
+++ b/commit.h
@@ -71,6 +71,7 @@ struct pretty_print_context
 	enum date_mode date_mode;
 	int need_8bit_cte;
 	struct reflog_walk_info *reflog_info;
+	int show_notes;
 };
 
 extern int has_non_ascii(const char *text);
diff --git a/log-tree.c b/log-tree.c
index 0fdf159..9155a31 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -412,6 +412,7 @@ void show_log(struct rev_info *opt)
 	ctx.abbrev = opt->diffopt.abbrev;
 	ctx.after_subject = extra_headers;
 	ctx.reflog_info = opt->reflog_info;
+	ctx.show_notes = opt->show_notes;
 	pretty_print_commit(opt->commit_format, commit, &msgbuf, &ctx);
 
 	if (opt->add_signoff)
diff --git a/pretty.c b/pretty.c
index 0674027..95fe39a 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1094,7 +1094,8 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
 	if (fmt == CMIT_FMT_EMAIL && sb->len <= beginning_of_body)
 		strbuf_addch(sb, '\n');
 
-	if (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW)
+	if (context->show_notes ||
+	    (fmt != CMIT_FMT_ONELINE && fmt != CMIT_FMT_RAW))
 		get_commit_notes(commit, sb, encoding,
 				 NOTES_SHOW_HEADER | NOTES_INDENT);
 
diff --git a/revision.c b/revision.c
index 7328201..3815dd3 100644
--- a/revision.c
+++ b/revision.c
@@ -1175,6 +1175,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
 		revs->verbose_header = 1;
 		get_commit_format("oneline", revs);
 		revs->abbrev_commit = 1;
+	} else if (!strcmp(arg, "--show-notes")) {
+		revs->show_notes = 1;
 	} else if (!strcmp(arg, "--graph")) {
 		revs->topo_order = 1;
 		revs->rewrite_parents = 1;
diff --git a/revision.h b/revision.h
index d368003..e51842f 100644
--- a/revision.h
+++ b/revision.h
@@ -83,6 +83,7 @@ struct rev_info {
 			abbrev_commit:1,
 			use_terminator:1,
 			missing_newline:1,
+			show_notes:1,
 			date_mode_explicit:1;
 	unsigned int	disable_stdin:1;
 
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 4c3de9d..d51e8bd 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -161,4 +161,20 @@ test_expect_success 'git log --pretty=raw does not show notes' '
 	test_cmp expect output
 '
 
+cat >>expect <<EOF
+
+Notes:
+    spam
+$whitespace
+    xyzzy
+$whitespace
+    foo
+    bar
+    baz
+EOF
+test_expect_success 'git log --show-notes' '
+	git log -1 --pretty=raw --show-notes >output &&
+	test_cmp expect output
+'
+
 test_done
-- 
1.6.6.510.g159cf

^ permalink raw reply related

* Re: git notes: notes
From: Jeff King @ 2010-01-20 21:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Michael J Gruber, Joey Hess, git
In-Reply-To: <7veilk1o3s.fsf@alter.siamese.dyndns.org>

On Wed, Jan 20, 2010 at 01:08:07PM -0800, Junio C Hamano wrote:

> > No, but outputting the note as part of the log is the standard. So for
> > example, when you do a format-patch | apply cycle, format-patch will
> > insert the note as part of the commit message, and apply will *store*
> > the note text (including Note:\n) as part of the commit message of the
> > new commit.
> 
> Thanks; that was the kind of breakage report I was looking for (and wished
> to have heard a lot earlier).  Personally I find it is unexcusable that
> format-patch defaults to giving notes.

I agree. I noticed this while doing the "don't show in raw" feature
elsewhere in the thread and wanted to ask: which formats _should_ have
notes by default?

To be honest, I am not sure _any_ format should have it by default. If I
am running "git log" and my notes are filled with random automatically
generated bisection cruft, I don't want to see that cluttering my
output. Yes, all of our test notes are human-written annotations, but I
think we really don't know yet what sorts of things people will be
putting in them.

Long ago I proposed a set of notes namespaces to deal with this (so
automatic bisection cruft would go into its own notes namespace, and
human-readable ones would be in some default namespace), but I don't
know how much of that idea (if any) survived into the current
implementation.

> > I'm not complaining, I actually have this on a maybe-to-do list, but the
> > way the series went kept me from investing time.
> 
> Hmm, that hints there is a failure in the review and merge process.  Care
> to explain how we could have done better please?

Personally, I stopped paying attention simply because it was gigantic
and I am not all that interested in using the feature personally.

-Peff

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox