Re: [PATCH] builtin/notes: remove unnecessary free

2018-11-11 Thread Johan Herland
Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Johan Herland > --- > builtin/notes.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/builtin/notes.c b/builtin/notes.c > index c05cd004ab..68062f7475 100644 > --- a/builtin/notes.c > +++

Re: [PATCH] notes: send "Automatic notes merge failed" messages to stderr

2017-11-15 Thread Johan Herland
On Tue, Nov 14, 2017 at 5:17 PM, Todd Zullinger wrote: > All other error messages from notes use stderr. Do the same when > alerting users of an unresolved notes merge. > > Fix the output redirection in t3310 and t3320 as well. Previously, the > tests directed output to a file,

Re: [PATCH] t/lib-gpg: fix gpgconf stderr redirect to /dev/null

2017-11-14 Thread Johan Herland
ored, I prepared a commit with these changes and confirmed the > test suite passes, in case we get an ACK from Johan. ACK :-) Error messages should go to stderr, and redirection in the tests should be fixed. ...Johan -- Johan Herland, <jo...@herland.net> www.herland.net

Re: [PATCH 00/12] Clean up notes-related code around `load_subtree()`

2017-08-26 Thread Johan Herland
On Sat, Aug 26, 2017 at 10:28 AM, Michael Haggerty wrote: [...] > plenty that could be cleaned up in the area: > > * Make macro `GIT_NIBBLE` safer by adding some parentheses > * Remove some dead code > * Fix some memory leaks > * Fix some obsolete and incorrect comments > *

Re: [PATCH] notes: Fix note_tree_consolidate not to break the note_tree structure

2017-04-07 Thread Johan Herland
p && (GET_PTR_TYPE(p) == PTR_TYPE_INTERNAL)) + return -2; /* Cannot move int_nodes within the tree. */ for a more optimal handling of subtree nodes in this scenario. Have fun! :) ...Johan > /* replace tree with p in parent[index] */ > parent->a[index] = p; > free(tree); > -- > 2.12.1.dirty > -- Johan Herland, <jo...@herland.net> www.herland.net

Re: config for `format-patch --notes`?

2016-12-21 Thread Johan Herland
this. >From git-config(1): branch..description Branch description, can be edited with git branch --edit-description. Branch description is automatically added in the format-patch cover letter or request-pull summary. ...Johan -- Johan Herland, <jo...@herland.net> www.herland.net

Re: [PATCH] fast-import: properly fanout notes when tree is imported

2016-12-19 Thread Johan Herland
t behaviour happens when using the filemodify command to import > subdirectories. > > This change makes do_change_note_fanount call load_tree() whenever the > tree_entry it is given has no tree loaded, making all cases handled > equally. > > Signed-off-by: Mike Hommey <m...@glandium.org> Acked-by: Johan Herland <jo...@herland.net>

Re: [PATCH] push: Re-include "push.default=tracking" in the documentation

2016-10-06 Thread Johan Herland
t does. This patch does the latter. > > Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> Acked-by: Johan Herland <jo...@herland.net> -- Johan Herland, <jo...@herland.net> www.herland.net

Re: What is an efficient way to get all blobs / trees that have notes attached?

2016-04-04 Thread Johan Herland
On Mon, Apr 4, 2016 at 9:46 AM, Sebastian Schuberth <sschube...@gmail.com> wrote: > On Fri, Apr 1, 2016 at 2:16 PM, Johan Herland <jo...@herland.net> wrote: >>> 3) Recursively list all blobs / trees (git-ls-tree) and look whether an >>> object's hash is conati

Re: What is an efficient way to get all blobs / trees that have notes attached?

2016-04-01 Thread Johan Herland
uot;) if test "$type" != "commit" then echo "$annotated_obj: $type" fi done done Can probably be made even faster by using the --batch option to cat-file... ...Johan -- Johan Herland, <jo...@herland.net> www.herland.net -- To unsubs

Re: What is an efficient way to get all blobs / trees that have notes attached?

2016-04-01 Thread Johan Herland
On Fri, Apr 1, 2016 at 2:16 PM, Johan Herland <jo...@herland.net> wrote: > for notes_ref in $(git for-each-ref refs/notes | cut -c 49-) > do > echo "--- $notes_ref ---" > for annotated_obj in $(git notes --ref=$notes_ref list | cut -c 41-) > do &

