git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/WIP 00/11] read_directory() rewrite to support struct pathspec
@ 2011-10-24  6:36 Nguyễn Thái Ngọc Duy
  2011-10-24  6:36 ` [PATCH/WIP 01/11] Introduce "check-attr --excluded" as a replacement for "add --ignore-missing" Nguyễn Thái Ngọc Duy
                   ` (11 more replies)
  0 siblings, 12 replies; 51+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2011-10-24  6:36 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

This is the first time "make test" fully passes (*) for me, so it's
probably good enough for human eyes. Just heads up where this might
go.

A few points:

 - "git add --ignore-missing" is killed because I could not find an
   easy way to incorporate it to the new read_directory(). It looks
   like a hack to me, to expose .gitignore matching. Luckily no one
   except submodule seems to use it.

 - I chose to use tree_entry_interesting() instead of
   match_pathspec(). The former has more optimizations but requires a
   tree-based structure. So I have to read the whole directory in,
   re-construct a temporary tree object to make t_e_i() happy. I
   _think_ it does not impact performance with reasonable dir size.

 - there'll be more work to get rid of match_pathspec() calls after
   read_directory()/fill_directory(). I haven't got finished this part
   yet.

 - I really like to kill match_pathspec() so we only have one pathspec
   implementation instead of two now, but that may be real hard
   because of staged entries in index.

(*) t7012.7 fails but I think that's the test's fault.

Nguyễn Thái Ngọc Duy (11):
  Introduce "check-attr --excluded" as a replacement for "add --ignore-missing"
  notes-merge: use opendir/readdir instead of using read_directory()
  t5403: avoid doing "git add foo/bar" where foo/.git exists
  tree-walk.c: do not leak internal structure in tree_entry_len()
  symbolize return values of tree_entry_interesting()
  read_directory_recursive: reduce one indentation level
  tree_entry_interesting: make use of local pointer "item"
  tree-walk: mark useful pathspecs
  tree_entry_interesting: differentiate partial vs full match
  read-dir: stop using path_simplify code in favor of tree_entry_interesting()
  dir.c: remove dead code after read_directory() rewrite

 Documentation/git-check-attr.txt |    4 +
 builtin/add.c                    |   36 ++--
 builtin/check-attr.c             |   26 +++
 builtin/grep.c                   |   11 +-
 builtin/pack-objects.c           |    2 +-
 cache.h                          |    1 +
 dir.c                            |  428 +++++++++++++++++++-------------------
 dir.h                            |    8 +-
 git-submodule.sh                 |    2 +-
 list-objects.c                   |    9 +-
 notes-merge.c                    |   45 +++--
 t/t3700-add.sh                   |   19 --
 t/t5403-post-checkout-hook.sh    |   17 +-
 tree-diff.c                      |   19 +-
 tree-walk.c                      |   85 ++++----
 tree-walk.h                      |   19 ++-
 tree.c                           |   11 +-
 unpack-trees.c                   |    6 +-
 18 files changed, 394 insertions(+), 354 deletions(-)

-- 
1.7.3.1.256.g2539c.dirty

