* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
@ 2010-11-09 20:11 ` Ævar Arnfjörð Bjarmason
2010-11-09 20:19 ` Matthieu Moy
` (8 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-11-09 20:11 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Tue, Nov 9, 2010 at 20:53, Junio C Hamano <gitster@pobox.com> wrote:
> * ab/i18n (2010-10-07) 161 commits
> - po/de.po: complete German translation
> - po/sv.po: add Swedish translation
> - gettextize: git-bisect bisect_next_check "You need to" message
> - gettextize: git-bisect [Y/n] messages
> - gettextize: git-bisect bisect_replay + $1 messages
> - gettextize: git-bisect bisect_reset + $1 messages
> - gettextize: git-bisect bisect_run + $@ messages
> - gettextize: git-bisect die + eval_gettext messages
> - gettextize: git-bisect die + gettext messages
> - gettextize: git-bisect echo + eval_gettext message
> - gettextize: git-bisect echo + gettext messages
> - gettextize: git-bisect gettext + echo message
> - gettextize: git-bisect add git-sh-i18n
> - gettextize: git-stash drop_stash say/die messages
> - gettextize: git-stash "unknown option" message
> - gettextize: git-stash die + eval_gettext $1 messages
> - gettextize: git-stash die + eval_gettext $* messages
> - gettextize: git-stash die + eval_gettext messages
> - gettextize: git-stash die + gettext messages
> - gettextize: git-stash say + gettext messages
> - gettextize: git-stash echo + gettext message
> - gettextize: git-stash add git-sh-i18n
> - gettextize: git-submodule "blob" and "submodule" messages
> - gettextize: git-submodule "path not initialized" message
> - gettextize: git-submodule "[...] path is ignored" message
> - gettextize: git-submodule "Entering [...]" message
> - gettextize: git-submodule $errmsg messages
> - gettextize: git-submodule "Submodule change[...]" messages
> - gettextize: git-submodule "cached cannot be used" message
> - gettextize: git-submodule $update_module say + die messages
> - gettextize: git-submodule die + eval_gettext messages
> - gettextize: git-submodule say + eval_gettext messages
> - gettextize: git-submodule echo + eval_gettext messages
> - gettextize: git-submodule add git-sh-i18n
> - gettextize: git-pull "rebase against" / "merge with" messages
> - gettextize: git-pull "[...] not currently on a branch" message
> - gettextize: git-pull "You asked to pull" message
> - gettextize: git-pull split up "no candidate" message
> - gettextize: git-pull eval_gettext + warning message
> - gettextize: git-pull eval_gettext + die message
> - gettextize: git-pull die messages
> - gettextize: git-pull add git-sh-i18n
> - gettext docs: add "Testing marked strings" section to po/README
> - gettext docs: the Git::I18N Perl interface
> - gettext docs: the git-sh-i18n.sh Shell interface
> - gettext docs: the gettext.h C interface
> - gettext docs: add "Marking strings for translation" section in po/README
> - gettext docs: add a "Testing your changes" section to po/README
> - po/pl.po: add Polish translation
> - po/hi.po: add Hindi Translation
> - po/en_GB.po: add British English translation
> - po/de.po: add German translation
> - Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
> - gettext docs: add po/README file documenting Git's gettext
> - gettextize: git-am printf(1) message to eval_gettext
> - gettextize: git-am core say messages
> - gettextize: git-am "Apply?" message
> - gettextize: git-am clean_abort messages
> - gettextize: git-am cannot_fallback messages
> - gettextize: git-am die messages
> - gettextize: git-am eval_gettext messages
> - gettextize: git-am multi-line getttext $msg; echo
> - gettextize: git-am one-line gettext $msg; echo
> - gettextize: git-am add git-sh-i18n
> - gettext tests: add GETTEXT_POISON tests for shell scripts
> - gettext tests: add GETTEXT_POISON support for shell scripts
> - Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
> - Makefile: add GNU_GETTEXT, set when we expect GNU gettext
> - gettextize: git-shortlog basic messages
> - gettextize: git-revert split up "could not revert/apply" message
> - gettextize: git-revert literal "me" messages
> - gettextize: git-revert "Your local changes" message
> - gettextize: git-revert basic messages
> - gettextize: git-notes "Refusing to %s notes in %s" message
> - gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
> - gettextize: git-notes basic commands
> - gettextize: git-gc "Auto packing the repository" message
> - gettextize: git-gc basic messages
> - gettextize: git-describe basic messages
> - gettextize: git-clean clean.requireForce messages
> - gettextize: git-clean basic messages
> - gettextize: git-bundle basic messages
> - gettextize: git-archive basic messages
> - gettextize: git-status "renamed: " message
> - gettextize: git-status "Initial commit" message
> - gettextize: git-status "Changes to be committed" message
> - gettextize: git-status shortstatus messages
> - gettextize: git-status "nothing to commit" messages
> - gettextize: git-status basic messages
> - gettextize: git-push "prevent you from losing" message
> - gettextize: git-push basic messages
> - gettextize: git-tag tag_template message
> - gettextize: git-tag basic messages
> - gettextize: git-reset "Unstaged changes after reset" message
> - gettextize: git-reset reset_type_names messages
> - gettextize: git-reset basic messages
> - gettextize: git-rm basic messages
> - gettextize: git-mv "bad" messages
> - gettextize: git-mv basic messages
> - gettextize: git-merge "Wonderful" message
> - gettextize: git-merge "You have not concluded your merge" messages
> - gettextize: git-merge "Updating %s..%s" message
> - gettextize: git-merge basic messages
> - gettextize: git-log "--OPT does not make sense" messages
> - gettextize: git-log basic messages
> - gettextize: git-grep "--open-files-in-pager" message
> - gettextize: git-grep basic messages
> - gettextize: git-fetch split up "(non-fast-forward)" message
> - gettextize: git-fetch update_local_ref messages
> - gettextize: git-fetch formatting messages
> - gettextize: git-fetch basic messages
> - gettextize: git-diff basic messages
> - gettextize: git-commit advice messages
> - gettextize: git-commit "enter the commit message" message
> - gettextize: git-commit print_summary messages
> - gettextize: git-commit formatting messages
> - gettextize: git-commit "middle of a merge" message
> - gettextize: git-commit basic messages
> - gettextize: git-checkout "Switched to a .. branch" message
> - gettextize: git-checkout "HEAD is now at" message
> - gettextize: git-checkout describe_detached_head messages
> - gettextize: git-checkout: our/their version message
> - gettextize: git-checkout basic messages
> - gettextize: git-branch "(no branch)" message
> - gettextize: git-branch "git branch -v" messages
> - gettextize: git-branch "Deleted branch [...]" message
> - gettextize: git-branch "remote branch '%s' not found" message
> - gettextize: git-branch basic messages
> - gettextize: git-add refresh_index message
> - gettextize: git-add "remove '%s'" message
> - gettextize: git-add "pathspec [...] did not match" message
> - gettextize: git-add "Use -f if you really want" message
> - gettextize: git-add "no files added" message
> - gettextize: git-add basic messages
> - gettextize: git-clone "Cloning into" message
> - gettextize: git-clone basic messages
> - gettext tests: test message re-encoding under C
> - po/is.po: add Icelandic translation
> - gettext tests: mark a test message as not needing translation
> - gettext tests: test re-encoding with a UTF-8 msgid under Shell
> - gettext tests: test message re-encoding under Shell
> - gettext tests: add detection for is_IS.ISO-8859-1 locale
> - gettext tests: test if $VERSION exists before using it
> - gettextize: git-init "Initialized [...] repository" message
> - gettextize: git-init basic messages
> - gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
> - gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
> - gettext.c: use libcharset.h instead of langinfo.h when available
> - gettext.c: work around us not using setlocale(LC_CTYPE, "")
> - builtin.h: Include gettext.h
> - Makefile: use variables and shorter lines for xgettext
> - Makefile: tell xgettext(1) that our source is in UTF-8
> - Makefile: provide a --msgid-bugs-address to xgettext(1)
> - Makefile: A variable for options used by xgettext(1) calls
> - gettext tests: locate i18n lib&data correctly under --valgrind
> - gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
> - gettext tests: rename test to work around GNU gettext bug
> - gettext: add infrastructure for translating Git with gettext
> - builtin: use builtin.h for all builtin commands
> - tests: use test_cmp instead of piping to diff(1)
> - t7004-tag.sh: re-arrange git tag comment for clarity
>
> Will merge to 'next' to see what happens; it is getting ridiculously
> painful to keep re-resolving the conflicts with other topics in flight,
> even with the help with rerere.
I'll supply some stuff on top of it. Like git-sh-i18n--envsubst soon.
Not essential, since next can be rewound. But useful and less buggier.
And thanks. Getting out out of the "pu" purgatory will be nice :)
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
2010-11-09 20:11 ` Ævar Arnfjörð Bjarmason
@ 2010-11-09 20:19 ` Matthieu Moy
2010-11-09 20:29 ` Drew Northup
2010-11-09 20:38 ` Jonathan Nieder
` (7 subsequent siblings)
9 siblings, 1 reply; 26+ messages in thread
From: Matthieu Moy @ 2010-11-09 20:19 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> * mm/phrase-remote-tracking (2010-11-02) 10 commits
> - git-branch.txt: mention --set-upstream as a way to change upstream configuration
> - user-manual: remote-tracking can be checked out, with detached HEAD
> - user-manual.txt: explain better the remote(-tracking) branch terms
> - Change incorrect "remote branch" to "remote tracking branch" in C code
> - Change incorrect uses of "remote branch" meaning "remote-tracking"
> - Change "tracking branch" to "remote-tracking branch"
> - everyday.txt: change "tracking branch" to "remote-tracking branch"
> - Change remote tracking to remote-tracking in non-trivial places
> - Replace "remote tracking" with "remote-tracking"
> - Better "Changed but not updated" message in git-status
>
> Is everybody happy with this round? I'd prefer to merge it to 'next' or
> even 'master' and have further polishing be done, if necessary,
> in-tree.
The version in pu is the right one (I have to admin I did not make the
task easy ;-), thanks. I didn't get comment for a while, so I guess
it's OK for next, or master if you want.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 20:19 ` Matthieu Moy
@ 2010-11-09 20:29 ` Drew Northup
0 siblings, 0 replies; 26+ messages in thread
From: Drew Northup @ 2010-11-09 20:29 UTC (permalink / raw
To: Matthieu Moy; +Cc: Junio C Hamano, git
On Tue, 2010-11-09 at 21:19 +0100, Matthieu Moy wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > * mm/phrase-remote-tracking (2010-11-02) 10 commits
> > - git-branch.txt: mention --set-upstream as a way to change upstream configuration
> > - user-manual: remote-tracking can be checked out, with detached HEAD
> > - user-manual.txt: explain better the remote(-tracking) branch terms
> > - Change incorrect "remote branch" to "remote tracking branch" in C code
> > - Change incorrect uses of "remote branch" meaning "remote-tracking"
> > - Change "tracking branch" to "remote-tracking branch"
> > - everyday.txt: change "tracking branch" to "remote-tracking branch"
> > - Change remote tracking to remote-tracking in non-trivial places
> > - Replace "remote tracking" with "remote-tracking"
> > - Better "Changed but not updated" message in git-status
> >
> > Is everybody happy with this round? I'd prefer to merge it to 'next' or
> > even 'master' and have further polishing be done, if necessary,
> > in-tree.
>
> The version in pu is the right one (I have to admin I did not make the
> task easy ;-), thanks. I didn't get comment for a while, so I guess
> it's OK for next, or master if you want.
I'm happy-enough with them. If I'm going to complain I can offer up
patches and let people fight over those. ;-)
--
-Drew Northup N1XIM
AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
2010-11-09 20:11 ` Ævar Arnfjörð Bjarmason
2010-11-09 20:19 ` Matthieu Moy
@ 2010-11-09 20:38 ` Jonathan Nieder
2010-11-09 21:38 ` Jakub Narebski
` (6 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Jonathan Nieder @ 2010-11-09 20:38 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> * jn/cherry-pick-refresh-index (2010-10-31) 1 commit
> - cherry-pick/revert: transparently refresh index
>
> Looked Ok; will merge to 'next' soonish.
Thanks for fixing up the tests. (There's a missing && after
"git clone . copy", but until a checker lands to make sure the
&&s stay, I find it hard to be too worried.)
> * jn/parse-options-extra (2010-10-24) 4 commits
> - update-index: migrate to parse-options API
> - setup: save prefix (original cwd relative to toplevel) in startup_info
> - parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
> - parse-options: allow git commands to invent new option types
>
> Looked Ok; will merge to 'next' soonish.
I'd like to clean this up along the lines Stephen suggested soon.
> * mm/phrase-remote-tracking (2010-11-02) 10 commits
[...]
> Is everybody happy with this round?
Yes, at least I am.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (2 preceding siblings ...)
2010-11-09 20:38 ` Jonathan Nieder
@ 2010-11-09 21:38 ` Jakub Narebski
2010-11-11 17:21 ` Junio C Hamano
2010-11-09 21:46 ` Johan Herland
` (5 subsequent siblings)
9 siblings, 1 reply; 26+ messages in thread
From: Jakub Narebski @ 2010-11-09 21:38 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> 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.
> * tr/config-doc (2010-10-24) 2 commits
> . Documentation: complete config list from other manpages
> . Documentation: Move variables from config.txt to separate file
>
> This unfortunately heavily conflicts with patches in flight...
The first patch in series is trivial to re-create: just put
description of variables into separate file, and replace it with
include. Probably could even be scripted.
Which version of "complete config list" script did you pick? There
was some unresolved discussion about how best to proceed (following
versus not-following includes, limiting to "Config.*" sections, etc.)
BTW., IMHO not following includes would be better solution.
> * jh/gitweb-caching (2010-11-01) 4 commits
> - gitweb: Minimal testing of gitweb caching
> - gitweb: File based caching layer (from git.kernel.org)
> - gitweb: add output buffering and associated functions
> - gitweb: Prepare for splitting gitweb
> (this branch uses jn/gitweb-test.)
> * jn/gitweb-test (2010-09-26) 4 commits
> (merged to 'next' on 2010-11-05 at 90b3adf)
> + gitweb/Makefile: Include gitweb/config.mak
> + gitweb/Makefile: Add 'test' and 'test-installed' targets
> + t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
> + gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
> (this branch is used by jh/gitweb-caching.)
These two branches have simple to resolve but non-trivial conflict.
Should I rebase 'jh/gitweb-caching' on top of 'jn/gitweb-test' then,
resolving this conflict?
BTW. this would allow me to improve 'gitweb: Minimal testing of gitweb
caching'.
> * yd/dir-rename (2010-10-29) 5 commits
> - Allow hiding renames of individual files involved in a directory rename.
> - Unified diff output format for bulk moves.
> - Add testcases for the --detect-bulk-moves diffcore flag.
> - Raw diff output format for bulk moves.
> - Introduce bulk-move detection in diffcore.
Very interesting!
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 21:38 ` Jakub Narebski
@ 2010-11-11 17:21 ` Junio C Hamano
2010-11-11 23:53 ` Jakub Narebski
0 siblings, 1 reply; 26+ messages in thread
From: Junio C Hamano @ 2010-11-11 17:21 UTC (permalink / raw
To: Jakub Narebski; +Cc: git
Jakub Narebski <jnareb@gmail.com> writes:
> Junio C Hamano <gitster@pobox.com> writes:
> ...
>> * jh/gitweb-caching (2010-11-01) 4 commits
>> - gitweb: Minimal testing of gitweb caching
>> - gitweb: File based caching layer (from git.kernel.org)
>> - gitweb: add output buffering and associated functions
>> - gitweb: Prepare for splitting gitweb
>> (this branch uses jn/gitweb-test.)
>
>> * jn/gitweb-test (2010-09-26) 4 commits
>> (merged to 'next' on 2010-11-05 at 90b3adf)
>> + gitweb/Makefile: Include gitweb/config.mak
>> + gitweb/Makefile: Add 'test' and 'test-installed' targets
>> + t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
>> + gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
>> (this branch is used by jh/gitweb-caching.)
>
> These two branches have simple to resolve but non-trivial conflict.
> Should I rebase 'jh/gitweb-caching' on top of 'jn/gitweb-test' then,
> resolving this conflict?
In general, when a conflict between topic A and B is simple to resolve
(and I have the correct resolution already in 'pu'), I'd rather prefer to
keep topic A independent of topic B than rebasing topic A on top of topic
B, unless topic A is far from ready and topic B is truly ready and about
to graduate, so that we can leave a door open for A to graduate before B
does (or vice versa).
In this case, I think it is overdue (iow, sorry I've been slow) for the
gitweb-test topic to graduate, so the separation does not really matter.
> BTW. this would allow me to improve 'gitweb: Minimal testing of gitweb
> caching'.
Then I probably should leave gitweb-caching out of 'next' when gitweb-test
graduates to master so that you can refresh the caching series. Thanks
for a heads-up.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-11 17:21 ` Junio C Hamano
@ 2010-11-11 23:53 ` Jakub Narebski
0 siblings, 0 replies; 26+ messages in thread
From: Jakub Narebski @ 2010-11-11 23:53 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Thu, 11 Nov 2010, Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>> Junio C Hamano <gitster@pobox.com> writes:
>> ...
>>> * jh/gitweb-caching (2010-11-01) 4 commits
>>> - gitweb: Minimal testing of gitweb caching
>>> - gitweb: File based caching layer (from git.kernel.org)
>>> - gitweb: add output buffering and associated functions
>>> - gitweb: Prepare for splitting gitweb
>>> (this branch uses jn/gitweb-test.)
>>
>>> * jn/gitweb-test (2010-09-26) 4 commits
>>> (merged to 'next' on 2010-11-05 at 90b3adf)
>>> + gitweb/Makefile: Include gitweb/config.mak
>>> + gitweb/Makefile: Add 'test' and 'test-installed' targets
>>> + t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
>>> + gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
>>> (this branch is used by jh/gitweb-caching.)
>>
>> These two branches have simple to resolve but non-trivial conflict.
>> Should I rebase 'jh/gitweb-caching' on top of 'jn/gitweb-test' then,
>> resolving this conflict?
>
> In general, when a conflict between topic A and B is simple to resolve
> (and I have the correct resolution already in 'pu'), I'd rather prefer to
> keep topic A independent of topic B than rebasing topic A on top of topic
> B, unless topic A is far from ready and topic B is truly ready and about
> to graduate, so that we can leave a door open for A to graduate before B
> does (or vice versa).
>
> In this case, I think it is overdue (iow, sorry I've been slow) for the
> gitweb-test topic to graduate, so the separation does not really matter.
I have send version of 'gitweb: Prepare for splitting gitweb' that applies
cleanly on top of "gitweb/Makefile: Add 'test' and 'test-installed' targets"
as
"[PATCHv7.1b 1/4] gitweb: Prepare for splitting gitweb"
http://article.gmane.org/gmane.comp.version-control.git/160492
But you probably don't have this in 'pu'.
Resolving of conflict is straighforward, but non-trivial, and consist
of two parts:
* textual conflict caused by adding extra stuff in place where
context is - simple to resolve
* adding support for testing installed version of modules, in the
future if/when we add tests of individual modules (I use this in
my rewrite of gitweb caching) - non-trivial
>> BTW. this would allow me to improve 'gitweb: Minimal testing of gitweb
>> caching'.
>
> Then I probably should leave gitweb-caching out of 'next' when gitweb-test
> graduates to master so that you can refresh the caching series. Thanks
> for a heads-up.
In short: code responsible for turning caching on was duplicated in t9500
and t9502 (will be moved to t/gitweb-lib.sh), and code path with die_error
(e.g. 404 not found case) was not tested.
I'll try to send re-roll (rebased and improved) tomorrow (on Friday).
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (3 preceding siblings ...)
2010-11-09 21:38 ` Jakub Narebski
@ 2010-11-09 21:46 ` Johan Herland
2010-11-09 22:11 ` Jeff King
` (4 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Johan Herland @ 2010-11-09 21:46 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Tuesday 09 November 2010, Junio C Hamano wrote:
> * jh/notes-merge (2010-10-29) 25 commits
> [...]
>
> Still in flux?
I don't think so. At least nothing has changed in the last week.
Will send another (final, I hope) iteration with your minor style issues fix
and portability fix folded in.
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (4 preceding siblings ...)
2010-11-09 21:46 ` Johan Herland
@ 2010-11-09 22:11 ` Jeff King
2010-11-09 22:17 ` Erik Faye-Lund
` (3 subsequent siblings)
9 siblings, 0 replies; 26+ messages in thread
From: Jeff King @ 2010-11-09 22:11 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Tue, Nov 09, 2010 at 11:53:19AM -0800, Junio C Hamano wrote:
> * jk/tag-contains (2010-07-05) 4 commits
> - Why is "git tag --contains" so slow?
> - default core.clockskew variable to one day
> - limit "contains" traversals based on commit timestamp
> - tag: speed up --contains calculation
>
> The idea of the bottom one is probably Ok, except that the use of object
> flags needs to be rethought, or at least the helper needs to be moved to
> builtin/tag.c to make it clear that it should not be used outside the
> current usage context.
This, btw, is still on my todo list. I got pleasing performance results
using a notes tree to store a list of commits with bogus timestamps, so
I need to clean that up and submit. I think that may spin off into its
own topic entirely, as it is about handling clock skew better
everywhere, not just in the newly introduced "tag --contains" code.
I'm also still trying to figure out if there is a way to avoid the
depth-first search of the "tag --contains" patch. It can have worse
performance in a few corner cases than the merge-base approach (i.e., we
end up going to the roots sometimes when we make an unlucky depth-first
traversal). Though with the commit-time optimization (which depends on
sane skew handling from above), that goes away, so maybe it is not worth
caring too much.
-Peff
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (5 preceding siblings ...)
2010-11-09 22:11 ` Jeff King
@ 2010-11-09 22:17 ` Erik Faye-Lund
2010-11-09 22:21 ` Ævar Arnfjörð Bjarmason
2010-11-10 20:35 ` Yann Dirson
2010-11-11 12:26 ` Nguyen Thai Ngoc Duy
` (2 subsequent siblings)
9 siblings, 2 replies; 26+ messages in thread
From: Erik Faye-Lund @ 2010-11-09 22:17 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Tue, Nov 9, 2010 at 8:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 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.
>
> --------------------------------------------------
> [New Topics]
>
> * dk/maint-blame-el (2010-05-25) 1 commit
> (merged to 'next' on 2010-11-05 at 8456c66)
> + git-blame.el: Add (require 'format-spec)
>
> * ef/mingw-daemon (2010-11-04) 16 commits
> - daemon: opt-out on features that require posix
> - daemon: make --inetd and --detach incompatible
> - daemon: use socklen_t
> - mingw: use poll-emulation from gnulib
> - mingw: import poll-emulation from gnulib
> - daemon: get remote host address from root-process
> - Improve the mingw getaddrinfo stub to handle more use cases
> - daemon: use full buffered mode for stderr
> - daemon: use run-command api for async serving
> - mingw: add kill emulation
> - mingw: support waitpid with pid > 0 and WNOHANG
> - mingw: use real pid
> - inet_ntop: fix a couple of old-style decls
> - compat: add inet_pton and inet_ntop prototypes
> - mingw: implement syslog
> - mingw: add network-wrappers for daemon
>
> Will merge to 'next'.
Thanks.
On Tue, Nov 9, 2010 at 8:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
> * yd/dir-rename (2010-10-29) 5 commits
> - Allow hiding renames of individual files involved in a directory rename.
> - Unified diff output format for bulk moves.
> - Add testcases for the --detect-bulk-moves diffcore flag.
> - Raw diff output format for bulk moves.
> - Introduce bulk-move detection in diffcore.
>
This series currently breaks the Windows build of 'pu', as we lack
memrchr there. Jonathan Nieder posted a patch
(<20101015051750.GA21830@burratino>) that adds a memrchr
implementation. This should probably either be rebased on top of that
patch, or re-rolled.
While 'pu' not building on Windows might not be a big deal, it's worth
keeping in mind before merging it further.
> * ab/i18n (2010-10-07) 161 commits
> - po/de.po: complete German translation
> - po/sv.po: add Swedish translation
> - gettextize: git-bisect bisect_next_check "You need to" message
<...>
> - tests: use test_cmp instead of piping to diff(1)
> - t7004-tag.sh: re-arrange git tag comment for clarity
>
> Will merge to 'next' to see what happens; it is getting ridiculously
> painful to keep re-resolving the conflicts with other topics in flight,
> even with the help with rerere.
Hmmm, this is a bit more annoying IMO - this currently breaks in
msysgit, due to lack of gettext and NO_GETTEXT not working properly.
Ævar is aware of this
(AANLkTiny+NmXew6UxjNMO+o75=CxxWm9iVRMRxs0LyTJ@mail.gmail.com), but
haven't fixed it yet. I do have the patches needed to get a gettext in
msysgit, so it's not a very big deal to me. But are you sure that this
makes this series ready for 'next'?
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 22:17 ` Erik Faye-Lund
@ 2010-11-09 22:21 ` Ævar Arnfjörð Bjarmason
2010-11-09 22:25 ` Erik Faye-Lund
2010-11-10 20:35 ` Yann Dirson
1 sibling, 1 reply; 26+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-11-09 22:21 UTC (permalink / raw
To: kusmabite; +Cc: Junio C Hamano, git
On Tue, Nov 9, 2010 at 23:17, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Tue, Nov 9, 2010 at 8:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> * ab/i18n (2010-10-07) 161 commits
>> - po/de.po: complete German translation
>> - po/sv.po: add Swedish translation
>> - gettextize: git-bisect bisect_next_check "You need to" message
> <...>
>> - tests: use test_cmp instead of piping to diff(1)
>> - t7004-tag.sh: re-arrange git tag comment for clarity
>>
>> Will merge to 'next' to see what happens; it is getting ridiculously
>> painful to keep re-resolving the conflicts with other topics in flight,
>> even with the help with rerere.
>
> Hmmm, this is a bit more annoying IMO - this currently breaks in
> msysgit, due to lack of gettext and NO_GETTEXT not working properly.
> Ævar is aware of this
> (AANLkTiny+NmXew6UxjNMO+o75=CxxWm9iVRMRxs0LyTJ@mail.gmail.com), but
> haven't fixed it yet. I do have the patches needed to get a gettext in
> msysgit, so it's not a very big deal to me. But are you sure that this
> makes this series ready for 'next'?
I hear ya. I'm hoping to get around to fixing all this stuff before it
lands in "next".
Also going to look at your gettext patches to see if there's anything
there that needs
to be made part of the series.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 22:21 ` Ævar Arnfjörð Bjarmason
@ 2010-11-09 22:25 ` Erik Faye-Lund
2010-11-09 22:27 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 26+ messages in thread
From: Erik Faye-Lund @ 2010-11-09 22:25 UTC (permalink / raw
To: Ævar Arnfjörð Bjarmason; +Cc: Junio C Hamano, git
On Tue, Nov 9, 2010 at 11:21 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> On Tue, Nov 9, 2010 at 23:17, Erik Faye-Lund <kusmabite@gmail.com> wrote:
>> On Tue, Nov 9, 2010 at 8:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> * ab/i18n (2010-10-07) 161 commits
>>> - po/de.po: complete German translation
>>> - po/sv.po: add Swedish translation
>>> - gettextize: git-bisect bisect_next_check "You need to" message
>> <...>
>>> - tests: use test_cmp instead of piping to diff(1)
>>> - t7004-tag.sh: re-arrange git tag comment for clarity
>>>
>>> Will merge to 'next' to see what happens; it is getting ridiculously
>>> painful to keep re-resolving the conflicts with other topics in flight,
>>> even with the help with rerere.
>>
>> Hmmm, this is a bit more annoying IMO - this currently breaks in
>> msysgit, due to lack of gettext and NO_GETTEXT not working properly.
>> Ævar is aware of this
>> (AANLkTiny+NmXew6UxjNMO+o75=CxxWm9iVRMRxs0LyTJ@mail.gmail.com), but
>> haven't fixed it yet. I do have the patches needed to get a gettext in
>> msysgit, so it's not a very big deal to me. But are you sure that this
>> makes this series ready for 'next'?
>
> I hear ya. I'm hoping to get around to fixing all this stuff before it
> lands in "next".
>
Good to hear :)
> Also going to look at your gettext patches to see if there's anything
> there that needs
> to be made part of the series.
>
My "gettext-patches" are patches for msysgit (the development
environment used to build Git for Windows) to build and install
gettext. They're not patches against git.git, so I doubt they are
useful to outside of msysgit.git.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 22:25 ` Erik Faye-Lund
@ 2010-11-09 22:27 ` Ævar Arnfjörð Bjarmason
0 siblings, 0 replies; 26+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-11-09 22:27 UTC (permalink / raw
To: kusmabite; +Cc: Junio C Hamano, git
On Tue, Nov 9, 2010 at 23:25, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Tue, Nov 9, 2010 at 11:21 PM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> On Tue, Nov 9, 2010 at 23:17, Erik Faye-Lund <kusmabite@gmail.com> wrote:
>>> Hmmm, this is a bit more annoying IMO - this currently breaks in
>>> msysgit, due to lack of gettext and NO_GETTEXT not working properly.
>>> Ævar is aware of this
>>> (AANLkTiny+NmXew6UxjNMO+o75=CxxWm9iVRMRxs0LyTJ@mail.gmail.com), but
>>> haven't fixed it yet. I do have the patches needed to get a gettext in
>>> msysgit, so it's not a very big deal to me. But are you sure that this
>>> makes this series ready for 'next'?
>>
>> I hear ya. I'm hoping to get around to fixing all this stuff before it
>> lands in "next".
>>
>
> Good to hear :)
>
>> Also going to look at your gettext patches to see if there's anything
>> there that needs
>> to be made part of the series.
>>
>
> My "gettext-patches" are patches for msysgit (the development
> environment used to build Git for Windows) to build and install
> gettext. They're not patches against git.git, so I doubt they are
> useful to outside of msysgit.git.
Right, I hadn't looked at them. Thanks for that clarification.
And thanks for working on building gettext on msysgit. That will be
very useful later on.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 22:17 ` Erik Faye-Lund
2010-11-09 22:21 ` Ævar Arnfjörð Bjarmason
@ 2010-11-10 20:35 ` Yann Dirson
1 sibling, 0 replies; 26+ messages in thread
From: Yann Dirson @ 2010-11-10 20:35 UTC (permalink / raw
To: Erik Faye-Lund; +Cc: Junio C Hamano, git
On Tue, Nov 09, 2010 at 11:17:07PM +0100, Erik Faye-Lund wrote:
> On Tue, Nov 9, 2010 at 8:53 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > * yd/dir-rename (2010-10-29) 5 commits
> > - Allow hiding renames of individual files involved in a directory rename.
> > - Unified diff output format for bulk moves.
> > - Add testcases for the --detect-bulk-moves diffcore flag.
> > - Raw diff output format for bulk moves.
> > - Introduce bulk-move detection in diffcore.
> >
>
> This series currently breaks the Windows build of 'pu', as we lack
> memrchr there. Jonathan Nieder posted a patch
> (<20101015051750.GA21830@burratino>) that adds a memrchr
> implementation. This should probably either be rebased on top of that
> patch, or re-rolled.
>
> While 'pu' not building on Windows might not be a big deal, it's worth
> keeping in mind before merging it further.
If you plan to re-roll the series as it is, you may want to consider
the latest update to the 1st patch in the series. I had not resent
the whole series just for that.
http://marc.info/?l=git&m=128890797304674
OTOH, you may want to wait for the next iteration, which should be
ready by the end of the week.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (6 preceding siblings ...)
2010-11-09 22:17 ` Erik Faye-Lund
@ 2010-11-11 12:26 ` Nguyen Thai Ngoc Duy
2010-11-11 14:28 ` Nguyen Thai Ngoc Duy
2010-11-14 13:02 ` [PATCH] use persistent memory for rejected paths Clemens Buchacher
9 siblings, 0 replies; 26+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2010-11-11 12:26 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Wed, Nov 10, 2010 at 2:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
> * nd/struct-pathspec (2010-09-20) 5 commits
> - ce_path_match: drop prefix matching in favor of match_pathspec
> - Convert ce_path_match() to use struct pathspec
> - tree_entry_interesting: turn to match_pathspec if wildcard is present
> - pathspec: add tree_recursive_diff parameter
> - pathspec: mark wildcard pathspecs from the beginning
> (this branch uses en/object-list-with-pathspec.)
>
> This is related to something I have long been wanting to see happen. Will
> give it another look and merge to 'next'.
I have another tree_entry_interesting() impl that does wildcard
matching without match_pathspec(). I need to test a bit more before
sending it out.
--
Duy
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: What's cooking in git.git (Nov 2010, #01; Tue, 9)
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (7 preceding siblings ...)
2010-11-11 12:26 ` Nguyen Thai Ngoc Duy
@ 2010-11-11 14:28 ` Nguyen Thai Ngoc Duy
2010-11-14 13:02 ` [PATCH] use persistent memory for rejected paths Clemens Buchacher
9 siblings, 0 replies; 26+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2010-11-11 14:28 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
On Wed, Nov 10, 2010 at 2:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
> 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.
Can you revert the patch order in each topic? I find it easier to read
from the oldest summary line to the latest one, then your comments,
than the other way around.
--
Duy
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] use persistent memory for rejected paths
2010-11-09 19:53 What's cooking in git.git (Nov 2010, #01; Tue, 9) Junio C Hamano
` (8 preceding siblings ...)
2010-11-11 14:28 ` Nguyen Thai Ngoc Duy
@ 2010-11-14 13:02 ` Clemens Buchacher
2010-11-15 18:31 ` Junio C Hamano
2010-11-15 19:03 ` Matthieu Moy
9 siblings, 2 replies; 26+ messages in thread
From: Clemens Buchacher @ 2010-11-14 13:02 UTC (permalink / raw
To: Junio C Hamano; +Cc: git
An aborted merge prints the list of rejected paths as part of the
error message. Some of those paths do not have static buffers, so
we have to keep a copy. Use string_list's to accomplish this.
Previous to this fix, the error message would print whatever was
stored in the stack at that point.
With this change, the path list is printed in the order of
processing. Previously, the order was reversed.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
On Tue, Nov 09, 2010 at 11:53:19AM -0800, Junio C Hamano wrote:
>
> * cb/leading-path-removal (2010-10-09) 5 commits
> (merged to 'next' on 2010-11-05 at 55ea322)
The fix (and the bug) depend on the above changes in next.
Clemens
t/t7607-merge-overwrite.sh | 19 ++++++++++++++++---
t/t7609-merge-co-error-msgs.sh | 16 ++++++++--------
unpack-trees.c | 36 +++++++++++-------------------------
unpack-trees.h | 4 +++-
4 files changed, 38 insertions(+), 37 deletions(-)
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index e49dd80..9137866 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -15,7 +15,9 @@ test_expect_success 'setup' '
git reset --hard c0 &&
mkdir sub &&
echo "sub/f" > sub/f &&
- git add sub/f &&
+ mkdir sub2 &&
+ echo "sub2/f" > sub2/f &&
+ git add sub/f sub2/f &&
git commit -m sub &&
git tag sub &&
echo "VERY IMPORTANT CHANGES" > important
@@ -100,13 +102,24 @@ test_expect_success 'will not overwrite untracked subtree' '
test_cmp important sub/f/important
'
+cat >expect <<\EOF
+error: The following untracked working tree files would be overwritten by merge:
+ sub
+ sub2
+Please move or remove them before you can merge.
+EOF
+
test_expect_success 'will not overwrite untracked file in leading path' '
git reset --hard c0 &&
rm -rf sub &&
cp important sub &&
- test_must_fail git merge sub &&
+ cp important sub2 &&
+ test_must_fail git merge sub 2>out &&
+ test_cmp out expect &&
test_path_is_missing .git/MERGE_HEAD &&
- test_cmp important sub
+ test_cmp important sub &&
+ test_cmp important sub2 &&
+ rm -f sub sub2
'
test_expect_failure SYMLINKS 'will not overwrite untracked symlink in leading path' '
diff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh
index 114d2bd..c994836 100755
--- a/t/t7609-merge-co-error-msgs.sh
+++ b/t/t7609-merge-co-error-msgs.sh
@@ -27,10 +27,10 @@ test_expect_success 'setup' '
cat >expect <<\EOF
error: The following untracked working tree files would be overwritten by merge:
- two
- three
- four
five
+ four
+ three
+ two
Please move or remove them before you can merge.
EOF
@@ -49,9 +49,9 @@ test_expect_success 'untracked files overwritten by merge (fast and non-fast for
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by merge:
- two
- three
four
+ three
+ two
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
five
@@ -68,8 +68,8 @@ test_expect_success 'untracked files or local changes ovewritten by merge' '
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by checkout:
- rep/two
rep/one
+ rep/two
Please, commit your changes or stash them before you can switch branches.
EOF
@@ -89,8 +89,8 @@ test_expect_success 'cannot switch branches because of local changes' '
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by checkout:
- rep/two
rep/one
+ rep/two
Please, commit your changes or stash them before you can switch branches.
EOF
@@ -102,8 +102,8 @@ test_expect_success 'not uptodate file porcelain checkout error' '
cat >expect <<\EOF
error: Updating the following directories would lose untracked files in it:
- rep2
rep
+ rep2
EOF
diff --git a/unpack-trees.c b/unpack-trees.c
index 6816113..d5a4530 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -53,6 +53,7 @@ const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
const char *cmd)
{
+ int i;
const char **msgs = opts->msgs;
const char *msg;
char *tmp;
@@ -96,6 +97,9 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
"The following Working tree files would be removed by sparse checkout update:\n%s";
opts->show_all_errors = 1;
+ /* rejected paths may not have a static buffer */
+ for (i = 0; i < ARRAY_SIZE(opts->unpack_rejects); i++)
+ opts->unpack_rejects[i].strdup_strings = 1;
}
static void add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
@@ -124,7 +128,6 @@ static int add_rejected_path(struct unpack_trees_options *o,
enum unpack_trees_error_types e,
const char *path)
{
- struct rejected_paths_list *newentry;
if (!o->show_all_errors)
return error(ERRORMSG(o, e), path);
@@ -132,45 +135,28 @@ static int add_rejected_path(struct unpack_trees_options *o,
* Otherwise, insert in a list for future display by
* display_error_msgs()
*/
- newentry = xmalloc(sizeof(struct rejected_paths_list));
- newentry->path = (char *)path;
- newentry->next = o->unpack_rejects[e];
- o->unpack_rejects[e] = newentry;
+ string_list_append(&o->unpack_rejects[e], path);
return -1;
}
/*
- * free all the structures allocated for the error <e>
- */
-static void free_rejected_paths(struct unpack_trees_options *o,
- enum unpack_trees_error_types e)
-{
- while (o->unpack_rejects[e]) {
- struct rejected_paths_list *del = o->unpack_rejects[e];
- o->unpack_rejects[e] = o->unpack_rejects[e]->next;
- free(del);
- }
- free(o->unpack_rejects[e]);
-}
-
-/*
* display all the error messages stored in a nice way
*/
static void display_error_msgs(struct unpack_trees_options *o)
{
- int e;
+ int e, i;
int something_displayed = 0;
for (e = 0; e < NB_UNPACK_TREES_ERROR_TYPES; e++) {
- if (o->unpack_rejects[e]) {
- struct rejected_paths_list *rp;
+ struct string_list *rejects = &o->unpack_rejects[e];
+ if (rejects->nr > 0) {
struct strbuf path = STRBUF_INIT;
something_displayed = 1;
- for (rp = o->unpack_rejects[e]; rp; rp = rp->next)
- strbuf_addf(&path, "\t%s\n", rp->path);
+ for (i = 0; i < rejects->nr; i++)
+ strbuf_addf(&path, "\t%s\n", rejects->items[i].string);
error(ERRORMSG(o, e), path.buf);
strbuf_release(&path);
- free_rejected_paths(o, e);
}
+ string_list_clear(rejects, 0);
}
if (something_displayed)
printf("Aborting\n");
diff --git a/unpack-trees.h b/unpack-trees.h
index 7c0187d..248b8c4 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -1,6 +1,8 @@
#ifndef UNPACK_TREES_H
#define UNPACK_TREES_H
+#include "string-list.h"
+
#define MAX_UNPACK_TREES 8
struct unpack_trees_options;
@@ -59,7 +61,7 @@ struct unpack_trees_options {
* Store error messages in an array, each case
* corresponding to a error message type
*/
- struct rejected_paths_list *unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
+ struct string_list unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
int head_idx;
int merge_size;
--
1.7.3.1.105.g84915
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH] use persistent memory for rejected paths
2010-11-14 13:02 ` [PATCH] use persistent memory for rejected paths Clemens Buchacher
@ 2010-11-15 18:31 ` Junio C Hamano
2010-11-15 19:02 ` Clemens Buchacher
2010-11-15 19:03 ` Matthieu Moy
1 sibling, 1 reply; 26+ messages in thread
From: Junio C Hamano @ 2010-11-15 18:31 UTC (permalink / raw
To: Clemens Buchacher; +Cc: git, Matthieu Moy
Clemens Buchacher <drizzd@aon.at> writes:
> An aborted merge prints the list of rejected paths as part of the
> error message. Some of those paths do not have static buffers, so
> we have to keep a copy. Use string_list's to accomplish this.
>
> Previous to this fix, the error message would print whatever was
> stored in the stack at that point.
Hmmm, all calls to add_rejected_path() seems to be with ce->name as the
path parameter, and I do not think we ever free cache entries (either
taken from the index or synthesized during the merge), so I am a bit
surprised that this is necessary (namely, if some ce->name points into the
stack, wouldn't that be a more serious bug than misreporting???).
> With this change, the path list is printed in the order of
> processing. Previously, the order was reversed.
That is true but I wonder if the order should be "whatever the processing
order happens to be" in the first place, as this is a report to the end
user, no? Perhaps "collect in strlist, sort at the end before showing" is
a more desirable thing to do?
Still, I am more disturbed by the "some do not have static"...
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] use persistent memory for rejected paths
2010-11-15 18:31 ` Junio C Hamano
@ 2010-11-15 19:02 ` Clemens Buchacher
0 siblings, 0 replies; 26+ messages in thread
From: Clemens Buchacher @ 2010-11-15 19:02 UTC (permalink / raw
To: Junio C Hamano; +Cc: git, Matthieu Moy
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
On Mon, Nov 15, 2010 at 10:31:33AM -0800, Junio C Hamano wrote:
>
> Hmmm, all calls to add_rejected_path() seems to be with ce->name as the
> path parameter,
Yes. All of them except for the leading path checks I introduced
recently. In that code path we have to report untracked files which
do not have a corresponding index entry.
> That is true but I wonder if the order should be "whatever the processing
> order happens to be" in the first place, as this is a report to the end
> user, no? Perhaps "collect in strlist, sort at the end before showing" is
> a more desirable thing to do?
Is the order of processing not alphabetic? It is at least in the
tests that I touched.
Clemens
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] use persistent memory for rejected paths
2010-11-14 13:02 ` [PATCH] use persistent memory for rejected paths Clemens Buchacher
2010-11-15 18:31 ` Junio C Hamano
@ 2010-11-15 19:03 ` Matthieu Moy
2010-11-15 19:41 ` Clemens Buchacher
1 sibling, 1 reply; 26+ messages in thread
From: Matthieu Moy @ 2010-11-15 19:03 UTC (permalink / raw
To: Clemens Buchacher; +Cc: Junio C Hamano, git
Clemens Buchacher <drizzd@aon.at> writes:
> An aborted merge prints the list of rejected paths as part of the
> error message. Some of those paths do not have static buffers, so
> we have to keep a copy.
Like Junio, I'm surprised by this, but I guess you encountered the
problem.
> Use string_list's to accomplish this.
That seems to be a good thing anyway.
Did you remove all uses of "struct rejected_paths_list"? If so, you
can remove its declaration, if not, why?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] use persistent memory for rejected paths
2010-11-15 19:03 ` Matthieu Moy
@ 2010-11-15 19:41 ` Clemens Buchacher
2010-11-15 19:52 ` [PATCH v2] " Clemens Buchacher
2010-11-15 23:05 ` [PATCH] " Junio C Hamano
0 siblings, 2 replies; 26+ messages in thread
From: Clemens Buchacher @ 2010-11-15 19:41 UTC (permalink / raw
To: Matthieu Moy; +Cc: Junio C Hamano, git
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
On Mon, Nov 15, 2010 at 08:03:40PM +0100, Matthieu Moy wrote:
> Clemens Buchacher <drizzd@aon.at> writes:
>
> > An aborted merge prints the list of rejected paths as part of the
> > error message. Some of those paths do not have static buffers, so
> > we have to keep a copy.
>
> Like Junio, I'm surprised by this, but I guess you encountered the
> problem.
You don't have to take my word for it, just try the test. It should
be failing nicely. :-)
> Did you remove all uses of "struct rejected_paths_list"? If so, you
> can remove its declaration, if not, why?
Indeed I can. Thanks.
Clemens
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2] use persistent memory for rejected paths
2010-11-15 19:41 ` Clemens Buchacher
@ 2010-11-15 19:52 ` Clemens Buchacher
2010-11-16 16:41 ` Matthieu Moy
2010-11-15 23:05 ` [PATCH] " Junio C Hamano
1 sibling, 1 reply; 26+ messages in thread
From: Clemens Buchacher @ 2010-11-15 19:52 UTC (permalink / raw
To: Junio C Hamano; +Cc: Matthieu Moy, git
An aborted merge prints the list of rejected paths as part of the
error message. Since commit f66caaf9 (do not overwrite files in
leading path), some of those paths do not have static buffers, so
we have to keep a copy. Use string_list's to accomplish this.
This changes the order of the list to the order in which the paths
are processed. Previously, it was reversed.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
I clarified above which commit introduces this problem and I
removed the now unused struct rejected_paths_list.
Clemens
t/t7607-merge-overwrite.sh | 19 ++++++++++++++++---
t/t7609-merge-co-error-msgs.sh | 16 ++++++++--------
unpack-trees.c | 36 +++++++++++-------------------------
unpack-trees.h | 9 +++------
4 files changed, 38 insertions(+), 42 deletions(-)
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index e49dd80..9137866 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -15,7 +15,9 @@ test_expect_success 'setup' '
git reset --hard c0 &&
mkdir sub &&
echo "sub/f" > sub/f &&
- git add sub/f &&
+ mkdir sub2 &&
+ echo "sub2/f" > sub2/f &&
+ git add sub/f sub2/f &&
git commit -m sub &&
git tag sub &&
echo "VERY IMPORTANT CHANGES" > important
@@ -100,13 +102,24 @@ test_expect_success 'will not overwrite untracked subtree' '
test_cmp important sub/f/important
'
+cat >expect <<\EOF
+error: The following untracked working tree files would be overwritten by merge:
+ sub
+ sub2
+Please move or remove them before you can merge.
+EOF
+
test_expect_success 'will not overwrite untracked file in leading path' '
git reset --hard c0 &&
rm -rf sub &&
cp important sub &&
- test_must_fail git merge sub &&
+ cp important sub2 &&
+ test_must_fail git merge sub 2>out &&
+ test_cmp out expect &&
test_path_is_missing .git/MERGE_HEAD &&
- test_cmp important sub
+ test_cmp important sub &&
+ test_cmp important sub2 &&
+ rm -f sub sub2
'
test_expect_failure SYMLINKS 'will not overwrite untracked symlink in leading path' '
diff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh
index 114d2bd..c994836 100755
--- a/t/t7609-merge-co-error-msgs.sh
+++ b/t/t7609-merge-co-error-msgs.sh
@@ -27,10 +27,10 @@ test_expect_success 'setup' '
cat >expect <<\EOF
error: The following untracked working tree files would be overwritten by merge:
- two
- three
- four
five
+ four
+ three
+ two
Please move or remove them before you can merge.
EOF
@@ -49,9 +49,9 @@ test_expect_success 'untracked files overwritten by merge (fast and non-fast for
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by merge:
- two
- three
four
+ three
+ two
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
five
@@ -68,8 +68,8 @@ test_expect_success 'untracked files or local changes ovewritten by merge' '
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by checkout:
- rep/two
rep/one
+ rep/two
Please, commit your changes or stash them before you can switch branches.
EOF
@@ -89,8 +89,8 @@ test_expect_success 'cannot switch branches because of local changes' '
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by checkout:
- rep/two
rep/one
+ rep/two
Please, commit your changes or stash them before you can switch branches.
EOF
@@ -102,8 +102,8 @@ test_expect_success 'not uptodate file porcelain checkout error' '
cat >expect <<\EOF
error: Updating the following directories would lose untracked files in it:
- rep2
rep
+ rep2
EOF
diff --git a/unpack-trees.c b/unpack-trees.c
index 6816113..d5a4530 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -53,6 +53,7 @@ const char *unpack_plumbing_errors[NB_UNPACK_TREES_ERROR_TYPES] = {
void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
const char *cmd)
{
+ int i;
const char **msgs = opts->msgs;
const char *msg;
char *tmp;
@@ -96,6 +97,9 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
"The following Working tree files would be removed by sparse checkout update:\n%s";
opts->show_all_errors = 1;
+ /* rejected paths may not have a static buffer */
+ for (i = 0; i < ARRAY_SIZE(opts->unpack_rejects); i++)
+ opts->unpack_rejects[i].strdup_strings = 1;
}
static void add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
@@ -124,7 +128,6 @@ static int add_rejected_path(struct unpack_trees_options *o,
enum unpack_trees_error_types e,
const char *path)
{
- struct rejected_paths_list *newentry;
if (!o->show_all_errors)
return error(ERRORMSG(o, e), path);
@@ -132,45 +135,28 @@ static int add_rejected_path(struct unpack_trees_options *o,
* Otherwise, insert in a list for future display by
* display_error_msgs()
*/
- newentry = xmalloc(sizeof(struct rejected_paths_list));
- newentry->path = (char *)path;
- newentry->next = o->unpack_rejects[e];
- o->unpack_rejects[e] = newentry;
+ string_list_append(&o->unpack_rejects[e], path);
return -1;
}
/*
- * free all the structures allocated for the error <e>
- */
-static void free_rejected_paths(struct unpack_trees_options *o,
- enum unpack_trees_error_types e)
-{
- while (o->unpack_rejects[e]) {
- struct rejected_paths_list *del = o->unpack_rejects[e];
- o->unpack_rejects[e] = o->unpack_rejects[e]->next;
- free(del);
- }
- free(o->unpack_rejects[e]);
-}
-
-/*
* display all the error messages stored in a nice way
*/
static void display_error_msgs(struct unpack_trees_options *o)
{
- int e;
+ int e, i;
int something_displayed = 0;
for (e = 0; e < NB_UNPACK_TREES_ERROR_TYPES; e++) {
- if (o->unpack_rejects[e]) {
- struct rejected_paths_list *rp;
+ struct string_list *rejects = &o->unpack_rejects[e];
+ if (rejects->nr > 0) {
struct strbuf path = STRBUF_INIT;
something_displayed = 1;
- for (rp = o->unpack_rejects[e]; rp; rp = rp->next)
- strbuf_addf(&path, "\t%s\n", rp->path);
+ for (i = 0; i < rejects->nr; i++)
+ strbuf_addf(&path, "\t%s\n", rejects->items[i].string);
error(ERRORMSG(o, e), path.buf);
strbuf_release(&path);
- free_rejected_paths(o, e);
}
+ string_list_clear(rejects, 0);
}
if (something_displayed)
printf("Aborting\n");
diff --git a/unpack-trees.h b/unpack-trees.h
index 7c0187d..cd11a08 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -1,6 +1,8 @@
#ifndef UNPACK_TREES_H
#define UNPACK_TREES_H
+#include "string-list.h"
+
#define MAX_UNPACK_TREES 8
struct unpack_trees_options;
@@ -29,11 +31,6 @@ enum unpack_trees_error_types {
void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
const char *cmd);
-struct rejected_paths_list {
- char *path;
- struct rejected_paths_list *next;
-};
-
struct unpack_trees_options {
unsigned int reset,
merge,
@@ -59,7 +56,7 @@ struct unpack_trees_options {
* Store error messages in an array, each case
* corresponding to a error message type
*/
- struct rejected_paths_list *unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
+ struct string_list unpack_rejects[NB_UNPACK_TREES_ERROR_TYPES];
int head_idx;
int merge_size;
--
1.7.3.1.105.g84915
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH] use persistent memory for rejected paths
2010-11-15 19:41 ` Clemens Buchacher
2010-11-15 19:52 ` [PATCH v2] " Clemens Buchacher
@ 2010-11-15 23:05 ` Junio C Hamano
2010-11-15 23:30 ` Clemens Buchacher
1 sibling, 1 reply; 26+ messages in thread
From: Junio C Hamano @ 2010-11-15 23:05 UTC (permalink / raw
To: Clemens Buchacher; +Cc: Matthieu Moy, Junio C Hamano, git
Clemens Buchacher <drizzd@aon.at> writes:
> On Mon, Nov 15, 2010 at 08:03:40PM +0100, Matthieu Moy wrote:
>> Clemens Buchacher <drizzd@aon.at> writes:
>>
>> > An aborted merge prints the list of rejected paths as part of the
>> > error message. Some of those paths do not have static buffers, so
>> > we have to keep a copy.
>>
>> Like Junio, I'm surprised by this, but I guess you encountered the
>> problem.
>
> You don't have to take my word for it, just try the test. It should
> be failing nicely. :-)
As far as I remember the tests were about the output order and never about
"ah we are showing stale contents from stack" (which is rather hard to
arrange for reliable testing anyway).
>> Did you remove all uses of "struct rejected_paths_list"? If so, you
>> can remove its declaration, if not, why?
>
> Indeed I can. Thanks.
I see you have v2 now; will replace. Thanks.
^ permalink raw reply [flat|nested] 26+ messages in thread