Re: [PATCH] notes: allow merging from arbitrary references

2015-11-18 Thread Johan Herland
refs (e.g. try "git log heads/master" or "git log tags/v2.6.3" in git.git). ...Johan -- Johan Herland, <jo...@herland.net> www.herland.net -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] notes: allow merging from arbitrary references

2015-11-15 Thread Johan Herland
read-only_ operations - on notes trees outside refs/notes/. I believe this should also become possible, although I haven't thoroughly examined all implications. ...Johan -- Johan Herland, <jo...@herland.net> www.herland.net -- To unsubscribe from this list: send the line &

Re: [PATCH] notes: allow merging from arbitrary references

2015-11-15 Thread Johan Herland
On Mon, Nov 16, 2015 at 12:23 AM, Jacob Keller <jacob.kel...@gmail.com> wrote: > On Sun, Nov 15, 2015 at 2:14 PM, Johan Herland <jo...@herland.net> wrote: >> A related topic that has been discussed (although I cannot remember if >> any conclusion was reached) is

Re: [PATCH] Fix `git rev-list --show-notes HEAD` when there are no notes

2015-08-22 Thread Johan Herland
Herland jo...@herland.net -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v8 4/8] notes: allow use of the rewrite terminology for merge strategies

2015-08-17 Thread Johan Herland
/changed again. ...Johan Add tests for the new synonyms. Teaching rewrite how to understand merge terminology is left for a following patch. Signed-off-by: Jacob Keller jacob.kel...@gmail.com -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line

Re: [PATCH v8 8/8] notes: teach git-notes about notes.ref.mergeStrategy option

2015-08-17 Thread Johan Herland
, the series (except possibly #4/#5, see separate discussion) looks good to me. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v7 3/4] notes: add notes.mergestrategy option to select default strategy

2015-08-15 Thread Johan Herland
:: Which ref (or refs, if a glob or specified more than once), in addition to the default set by `core.notesRef` or [...] Otherwise, looks good to me. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git

Re: [PATCH v7 4/4] notes: teach git-notes about notes.ref.mergestrategy option

2015-08-15 Thread Johan Herland
refs/notes/, e.g. for configuring the merge strategy for refs/notes/commits, notes.commits.mergeStrategy must be set. Otherwise, the patch looks good to me. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body

Re: [PATCH v7 1/4] notes: document cat_sort_uniq rewriteMode

2015-08-15 Thread Johan Herland
. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Johan Herland
: Split notes ref DWIMmery into a separate function) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Johan Herland, jo...@herland.net www.herland.net

Re: enhanced remote ref namespaces

2015-08-12 Thread Johan Herland
/remotes/$O in place, you're AFAICS only adding functionality, not (visibly) changing existing behavior. BTW, thanks for resurrecting this topic! ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-12 Thread Johan Herland
On Wed, Aug 12, 2015 at 4:26 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: I know that we don't yet have a proper place to put remote notes refs, but the ref in notes.ref.merge _must_ be a local notes ref (you even use the localref notation

Re: [PATCH v4 1/4] notes: document cat_sort_uniq rewriteMode

2015-08-11 Thread Johan Herland
...@gmail.com Reviewed-by: Johan Herland jo...@herland.net -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 2/4] notes: add tests for --commit/--abort/--strategy exclusivity

2015-08-11 Thread Johan Herland
On Tue, Aug 11, 2015 at 10:57 PM, Jacob Keller jacob.e.kel...@intel.com wrote: From: Jacob Keller jacob.kel...@gmail.com Add new tests to ensure that --commit, --abort, and --strategy are mutually exclusive. Signed-off-by: Jacob Keller jacob.kel...@gmail.com Reviewed-by: Johan Herland jo

Re: [PATCH v6 2/2] notes: handle multiple worktrees

2015-08-11 Thread Johan Herland
Turner dtur...@twopensource.com Still looks good to me, AFAICS. Feel free to add my Reviewed-by. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH v4 3/4] notes: add notes.merge option to select default strategy

2015-08-11 Thread Johan Herland
merge strategy: %s, configured_strategy); } /* else o.strategy = NOTES_MERGE_RESOLVE_MANUAL; */ Otherwise, this patch looks good to me. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