^ permalink raw reply	[flat|nested] 51+ messages in thread
* problem with merging notes.
@ 2012-03-11 17:17 David Bremner
  2012-03-12 14:57 ` [PATCH 1/2] t3310: Add testcase demonstrating failure to --commit from within another dir Johan Herland
  0 siblings, 1 reply; 51+ messages in thread
From: David Bremner @ 2012-03-11 17:17 UTC (permalink / raw)
  To: Git Mailing List


Hi;

It seems to me there is a bug (or at least some missing documentation)
for git notes merge --commit. If the working directory is
.git/NOTES_MERGE_WORKTREE, then all notes for the conflicting commit are
silently dropped.

A test script follows. Have I missed something?  

David

P.S. Please CC me, I'm not subscribed.


tmpdir=$(mktemp -d)
cd $tmpdir
git init
git commit --allow-empty -m'empty commit'
git notes add -m 'foo' HEAD
git notes --ref=other add -m 'bar' HEAD 
git notes merge refs/notes/other
cd .git/NOTES_MERGE_WORKTREE
echo "foo\nbar\n"> $(git rev-parse HEAD)
git notes merge --commit
cd ../..
git notes list | wc -l

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2012-03-15  8:12 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24  6:36 [PATCH/WIP 00/11] read_directory() rewrite to support struct pathspec Nguyễn Thái Ngọc Duy
2011-10-24  6:36 ` [PATCH/WIP 01/11] Introduce "check-attr --excluded" as a replacement for "add --ignore-missing" Nguyễn Thái Ngọc Duy
2011-10-27 18:08   ` Junio C Hamano
2011-10-28 20:51     ` Nguyen Thai Ngoc Duy
2011-10-24  6:36 ` [PATCH/WIP 02/11] notes-merge: use opendir/readdir instead of using read_directory() Nguyễn Thái Ngọc Duy
2011-10-25 19:27   ` Junio C Hamano
2011-10-26  0:08     ` Nguyen Thai Ngoc Duy
2011-10-26 17:37       ` Junio C Hamano
2011-10-27  7:51         ` Nguyen Thai Ngoc Duy
2011-10-27 17:23           ` Junio C Hamano
2011-10-28 20:47             ` Nguyen Thai Ngoc Duy
2012-03-12 14:47   ` [PATCH 1/2] t3310: Add testcase demonstrating failure to --commit from within another dir Johan Herland
2012-03-12 14:47     ` [PATCH 2/2] notes-merge: use opendir/readdir instead of using read_directory() Johan Herland
2012-03-12 14:53       ` Nguyen Thai Ngoc Duy
2012-03-14  8:39       ` [PATCH jh/notes-merge-in-git-dir-worktree] fixup! t3310 on Windows Johannes Sixt
2012-03-14 11:39         ` Johan Herland
2012-03-14 11:59           ` Johannes Sixt
2012-03-14 12:20             ` David Bremner
2012-03-14 12:56             ` Johan Herland
2012-03-14 17:44               ` Junio C Hamano
2012-03-14 23:55                 ` [PATCH 3/2] notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd Johan Herland
2012-03-15  7:02                   ` Junio C Hamano
2012-03-15  7:16                     ` Junio C Hamano
2012-03-15  7:39                       ` Johan Herland
2012-03-15  8:04                         ` Re* " Junio C Hamano
2012-03-15  8:12                         ` Junio C Hamano
2012-03-15  8:12                   ` Johannes Sixt
2011-10-24  6:36 ` [PATCH/WIP 03/11] t5403: avoid doing "git add foo/bar" where foo/.git exists Nguyễn Thái Ngọc Duy
2011-10-25 19:19   ` Junio C Hamano
2011-10-26  0:18     ` Nguyen Thai Ngoc Duy
2011-10-26 17:26       ` Junio C Hamano
2011-10-27  8:06         ` Nguyen Thai Ngoc Duy
2011-10-27 17:41           ` Junio C Hamano
2011-10-30  5:55             ` Nguyen Thai Ngoc Duy
2011-10-30  7:08               ` Junio C Hamano
2011-10-30  9:55                 ` Nguyen Thai Ngoc Duy
2011-10-30 23:47                   ` Junio C Hamano
2011-10-24  6:36 ` [PATCH/WIP 04/11] tree-walk.c: do not leak internal structure in tree_entry_len() Nguyễn Thái Ngọc Duy
2011-10-25 19:20   ` Junio C Hamano
2011-10-24  6:36 ` [PATCH/WIP 05/11] symbolize return values of tree_entry_interesting() Nguyễn Thái Ngọc Duy
2011-10-25 19:24   ` Junio C Hamano
2011-10-27 18:36   ` Junio C Hamano
2011-10-30  9:17     ` Nguyen Thai Ngoc Duy
2011-10-24  6:36 ` [PATCH/WIP 06/11] read_directory_recursive: reduce one indentation level Nguyễn Thái Ngọc Duy
2011-10-24  6:36 ` [PATCH/WIP 07/11] tree_entry_interesting: make use of local pointer "item" Nguyễn Thái Ngọc Duy
2011-10-24  6:36 ` [PATCH/WIP 08/11] tree-walk: mark useful pathspecs Nguyễn Thái Ngọc Duy
2011-10-24  6:36 ` [PATCH/WIP 09/11] tree_entry_interesting: differentiate partial vs full match Nguyễn Thái Ngọc Duy
2011-10-24  6:36 ` [PATCH/WIP 10/11] read-dir: stop using path_simplify code in favor of tree_entry_interesting() Nguyễn Thái Ngọc Duy
2011-10-24  6:36 ` [PATCH/WIP 11/11] dir.c: remove dead code after read_directory() rewrite Nguyễn Thái Ngọc Duy
2011-10-24 17:10 ` [PATCH/WIP 00/11] read_directory() rewrite to support struct pathspec Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2012-03-11 17:17 problem with merging notes David Bremner
2012-03-12 14:57 ` [PATCH 1/2] t3310: Add testcase demonstrating failure to --commit from within another dir Johan Herland
2012-03-12 14:57   ` [PATCH 2/2] notes-merge: use opendir/readdir instead of using read_directory() Johan Herland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).