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
> +++
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, but stderr was ei
ed 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,
www.herland.net
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
> * Reject "notes" that are
ET_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,
www.herland.net
ect` option for 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,
www.herland.net
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
Acked-by: Johan Herland
warn or die nowadays if this option is in the
> config, but I had some old config of mine use this option, I'd
> forgotten that it was a synonym, and nothing in git's documentation
> mentioned that.
>
> That's bad, either we shouldn't support it at all, or we shou
On Mon, Apr 4, 2016 at 9:46 AM, Sebastian Schuberth
wrote:
> On Fri, Apr 1, 2016 at 2:16 PM, Johan Herland wrote:
>>> 3) Recursively list all blobs / trees (git-ls-tree) and look whether an
>>> object's hash is conatined in our table to get its notes.
>>>
>
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,
www.herland.net
--
To unsubscribe from this
On Fri, Apr 1, 2016 at 2:16 PM, Johan Herland 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
> type=$(git
eems ok enough to
> me.
Yes, given $whatever, we should first lookup $whatever, and only
failing that, we should try refs/notes/$whatever. Maybe it's also
worth trying refs/$whatever (before refs/notes/$whatever), since that
would be consistent with what's currently done for o
On Mon, Nov 16, 2015 at 12:23 AM, Jacob Keller wrote:
> On Sun, Nov 15, 2015 at 2:14 PM, Johan Herland wrote:
>> A related topic that has been discussed (although I cannot remember if
>> any conclusion was reached) is whether to allow more notes operations
>> - spe
should also become possible, although I
haven't thoroughly examined all implications.
...Johan
--
Johan Herland,
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 are no notes whatsoever, this variable is still
> `NULL`, even after initialization.
>
> So let's be graceful and just return if that data structure is `NULL`.
>
> Reported in https://github.com/msysgit/git/issues/363.
>
> Signed-off-by: Johannes Schindelin
Ac
more general
"notes.mergeStrategy".
Otherwise, the series (except possibly #4/#5, see separate discussion)
looks good to me.
...Johan
--
Johan Herland,
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
..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
--
Johan Herland,
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git&quo
le the "overwrite", which
> is basically a synonym of, I think "theirs" depending on the direction
> of the "merge".
Correct.
> I don't know if re-write actually supports manual mode at all!
It doesn't.
> Maybe we could make merge support
seful here, methinks:
must be the short name of a ref under 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,
www.herland.net
--
To unsubscribe f
ergestrategy::
Same here.
> + Which merge strategy to choose by default when resolving notes
> + conflicts. Must be one of `manual`, `ours`, `theirs`, `union`,
> + or `cat_sort_uniq`. Defaults to `manual`. See "NOTES MERGE
> + STRATEGIES" section a
t; think we can maintain expectations for the general user but I feel
> that any change here will break *someones* scripts.
As I said above: Punt on tags for now, and you might be able to not
break anyone's scripts (and if you do, it's probably a poorly written
script). Provided that y
gt; enforce these values always are fully qualified and begin with refs.
> Otherwise, use of --refs and the environment variable don't allow the
> same formats.
Agreed.
...Johan
> Regards,
> Jake
>
> [1] 8ef313e1ec3b ("builtin/notes.c: Split notes ref DWIMm
On Wed, Aug 12, 2015 at 4:26 AM, Junio C Hamano wrote:
> Johan Herland writes:
>> I know that we don't yet have a "proper" place to put remote notes refs,
>> but the in notes..merge _must_ be a "local" notes ref (you even
>> use the notation in t
On Tue, Aug 11, 2015 at 10:57 PM, Jacob Keller wrote:
> From: Jacob Keller
>
> Teach documentation about the cat_sort_uniq rewriteMode that got added
> at the same time as the equivalent merge strategy.
>
> Signed-off-by: Jacob Keller
Reviewed-by: Johan Herland
On Tue, Aug 11, 2015 at 10:57 PM, Jacob Keller wrote:
> From: Jacob Keller
>
> Add new tests to ensure that --commit, --abort, and --strategy are
> mutually exclusive.
>
> Signed-off-by: Jacob Keller
Reviewed-by: Johan Herland
--
Johan Herland,
www.herland.net
--
To uns
tegy instead? Or even better,
take inspiration from branch..mergeoptions, and provide
notes..mergeoptions instead, which you can then set like:
git config notes.foo.mergeoptions "--strategy=cat_sort_uniq"
Even though 'git notes merge' don't yet accept any other options that
should
s(git_notes_merge_usage, options);
> }
Do you need to look at the notes.merge config variable at all if
-s/--strategy is given?
I'd expect the above to rather look something like:
if (strategy) {
if (parse_notes_strategy(strategy, &o.strategy)) {
error(&
r
Still looks good to me, AFAICS. Feel free to add my Reviewed-by.
...Johan
--
Johan Herland,
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
in-progress
> for" err
> + ) &&
> + test_path_is_missing .git/worktrees/worktree/NOTES_MERGE_REF
> +'
> +
> +test_expect_success 'merge z into x while mid-merge on y succeeds' '
> + (
> + cd worktree2 &&
> +
d workflow is
to base your patch series on master or next, 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 Her
On Wed, Jul 29, 2015 at 6:37 PM, Junio C Hamano wrote:
> Johan Herland writes:
>> On Wed, Jul 29, 2015 at 7:01 AM, Junio C Hamano wrote:
>>> Johan Herland writes:
>>>
>>>> I believe it is a bad compromise. It complicates the code, and it
>>
On Wed, Jul 29, 2015 at 7:58 PM, David Turner wrote:
> + specially by git. Psuedorefs both have names that are all-caps,
s/Psuedo/Pseudo/
...Johan
--
Johan Herland,
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a mess
On Wed, Jul 29, 2015 at 7:01 AM, Junio C Hamano wrote:
> Johan Herland 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,
lso trying to do: David's topic should not
have to deal with NOTES_MERGE_* at all. Simply leave it all as
something that belongs in $GIT_COMMON_DIR, and let's solve concurrent
unrelated notes merges as a wholly independent, separate topic.
...Johan
--
Johan Herland,
www.herland.net
--
linked worktree effort, so this language is new to me. My apologies).
...Johan
--
Johan Herland,
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
On Wed, Jul 29, 2015 at 2:33 AM, Junio C Hamano wrote:
> Johan Herland 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.
On Wed, Jul 29, 2015 at 2:56 AM, Michael Haggerty wrote:
> Johan Herland 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 wants is
On Wed, Jul 29, 2015 at 12:52 AM, Junio C Hamano wrote:
> Johan Herland 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, b
On Wed, Jul 29, 2015 at 12:12 AM, Junio C Hamano wrote:
> David Turner 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 different worktrees don't point
>>
TIAL
.git/NOTES_MERGE_WORKTREE
you would have (assuming NOTES_MERGE_REF == refs/notes/foo):
.git/NOTES_MERGE/refs/notes/foo/REF
.git/NOTES_MERGE/refs/notes/foo/PARTIAL
.git/NOTES_MERGE/refs/notes/foo/WORKTREE
and then a simultaneous notes-merge on a different notes ref
(refs/notes/bar) woul
patch comes
with no tests. I'd like at least a couple 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,
www.herland.net
--
To unsubscri
er
> the notes tree is intended 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
Reviewed-by: J
side the
notes.h API (see commit_notes() in notes-utils.h/c), so there might be
room for more consolidation/refactoring here...
...Johan
--
Johan Herland,
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
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,
www.herland.net
--
To unsubscribe from this list: send the line &q
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,
www.herland.net
--
To unsu
same
> problem; it is meant to exit the loop early at a certain
> number of iterations. We can bump it into the conditional of
> the loop to make this more obvious.
>
> Signed-off-by: Jeff King
Acked-by: Johan Herland
--
Johan Herland,
www.herland.net
--
To unsubscribe from
On Sat, Feb 28, 2015 at 2:19 PM, Mårten Kongstad
wrote:
[...]
> Signed-off-by: Mårten Kongstad
Acked-by: Johan Herland
--
Johan Herland,
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
M
t;
> Signed-off-by: Kacper Kornet
Acked-by: Johan Herland
> ---
> 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
o graph the history using something
> that is not based on git log --graph?
>
> I've seen a couple of graphviz-based ones, but both failed to work out
> of the box for me.
>
> Thanks a lot for any pointer.
>
> --
> To unsubscribe from this list: send the line &q
(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" wrote:
> On Jan 6, 2015, at 02:20, Junio C Hamano wrote:
[...]
> At the point the dropped line runs, core.notesRef
itelist _without_ breaking those
>> who have already started using refs/remote-notes/*. That is why
>> I said whitelist is preferrable than blacklist.
I agree that a whitelist is preferable to a blacklist.
> A whitelist solves issue (1) but is no help for issue (2) unless some
> a
, because think about what happens on the next fanout with
> fast-import... adding one note would need to create millions of trees.
True, this is a good illustration of the difference between the notes
code in fast-import and git-notes. It might be possible to change the
fast-import code to wor
ag' command,
and we also the BNF at the top of fast-import.c needs corresponding updates.
Signed-off-by: Johan Herland
---
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
mand with the following 'filemodify'
"hack" to pre-load the existing notes tree without using it as a parent:
M 04 refs/notes/foo^{tree} \n
Discovered-by: Mike Hommey
Signed-off-by: Johan Herland
---
fast-import.c | 5 +++--
1 file changed, 3 insertions(+), 2
"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
Signed-off-by: Johan Herland
---
fast-import.c
e t 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
---
fast-import.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/fast-import.c b/fast-import.c
inde
IT
-AAA
Stage this hunk? YES
-BBB
Stage this hunk? 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
isting tree (and number of
> notes!) from a commit, but does not add it as a parent. AFAIK,
> fast-import doesn't have a way to do that.
>
> Probably the simplest thing is to build it with history via fast-import,
> and then just truncate the history at the end with:
>
from
repo-master (if those objects happen to be referenced from
repo-branchA|B). If you want to prevent the repos growing in size, you
must devise a way to add new objects into repo-master before
repo-branchA|B. (e.g. a nightly cron-job in repo-master that fetches
from origin), so that when repo-bran
On Wed, Nov 12, 2014 at 10:18 PM, Junio C Hamano wrote:
> Johan Herland writes:
>> On Wed, Nov 12, 2014 at 2:57 AM, Eric Sunshine
>> wrote:
>>> On Tue, Nov 11, 2014 at 7:40 PM, Johan Herland wrote:
>>>> + test_line_count = 1 actual
>>>
>&
On Wed, Nov 12, 2014 at 2:57 AM, Eric Sunshine wrote:
> On Tue, Nov 11, 2014 at 7:40 PM, Johan Herland wrote:
>> + test_line_count = 1 actual
>
> Broken &&-chain. This problem is repeated each place use invoke
> test_line_count().
Thanks. Fixed in the next itera
that unnecessarily split setup and verification.
Improved-by: Eric Sunshine
Improved-by: Junio C Hamano
Improved-by: Michael Blume
Improved-by: Jeff King
Signed-off-by: Johan Herland
---
t/t3301-notes.sh | 1300 +-
1 file changed, 601 inserti
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
Improved-by: Junio C Hamano
Signed-off-by: Johan Herland
---
t/t3301-notes.sh | 27
o C Hamano
Signed-off-by: Johan Herland
---
Documentation/git-notes.txt | 12
builtin/notes.c | 17 +++--
t/t3301-notes.sh| 10 +-
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-notes.txt b/Documentation/git
given (e.g. using -m "" or -F /dev/null).
The next patch contains a test that verifies the fixed behavior.
Found-by: Eric Sunshine
Signed-off-by: Johan Herland
---
builtin/notes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/notes.c b/builtin/notes.c
ind
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
---
notes.c | 3 +--
t/t3301-notes.sh | 12
2 files changed, 13 insertions(
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
Signed-off-by: Johan Herland
---
builtin/notes.c | 35 +--
1 file changed, 17 insertions(+), 18
_edit()), keeping the logic for writing the actual note
object in a separate function: write_note_data().
Suggested-by: Junio C Hamano
Signed-off-by: Johan Herland
---
builtin/notes.c | 103 +---
1 file changed, 54 insertions(+), 49 deletions(-)
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: Joh
ntents
of a note.
Also rename 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
---
builtin/notes.c | 109 --
Noticed
by Peff.
Have fun! :)
...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 n
On Tue, Nov 11, 2014 at 3:41 AM, Jeff King 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 i
On Tue, Nov 11, 2014 at 2:07 AM, Eric Sunshine wrote:
> On Mon, Nov 10, 2014 at 8:04 PM, Johan Herland wrote:
>> On Mon, Nov 10, 2014 at 9:42 PM, Junio C Hamano wrote:
>>> Johan Herland writes:
>>>
>>>> Make this test script appear somewhat less old-fashi
how HEAD^
@@ -102,7 +102,7 @@ test_expect_success 'can overwrite existing note
with "git notes add -f -m"' '
test_expect_success 'add w/no options on existing note morphs into edit' '
MSG=b2 git notes add &&
test_path_is_missing .git/NOTES_
On Mon, Nov 10, 2014 at 9:42 PM, Junio C Hamano wrote:
> Johan Herland writes:
>
>> Make this test script appear somewhat less old-fashioned:
>> - Use test helper functions:
>> - write_script
>> - test_commit
>> - test_write_lines
>>
On Mon, Nov 10, 2014 at 9:36 PM, Junio C Hamano wrote:
> Johan Herland writes:
>
>> Signed-off-by: Johan Herland
>> ---
>> builtin/notes.c | 12 +---
>> 1 file changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/builtin/notes.c b/builti
o C Hamano
Signed-off-by: Johan Herland
---
Documentation/git-notes.txt | 12
builtin/notes.c | 17 +++--
t/t3301-notes.sh| 10 +-
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-notes.txt b/Documentation/git
mproved-by: Junio C Hamano
Signed-off-by: Johan Herland
---
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..cd756ec 100755
--- a/t/t3301-notes.sh
+++
On Fri, Nov 7, 2014 at 7:04 PM, Junio C Hamano wrote:
> Johan Herland 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
>
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
---
notes.c | 3 +--
t/t3301-notes.sh | 12
2 files changed, 13 insertions(
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
Improved-by: Junio C Hamano
Signed-off-by: Johan Herland
---
t/t3301-notes.sh | 27
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: Joh
ntents
of a note.
Also rename 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
---
builtin/notes.c | 109 --
Signed-off-by: Johan Herland
---
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 append_edit(int argc, const
_edit()), keeping the logic for writing the actual note
object in a separate function: write_note_data().
Suggested-by: Junio C Hamano
Signed-off-by: Johan Herland
---
builtin/notes.c | 103 +---
1 file changed, 54 insertions(+), 49 deletions(-)
given (e.g. using -m "" or -F /dev/null).
The next patch contains a test that verifies the fixed behavior.
Found-by: Eric Sunshine
Signed-off-by: Johan Herland
---
builtin/notes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/notes.c b/builtin/notes.c
ind
fun! :)
...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: S
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
---
notes.c | 3 +--
t/t3301-notes.sh | 12
2 files changed, 13 insertions(
Signed-off-by: Johan Herland
---
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..80caee0 100755
given (e.g. using -m "" or -F /dev/null).
The next patch contains a test that verifies the fixed behavior.
Found-by: Eric Sunshine
Signed-off-by: Johan Herland
---
builtin/notes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/notes.c b/builtin/notes.c
ind
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
Improved-by: Junio C Hamano
Signed-off-by: Johan Herland
---
t/t3301-notes.sh | 27
follow-up patch (#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 tha
o C Hamano
Signed-off-by: Johan Herland
---
Documentation/git-notes.txt | 12
builtin/notes.c | 23 ++-
t/t3301-notes.sh| 10 +-
3 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/Documentation/git-notes.txt b/Documen
On Wed, Nov 5, 2014 at 8:00 PM, Junio C Hamano wrote:
> Johan Herland 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_missin
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
Signed-off-by: Johan Herland
---
t/t3312-notes-empty.sh | 48
altogether.
Introduce the --allow-empty option to the add/append/edit subcommands,
to explicitly allow an empty note to be stored into the notes tree.
Also update the documentation, and add test cases for the new option.
Reported-by: James H. Fisher
Improved-by: Kyle J. McKay
Signed-off-by: Joh
> 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-r
given (e.g. using -m "" or -F /dev/null).
The next patch contains a test that verifies the fixed behavior.
Found-by: Eric Sunshine
Signed-off-by: Johan Herland
---
builtin/notes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/notes.c b/builtin/notes.c
ind
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
---
t/t3312-notes-empty.sh | 58 ++
1 file
altogether.
Introduce the --allow-empty option to the add/append/edit subcommands,
to explicitly allow an empty note to be stored into the notes tree.
Also update the documentation, and add test cases for the new option.
Reported-by: James H. Fisher
Improved-by: Kyle J. McKay
Signed-off-by: Joh
1 - 100 of 344 matches
Mail list logo