Re: [PATCH v4 4/4] notes: teach git-notes about notes.ref.merge option

2015-08-11 Thread Johan Herland
amount of future- proofing as well. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 2/2] notes: handle multiple worktrees

2015-08-01 Thread Johan Herland
://vger.kernel.org/majordomo-info.html -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 0/2] notes: add notes.merge strategy option

2015-08-01 Thread Johan Herland
, as those do not jump around quite as much as pu does. Jacob Keller (2): notes: document cat_sort_uniq rewriteMode notes: add notes.merge option to select default strategy Both patches Acked-by: Johan Herland jo...@herland.net ...Johan Documentation/config.txt | 11

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-30 Thread Johan Herland
On Wed, Jul 29, 2015 at 6:37 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: On Wed, Jul 29, 2015 at 7:01 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: I believe it is a bad compromise. It complicates the code

Re: [PATCH v4 1/5] refs: Introduce pseudoref and per-worktree ref concepts

2015-07-29 Thread Johan Herland
On Wed, Jul 29, 2015 at 7:58 PM, David Turner dtur...@twopensource.com wrote: + specially by git. Psuedorefs both have names that are all-caps, s/Psuedo/Pseudo/ ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-29 Thread Johan Herland
On Wed, Jul 29, 2015 at 7:01 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: I believe it is a bad compromise. It complicates the code, and it provides a concurrent notes merges that is unnecessarily tied to (and dependent on) worktrees. For example, if I

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Johan Herland
this language is new to me. My apologies). ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] notes: handle multiple worktrees

2015-07-28 Thread Johan Herland
On Wed, Jul 29, 2015 at 12:12 AM, Junio C Hamano gits...@pobox.com wrote: David Turner dtur...@twopensource.com writes: Prevent merges to the same notes branch from different worktrees. Before creating NOTES_MERGE_REF, check NOTES_MERGE_REF using the same code we use to check that two HEADs in

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Johan Herland
On Wed, Jul 29, 2015 at 2:56 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Johan Herland jo...@herland.net writes: Here is where we start to differ. I would say that starting a notes merge is completely unrelated to your worktree. Consider this: It sounds like what a notes merge really

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Johan Herland
are always per _repo_ and never per _worktree_, so this is all unrelated to the current patch/discussion AFAICS. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Johan Herland
On Wed, Jul 29, 2015 at 12:52 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: However, in any case, notes merges are always per _repo_ and never per _worktree_, so this is all unrelated to the current patch/discussion AFAICS. Thanks for chiming in, but I

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Johan Herland
On Wed, Jul 29, 2015 at 2:33 AM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Here is where we start to differ. I would say that starting a notes merge is completely unrelated to your worktree. Consider this: ... This is not the case for notes merges. If I

Re: [PATCH v3 2/6] notes: replace pseudorefs with real refs

2015-07-28 Thread Johan Herland
unrelated notes merges as a wholly independent, separate topic. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v4] notes: Allow treeish expressions as notes ref

2015-07-10 Thread Johan Herland
of tests thrown in there to verify correctness; e.g. reading notes from refs/notes/commits^{tree} shall succeed, and trying to write notes to refs/notes/commits^{tree} shall fail. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v3] notes: Allow committish expressions as notes ref

2015-07-09 Thread Johan Herland
to be used for reads only, or will be updated, a flag is added. This has the side effect of enabling the use of committish as notes refs in commands allowing them, e.g. git log --notes=foo@{1}. Signed-off-by: Mike Hommey m...@glandium.org Reviewed-by: Johan Herland jo...@herland.net ...modulo some

Re: [PATCH] notes: Use get_sha1_committish instead of read_ref in init_notes()

2015-06-17 Thread Johan Herland
/c), so there might be room for more consolidation/refactoring here... ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: gitk won't show notes?

