{"thread":{"id":"27784","subject":"[PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","startedAt":"2011-07-11T09:14:18Z","lastAt":"2011-07-12T17:03:14Z","messageCount":6,"participants":["Bert Wesarg","Junio C Hamano","Michael Haggerty"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"171048","messageId":"c63583df97ff8dd596d16d4471041d6ebedb67e8.1310375571.git.bert.wesarg@googlemail.com","threadId":"27784","inReplyTo":null,"subject":"[PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2011-07-11T09:14:18Z","receivedAt":"2011-07-11T09:14:18Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"The documentation for logging updates in git-update-ref, doesn't make it\nclear that only a specific subset of refs are honored by this variable.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n\n---\n\nThe initial justification in 4057deb (Junio C Hamano, 2006-10-08), leaves\nthe impression, that a blacklist would have made more sense, than the\ncurrent whitelist. Maybe we can change this?\n---\n Documentation/config.txt         |    4 +++-\n Documentation/git-update-ref.txt |    5 +++--\n 2 files changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex c631d1c..dd44122 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -344,7 +344,9 @@ core.logAllRefUpdates::\n \tSHA1, the date/time and the reason of the update, but\n \tonly when the file exists.  If this configuration\n \tvariable is set to true, missing \"$GIT_DIR/logs/<ref>\"\n-\tfile is automatically created for branch heads.\n+\tfile is automatically created for branch heads (i.e. under\n+\trefs/heads/), remote reafs (i.e. under refs/remotes/),\n+\tnote refs (i.e. under refs/notes/), and the symbolic ref HEAD.\n +\n This information can be used to determine what commit\n was the tip of a branch \"2 days ago\".\ndiff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt\nindex e25a65a..18fce69 100644\n--- a/Documentation/git-update-ref.txt\n+++ b/Documentation/git-update-ref.txt\n@@ -60,8 +60,9 @@ still contains <oldvalue>.\n \n Logging Updates\n ---------------\n-If config parameter \"core.logAllRefUpdates\" is true or the file\n-\"$GIT_DIR/logs/<ref>\" exists then `git update-ref` will append\n+If config parameter \"core.logAllRefUpdates\" is true and the ref is one under\n+\"refs/heads/\", \"refs/remotes/\", \"refs/notes/\", or the symbolic ref HEAD; or\n+the file \"$GIT_DIR/logs/<ref>\" exists then `git update-ref` will append\n a line to the log file \"$GIT_DIR/logs/<ref>\" (dereferencing all\n symbolic refs before creating the log name) describing the change\n in ref value.  Log lines are formatted as:\n-- \n1.7.5.517.g10515\n"},{"id":"171088","messageId":"7v7h7og1zo.fsf@alter.siamese.dyndns.org","threadId":"27784","inReplyTo":"c63583df97ff8dd596d16d4471041d6ebedb67e8.1310375571.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-07-11T17:29:15Z","receivedAt":"2011-07-11T17:29:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n> The documentation for logging updates in git-update-ref, doesn't make it\n> clear that only a specific subset of refs are honored by this variable.\n\nThanks.\n\n> The initial justification in 4057deb (Junio C Hamano, 2006-10-08), leaves\n> the impression, that a blacklist would have made more sense,...\n\nI didn't mean it that way, and I still don't think blacklisting is\nfeasible nor necessarily desirable. Different porcelains can use\nnamespaces under refs/ for their own purposes, and it would be more\nprudent not to create reflog files that can grow long and not useful\ngiven that we cannot predict/guess what they are used for and how, so\nI would prefer white-listing the ones that are known to be useful.\n\nIt might make sense to allow customizing the white-list via the\nconfiguration mechanism, though. When your favorite third-party git\n\"frotz\" add-on uses refs/frotz/ hierarchy for its own purpose, and if\nviewing \"git log -g frotz/master@{now}\" is useful, you may want to be able\nto say \"In addition to the standard ones, please log refs/frotz/*\nautomatically\". Of the top of my head, something like:\n\n\t[core]\n\t\tautoRefLog = refs/heads/*\n\t\tautoRefLog = refs/remotes/*\n\t\tautoRefLog = refs/notes/*\n\nor less expressive but even simpler and probably sufficient:\n\n\t[core]\n        \tautoRefLog = heads remotes notes\n\ncan be the spelled-out form of traditional \"core.logAllRefUpdates\", and\nyou may be able to tweak it like:\n\n\n\t[core]\n        \tautoRefLog = heads remotes notes frotz\n"},{"id":"171096","messageId":"CAKPyHN3aef5MQh+rv4O07vrVbzziTj+==2H-hKM1XwUwCOqq6Q@mail.gmail.com","threadId":"27784","inReplyTo":"7v7h7og1zo.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2011-07-11T18:23:17Z","receivedAt":"2011-07-11T18:23:17Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Mon, Jul 11, 2011 at 19:29, Junio C Hamano <gitster@pobox.com> wrote:\n> Bert Wesarg <bert.wesarg@googlemail.com> writes:\n>\n>> The documentation for logging updates in git-update-ref, doesn't make it\n>> clear that only a specific subset of refs are honored by this variable.\n>\n> Thanks.\n>\n>> The initial justification in 4057deb (Junio C Hamano, 2006-10-08), leaves\n>> the impression, that a blacklist would have made more sense,...\n>\n> I didn't mean it that way, and I still don't think blacklisting is\n> feasible nor necessarily desirable. Different porcelains can use\n> namespaces under refs/ for their own purposes, and it would be more\n> prudent not to create reflog files that can grow long and not useful\n> given that we cannot predict/guess what they are used for and how, so\n> I would prefer white-listing the ones that are known to be useful.\n>\n> It might make sense to allow customizing the white-list via the\n> configuration mechanism, though. When your favorite third-party git\n> \"frotz\" add-on uses refs/frotz/ hierarchy for its own purpose, and if\n> viewing \"git log -g frotz/master@{now}\" is useful, you may want to be able\n> to say \"In addition to the standard ones, please log refs/frotz/*\n> automatically\". Of the top of my head, something like:\n\nThis sounds like a good idea, and with the -c option you could use it like this:\n\n    git -c core.autoLogRef=frotz update-ref -m foo refs/frotz/master <sha1>\n\nwithout having the trouble to set this config inside git-frotz\n\nActually, I tried also to add something like --force or --always-log\nas an option to update-ref, so that the log file is created\nautomatically. But that doesn't looked that trivial.\n\n>\n>        [core]\n>                autoRefLog = refs/heads/*\n>                autoRefLog = refs/remotes/*\n>                autoRefLog = refs/notes/*\n>\n> or less expressive but even simpler and probably sufficient:\n>\n>        [core]\n>                autoRefLog = heads remotes notes\n>\n> can be the spelled-out form of traditional \"core.logAllRefUpdates\", and\n> you may be able to tweak it like:\n>\n>\n>        [core]\n>                autoRefLog = heads remotes notes frotz\n>\n\nThe question is: should the user be able to disable logging of the\nhard-coded values. With your examples that would be possible. But I\nthink we should not allow that. Thus, this config should only adds to\nthe list, but never resets.\n\nBert\n"},{"id":"171110","messageId":"7vaackbjed.fsf@alter.siamese.dyndns.org","threadId":"27784","inReplyTo":"CAKPyHN3aef5MQh+rv4O07vrVbzziTj+==2H-hKM1XwUwCOqq6Q@mail.gmail.com","subject":"Re: [PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-07-11T21:24:26Z","receivedAt":"2011-07-11T21:24:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bert Wesarg <bert.wesarg@googlemail.com> writes:\n\n> The question is: should the user be able to disable logging of the\n> hard-coded values. With your examples that would be possible. But I\n> think we should not allow that.\n\nYou have to justify that position. I do not see any reason to forbid\nmyself from declining reflog for refs/remotes/ while still logging the\nupdates to my refs/heads/.\n"},{"id":"171121","messageId":"4E1BCFF8.9030000@alum.mit.edu","threadId":"27784","inReplyTo":"c63583df97ff8dd596d16d4471041d6ebedb67e8.1310375571.git.bert.wesarg@googlemail.com","subject":"Re: [PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2011-07-12T04:39:20Z","receivedAt":"2011-07-12T04:39:20Z","isPatch":true,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Minor typo; see below.\n\nOn 07/11/2011 11:14 AM, Bert Wesarg wrote:\n> The documentation for logging updates in git-update-ref, doesn't make it\n> clear that only a specific subset of refs are honored by this variable.\n> \n> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\n> \n> ---\n> \n> The initial justification in 4057deb (Junio C Hamano, 2006-10-08), leaves\n> the impression, that a blacklist would have made more sense, than the\n> current whitelist. Maybe we can change this?\n> ---\n>  Documentation/config.txt         |    4 +++-\n>  Documentation/git-update-ref.txt |    5 +++--\n>  2 files changed, 6 insertions(+), 3 deletions(-)\n> \n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index c631d1c..dd44122 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -344,7 +344,9 @@ core.logAllRefUpdates::\n>  \tSHA1, the date/time and the reason of the update, but\n>  \tonly when the file exists.  If this configuration\n>  \tvariable is set to true, missing \"$GIT_DIR/logs/<ref>\"\n> -\tfile is automatically created for branch heads.\n> +\tfile is automatically created for branch heads (i.e. under\n> +\trefs/heads/), remote reafs (i.e. under refs/remotes/),\n\ns/reafs/refs/\n\n-- \nMichael Haggerty\nmhagger@alum.mit.edu\nhttp://softwareswirl.blogspot.com/\n"},{"id":"171162","messageId":"CAKPyHN1VgG0A9+NpPS=d5hcBahr49f7oM1JonNEohyQx3=0AHg@mail.gmail.com","threadId":"27784","inReplyTo":"4E1BCFF8.9030000@alum.mit.edu","subject":"Re: [PATCH] Documentation: clearly specify what refs are honored by core.logAllRefUpdates","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2011-07-12T17:03:14Z","receivedAt":"2011-07-12T17:03:14Z","isPatch":true,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Tue, Jul 12, 2011 at 06:39, Michael Haggerty <mhagger@alum.mit.edu> wrote:\n> Minor typo; see below.\n>> +     refs/heads/), remote reafs (i.e. under refs/remotes/),\n>\n> s/reafs/refs/\n\nThanks.\n\nJunio, you applied this already to pu, do you need a patch?\n\nBert\n"}]}