Re: [RFC PATCH v2 11/11] filter-branch: learn how to filter notes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Rast schrieb:
+--notes-filter <command>::
+	This filter rewrites the notes (see linkgit:git-notes[1]).  It
+	gets the old notes on standard input, and its standard output
+	is written as the new note (overwriting any existing notes).
++
+Defaults to doing nothing, unless the `notes.rewrite.filter-branch`
+option is set, in which case it copies the notes (i.e., defaults to
+`cat`).
++
+In addition to the usual variables, GIT_NEW_COMMIT is set to the
+result of the rewriting so that the filter can get at the existing
+notes, if any.

I think that this form of --notes-filter is not flexible enough.

1. There is no possibility for the filter to decide whether the note should be attached to the rewritten commit or not.

2. The implementation is not concerned about different notes namespaces (IIUC).

3. There is probably more.

One use-case that comes to mind is to move notes from one particular namespace to a different one (and I mean move, not just copy). Don't know if 'git notes' itself has such a feature.

I am not a 'git notes' user at this time, nor do I know anything about the implementation, nor did I follow any discussions about notes, hence, I'm not in the position to judge what --notes-filter could be useful for. I know I talked you into implementing it, but that is just because I dislike that filter-branch calls a post-rewrite hook (that just doesn't sound right to me, given the one-shot nature of filter-branch), and your intention obviously was to transfer notes.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]