2015-04-14 Thread Johan Herland
to find out all the current notes? Yes. (if not, that's a bug and should be fixed). ...Johan It looks like it is from the documentation. Anyway let's add some people in Cc in case they could help. -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send

Re: Notes do not follow rebase

2015-04-08 Thread Johan Herland
be copied to the new commit during an ammend/rebase? It depends. Which notes do you want copied? (i.e. from which notes ref?) Please have a look at the notes.rewriteRef config option (documented in the git-config and git-notes manual pages) ...Johan -- Johan Herland, jo...@herland.net www.herland.net

Re: [PATCH 3/8] t3305: fix ignored exit code inside loop

2015-03-25 Thread Johan Herland
of iterations. We can bump it into the conditional of the loop to make this more obvious. Signed-off-by: Jeff King p...@peff.net Acked-by: Johan Herland jo...@herland.net -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git

Re: [PATCH] diff --shortstat --dirstat: remove duplicate output

2015-02-28 Thread Johan Herland
On Sat, Feb 28, 2015 at 2:19 PM, Mårten Kongstad marten.kongs...@gmail.com wrote: [...] Signed-off-by: Mårten Kongstad marten.kongs...@gmail.com Acked-by: Johan Herland jo...@herland.net -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line

Re: [PATCH] Fix unclosed here document in t3301.sh

2015-01-22 Thread Johan Herland
it. Signed-off-by: Kacper Kornet drae...@pld-linux.org Acked-by: Johan Herland jo...@herland.net --- t/t3301-notes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index 245406a..433f925 100755 --- a/t/t3301-notes.sh +++ b/t/t3301-notes.sh

Re: A better git log --graph?

2015-01-07 Thread Johan Herland
failed to work out of the box for me. Thanks a lot for any pointer. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Johan Herland, jo...@herland.net

Re: [PATCH v2 2/2] t/t3308-notes-merge.sh: succeed with relaxed notes refs

2015-01-06 Thread Johan Herland
', to explicitly disable the safety checks for experimental use. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v2 2/2] t/t3308-notes-merge.sh: succeed with relaxed notes refs

2015-01-06 Thread Johan Herland
(This addresses some smaller specific questions from Kyle, and is not an attempt to take focus away from the main direction of this thread) On Jan 6, 2015 1:27 PM, Kyle J. McKay mack...@gmail.com wrote: On Jan 6, 2015, at 02:20, Junio C Hamano wrote: [...] At the point the dropped line runs,

[RFC/PATCHv0 4/4] fast-import.c:note_change_n(): Rename commit_* to target_*

2015-01-04 Thread Johan Herland
at the top of fast-import.c needs corresponding updates. Signed-off-by: Johan Herland jo...@herland.net --- fast-import.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fast-import.c b/fast-import.c index b6df00b..4ef7a95 100644 --- a/fast-import.c +++ b/fast

[RFC/PATCHv0 2/4] fast-import.c:do_change_note_fanout(): Also apply load_tree() to initial root

2015-01-04 Thread Johan Herland
the existing notes tree without using it as a parent: M 04 refs/notes/foo^{tree} \n Discovered-by: Mike Hommey m...@glandium.org Signed-off-by: Johan Herland jo...@herland.net --- fast-import.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fast-import.c b/fast

[RFC/PATCHv0 3/4] fast-import: Support adding notes to non-commits

2015-01-04 Thread Johan Herland
git notes allows adding notes to non-commit objects, but fast-import restricts the 'notemodify' command to only add notes for commit objects. Remove that silly restriction from fast-import. Suggested-by: Mike Hommey m...@glandium.org Signed-off-by: Johan Herland jo...@herland.net --- fast

Re: fast-import's notemodify doesn't work the same as git notes

2015-01-04 Thread Johan Herland
looked closely at this, and I'm not sure it is as easy as it sounds. Have fun! :) ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

[RFC/PATCHv0 1/4] fast-import.c:do_change_note_fanout(): Remove unneeded local var 't'

2015-01-04 Thread Johan Herland
at the end of the for loop body, which is ugly and brittle. Simply use root-tree directly instead, and remote the t shorthand. Signed-off-by: Johan Herland jo...@herland.net --- fast-import.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fast-import.c b/fast-import.c

Re: Re: Extended splitting for git add --interactive

2014-11-27 Thread Johan Herland
? NO +CCC Stage this hunk? YES +DDD Stage this hunk? NO This would allow me to stage the following: -AAA +CCC and leave the following unstaged: -BBB +DDD but would also allow any other combination. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from

Re: git notes show is orders of magnitude slower than doing it manually with ls-tree and cat-file

2014-11-26 Thread Johan Herland
that this is probably the best workaround for now. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: how to reduce disk usage for large .git dirs?

2014-11-13 Thread Johan Herland
|B pulls, they will find most objects are already present in repo-master. ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCHv5 9/9] t3301: Modernize

2014-11-12 Thread Johan Herland
On Wed, Nov 12, 2014 at 2:57 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Tue, Nov 11, 2014 at 7:40 PM, Johan Herland jo...@herland.net wrote: + test_line_count = 1 actual Broken -chain. This problem is repeated each place use invoke test_line_count(). Thanks. Fixed in the next

Re: [PATCHv5 9/9] t3301: Modernize

2014-11-12 Thread Johan Herland
On Wed, Nov 12, 2014 at 10:18 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: On Wed, Nov 12, 2014 at 2:57 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Tue, Nov 11, 2014 at 7:40 PM, Johan Herland jo...@herland.net wrote: + test_line_count = 1

Re: mac test failure -- test 3301

2014-11-11 Thread Johan Herland
On Tue, Nov 11, 2014 at 3:41 AM, Jeff King p...@peff.net wrote: On Tue, Nov 11, 2014 at 02:40:19AM +0100, Johan Herland wrote: This and all other failures are due to the output of 'wc -l', which on Mac is {whitespace}1 rather than just 1 as it is on other platforms. fbe4f748 added quotes

[PATCHv5 0/9] Handling empty notes

2014-11-11 Thread Johan Herland
! :) ...Johan Johan Herland (9): builtin/notes: Fix premature failure when trying to add the empty blob t3301: Verify that 'git notes' removes empty notes by default builtin/notes: Improve naming builtin/notes: Refactor note file path into struct note_data builtin/notes: Simplify early exit code

[PATCHv5 4/9] builtin/notes: Refactor note file path into struct note_data

2014-11-11 Thread Johan Herland
Move the 'path' variable from create_note() and into the note_data struct. Unify cleanup of note_data objects with a free_note_data() function. This might not make too much sense on its own, but it makes the future refactoring of create_note() considerably cleaner. Signed-off-by: Johan Herland

[PATCHv5 3/9] builtin/notes: Improve naming

2014-11-11 Thread Johan Herland
write_note_data() to copy_obj_to_fd(), which more aptly describes what it actually does: Copying the contents of a git object (given by its SHA1) into a given file descriptor. Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 109 1

[PATCHv5 7/9] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-11 Thread Johan Herland
Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-notes.txt | 12 builtin/notes.c | 17 +++-- t/t3301-notes.sh| 10 +- 3 files changed, 28 insertions(+), 11 deletions(-) diff

[PATCHv5 1/9] builtin/notes: Fix premature failure when trying to add the empty blob

2014-11-11 Thread Johan Herland
was given (e.g. using -m or -F /dev/null). The next patch contains a test that verifies the fixed behavior. Found-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin

[PATCHv5 8/9] notes: Empty notes should be shown by 'git log'

2014-11-11 Thread Johan Herland
If the user has gone through the trouble of explicitly adding an empty note, then git log should not silently skip it (as if it didn't exist). Signed-off-by: Johan Herland jo...@herland.net --- notes.c | 3 +-- t/t3301-notes.sh | 12 2 files changed, 13 insertions(+), 2

[PATCHv5 5/9] builtin/notes: Simplify early exit code in add()

2014-11-11 Thread Johan Herland
Remove the need for 'retval' and the unnecessary goto. Also reorganize to only call free_note_data() is actually needed. Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 35 +-- 1 file changed, 17

[PATCHv5 6/9] builtin/notes: Split create_note() to clarify add vs. remove logic

2014-11-11 Thread Johan Herland
()), keeping the logic for writing the actual note object in a separate function: write_note_data(). Suggested-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 103 +--- 1 file changed, 54

[PATCHv5 2/9] t3301: Verify that 'git notes' removes empty notes by default

2014-11-11 Thread Johan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Improved-by: Eric Sunshine sunsh...@sunshineco.com Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan

[PATCHv5 9/9] t3301: Modernize

2014-11-11 Thread Johan Herland
and verification. Improved-by: Eric Sunshine sunsh...@sunshineco.com Improved-by: Junio C Hamano gits...@pobox.com Improved-by: Michael Blume blume.m...@gmail.com Improved-by: Jeff King p...@peff.net Signed-off-by: Johan Herland jo...@herland.net --- t/t3301-notes.sh | 1300

Re: [PATCHv4 5/9] builtin/notes: Simplify early exit code in add()

2014-11-10 Thread Johan Herland
On Mon, Nov 10, 2014 at 9:36 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/builtin/notes.c b/builtin

Re: [PATCHv4 9/9] t3301: Modernize

2014-11-10 Thread Johan Herland
On Mon, Nov 10, 2014 at 9:42 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Make this test script appear somewhat less old-fashioned: - Use test helper functions: - write_script - test_commit - test_write_lines - test_config

Re: mac test failure -- test 3301

2014-11-10 Thread Johan Herland
^ test_must_fail git notes show HEAD^ ...Johan -- Johan Herland, jo...@herland.net www.herland.net -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv4 9/9] t3301: Modernize

2014-11-10 Thread Johan Herland
On Tue, Nov 11, 2014 at 2:07 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, Nov 10, 2014 at 8:04 PM, Johan Herland jo...@herland.net wrote: On Mon, Nov 10, 2014 at 9:42 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: Make this test script appear

[PATCHv4 0/9] Handling empty notes

2014-11-09 Thread Johan Herland
! :) ...Johan Johan Herland (9): builtin/notes: Fix premature failure when trying to add the empty blob t3301: Verify that 'git notes' removes empty notes by default builtin/notes: Improve naming builtin/notes: Refactor note file path into struct note_data builtin/notes: Simplify early exit

[PATCHv4 1/9] builtin/notes: Fix premature failure when trying to add the empty blob

2014-11-09 Thread Johan Herland
was given (e.g. using -m or -F /dev/null). The next patch contains a test that verifies the fixed behavior. Found-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin

[PATCHv4 6/9] builtin/notes: Split create_note() to clarify add vs. remove logic

2014-11-09 Thread Johan Herland
()), keeping the logic for writing the actual note object in a separate function: write_note_data(). Suggested-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 103 +--- 1 file changed, 54

Re: [PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-09 Thread Johan Herland
On Fri, Nov 7, 2014 at 7:04 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: [...] Assuming that it is a good idea to allow empty notes, I think there are two issues involved here: * Traditionally, feeding an empty note is taken as a request to remove

[PATCHv4 8/9] notes: Empty notes should be shown by 'git log'

2014-11-09 Thread Johan Herland
If the user has gone through the trouble of explicitly adding an empty note, then git log should not silently skip it (as if it didn't exist). Signed-off-by: Johan Herland jo...@herland.net --- notes.c | 3 +-- t/t3301-notes.sh | 12 2 files changed, 13 insertions(+), 2

[PATCHv4 2/9] t3301: Verify that 'git notes' removes empty notes by default

2014-11-09 Thread Johan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Improved-by: Eric Sunshine sunsh...@sunshineco.com Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan

[PATCHv4 9/9] t3301: Modernize

2014-11-09 Thread Johan Herland
...@sunshineco.com Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- t/t3301-notes.sh | 1148 +- 1 file changed, 522 insertions(+), 626 deletions(-) diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index 416ed9e

[PATCHv4 4/9] builtin/notes: Refactor note file path into struct note_data

2014-11-09 Thread Johan Herland
Move the 'path' variable from create_note() and into the note_data struct. Unify cleanup of note_data objects with a free_note_data() function. This might not make too much sense on its own, but it makes the future refactoring of create_note() considerably cleaner. Signed-off-by: Johan Herland

[PATCHv4 3/9] builtin/notes: Improve naming

2014-11-09 Thread Johan Herland
write_note_data() to copy_obj_to_fd(), which more aptly describes what it actually does: Copying the contents of a git object (given by its SHA1) into a given file descriptor. Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 109 1

[PATCHv4 5/9] builtin/notes: Simplify early exit code in add()

2014-11-09 Thread Johan Herland
Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index 1017472..f1480cf 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -399,7 +399,7 @@ static int

[PATCHv4 7/9] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-09 Thread Johan Herland
Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-notes.txt | 12 builtin/notes.c | 17 +++-- t/t3301-notes.sh| 10 +- 3 files changed, 28 insertions(+), 11 deletions(-) diff

Re: [PATCHv2 2/3] t3312-notes-empty: Test that 'git notes' removes empty notes by default

2014-11-07 Thread Johan Herland
On Wed, Nov 5, 2014 at 8:00 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: +verify_missing() { + git log -1 actual Hmph, it was unclear what exactly you are trying to check with this one and the other git log -1 expect_missing. Perhaps a comment

[PATCHv3 0/5] Handling empty notes

2014-11-07 Thread Johan Herland
(#4) - Add a final (optional) patch with some whitespace and other cleanups in t3301. Feel free to drop this if it's too much churn. Have fun! :) ...Johan Johan Herland (5): builtin/notes: Fix premature failure when trying to add the empty blob t3301: Verify that 'git notes' removes

[PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-07 Thread Johan Herland
Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-notes.txt | 12 builtin/notes.c | 23 ++- t/t3301-notes.sh| 10 +- 3 files changed, 31 insertions(+), 14 deletions

[PATCHv3 2/5] t3301: Verify that 'git notes' removes empty notes by default

2014-11-07 Thread Johan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Improved-by: Eric Sunshine sunsh...@sunshineco.com Improved-by: Junio C Hamano gits...@pobox.com Signed-off-by: Johan

[PATCHv3 1/5] builtin/notes: Fix premature failure when trying to add the empty blob

2014-11-07 Thread Johan Herland
was given (e.g. using -m or -F /dev/null). The next patch contains a test that verifies the fixed behavior. Found-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin

[PATCHv3 4/5] notes: Empty notes should be shown by 'git log'

2014-11-07 Thread Johan Herland
If the user has gone through the trouble of explicitly adding an empty note, then git log should not silently skip it (as if it didn't exist). Signed-off-by: Johan Herland jo...@herland.net --- notes.c | 3 +-- t/t3301-notes.sh | 12 2 files changed, 13 insertions(+), 2

[PATCHv3 5/5] t3301: Use write_script(), nitpick whitespace

2014-11-07 Thread Johan Herland
Signed-off-by: Johan Herland jo...@herland.net --- Drop this if it's too much churn. ...Johan t/t3301-notes.sh | 254 +++ 1 file changed, 126 insertions(+), 128 deletions(-) diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index f5d8193

[PATCHv2 1/3] builtin/notes: Fix premature failure when trying to add the empty blob

2014-11-05 Thread Johan Herland
was given (e.g. using -m or -F /dev/null). The next patch contains a test that verifies the fixed behavior. Found-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Johan Herland jo...@herland.net --- builtin/notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin

Re: [PATCH 1/2] t3312-notes-empty: Test that 'git notes' removes empty notes by default

2014-11-05 Thread Johan Herland
[...] Each -c/-C case fails for me when trying to read $empty_object. For example: fatal: Failed to read object 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'. not ok 5 - 'git notes add -c $empty_blob' removes empty note These are all fixed in the re-roll. Thanks for the feedback! ...Johan -- Johan

[PATCHv2 2/3] t3312-notes-empty: Test that 'git notes' removes empty notes by default

2014-11-05 Thread Johan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Improved-by: Eric Sunshine sunsh...@sunshineco.com Signed-off-by: Johan Herland jo...@herland.net --- t/t3312-notes

[PATCHv2 3/3] notes: Add --allow-empty, to allow storing empty notes

2014-11-05 Thread Johan Herland
Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-notes.txt | 12 builtin/notes.c | 23 ++- notes.c | 3 +-- t/t3312-notes-empty.sh | 17 - 4 files changed, 39 insertions(+), 16 deletions

[PATCH 1/2] t3312-notes-empty: Test that 'git notes' removes empty notes by default

2014-11-04 Thread Johan Herland
Add test cases documenting the current behavior when trying to add/append/edit empty notes. This is in preparation for adding --allow-empty; to allow empty notes to be stored. Signed-off-by: Johan Herland jo...@herland.net --- t/t3312-notes-empty.sh | 58

[PATCH 2/2] notes: Add --allow-empty, to allow storing empty notes

2014-11-04 Thread Johan Herland
Signed-off-by: Johan Herland jo...@herland.net --- Documentation/git-notes.txt | 12 builtin/notes.c | 25 +++-- notes.c | 3 +-- t/t3312-notes-empty.sh | 20 +++- 4 files changed, 43 insertions(+), 17 deletions

  1   2   3   4   >