{"thread":{"id":"40018","subject":"[PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)","startedAt":"2015-08-05T14:21:27Z","lastAt":"2015-08-06T07:41:05Z","messageCount":5,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"267513","messageId":"1438784487-9176-1-git-send-email-avarab@gmail.com","threadId":"40018","inReplyTo":null,"subject":"[PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2015-08-05T14:21:27Z","receivedAt":"2015-08-05T14:21:27Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"When you look at the history for a file via \"git log\" we don't show\n--full-history by default, but the Gitweb UI does so, which can be very\nconfusing for all the reasons discussed in \"History Simplification\" in\ngit-log(1) and in\nhttp://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659\n\nWe've been doing history via --full-history since pretty much forever,\nbut I think this is much more usable, and on a typical project with lots\nof branches being merged it makes for a much less confusing view. We do\nthis for git log by default, why wouldn't Gitweb follow suit?\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n gitweb/gitweb.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 7a5b23a..2913896 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -7387,7 +7387,7 @@ sub git_log_generic {\n \t}\n \tmy @commitlist =\n \t\tparse_commits($commit_hash, 101, (100 * $page),\n-\t\t              defined $file_name ? ($file_name, \"--full-history\") : ());\n+\t\t              defined $file_name ? $file_name : ());\n \n \tmy $ftype;\n \tif (!defined $file_hash && defined $file_name) {\n-- \n2.1.3\n"},{"id":"267519","messageId":"xmqqr3nh4qx5.fsf@gitster.dls.corp.google.com","threadId":"40018","inReplyTo":"1438784487-9176-1-git-send-email-avarab@gmail.com","subject":"Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-05T16:54:14Z","receivedAt":"2015-08-05T16:54:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> When you look at the history for a file via \"git log\" we don't show\n> --full-history by default, but the Gitweb UI does so, which can be very\n> confusing for all the reasons discussed in \"History Simplification\" in\n> git-log(1) and in\n> http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659\n>\n> We've been doing history via --full-history since pretty much forever,\n> but I think this is much more usable, and on a typical project with lots\n> of branches being merged it makes for a much less confusing view. We do\n> this for git log by default, why wouldn't Gitweb follow suit?\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90758 \n\nseems to agree with you in principle that this would be what gitweb\nshould do if it were written today.\n"},{"id":"267544","messageId":"CACBZZX5GvCqx3LkWBDb4kDFpyaEwK-Fnhtof6nhKsctmx22m1g@mail.gmail.com","threadId":"40018","inReplyTo":"xmqqr3nh4qx5.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2015-08-05T21:28:38Z","receivedAt":"2015-08-05T21:28:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Aug 5, 2015 at 6:54 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n>\n>> When you look at the history for a file via \"git log\" we don't show\n>> --full-history by default, but the Gitweb UI does so, which can be very\n>> confusing for all the reasons discussed in \"History Simplification\" in\n>> git-log(1) and in\n>> http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659\n>>\n>> We've been doing history via --full-history since pretty much forever,\n>> but I think this is much more usable, and on a typical project with lots\n>> of branches being merged it makes for a much less confusing view. We do\n>> this for git log by default, why wouldn't Gitweb follow suit?\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90758\n>\n> seems to agree with you in principle that this would be what gitweb\n> should do if it were written today.\n\nI'm reminded of the make(1) story about not supporting spaces instead\nof tabs because the guy already had a few dozen users.\n\nWe could have changed this in 2008, when Git already had much fewer\nusers, and I think we can still change it. It makes more sense as a\ndefault, especially on busy repos with lots of merges. At work where\nlots of merges are in flight literally 1/10 commits for any given file\nis relevant.\n\nWho'd be linking to gitweb's log output expecting its semantics to\nnever change, and is use case more important than having a saner view\nfor the vast majority of users who are just browsing around?\n\nBut if there's strong objections to it a coworker who encountered this\nmade a patch to it to add an extra \"full history\" an addition to the\n\"history\" view (which would change, but not the permalinks), in case\nthere were objections to just changing it.\n"},{"id":"267548","messageId":"xmqqvbct1kb3.fsf@gitster.dls.corp.google.com","threadId":"40018","inReplyTo":"CACBZZX5GvCqx3LkWBDb4kDFpyaEwK-Fnhtof6nhKsctmx22m1g@mail.gmail.com","subject":"Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-05T21:45:20Z","receivedAt":"2015-08-05T21:45:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> I'm reminded of the make(1) story about not supporting spaces instead\n> of tabs because the guy already had a few dozen users.\n>\n> We could have changed this in 2008, when Git already had much fewer\n> users,\n\nHeh, in 2008 we already had more than a few dozen.\n\nI think\n\n (1) It is perfectly OK to add an UI option to let the web visitor\n     choose between simplified and full history at runtime,\n     optionally with a new gitweb.conf option to let the project\n     owner choose which one is the default;\n\n (2) It is also OK to add gitweb.conf option to let the project/site\n     choose between the two, optionally allowing the web visitor to\n     override it with something like (1).\n\nAnything else would not give the same out-of-the-box experience and\nwould probably not fly well.\n"},{"id":"267560","messageId":"xmqqy4hozwxa.fsf@gitster.dls.corp.google.com","threadId":"40018","inReplyTo":"xmqqvbct1kb3.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-06T07:41:05Z","receivedAt":"2015-08-06T07:41:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Heh, in 2008 we already had more than a few dozen.\n>\n> I think\n>\n>  (1) It is perfectly OK to add an UI option to let the web visitor\n>      choose between simplified and full history at runtime,\n>      optionally with a new gitweb.conf option to let the project\n>      owner choose which one is the default;\n>\n>  (2) It is also OK to add gitweb.conf option to let the project/site\n>      choose between the two, optionally allowing the web visitor to\n>      override it with something like (1).\n>\n> Anything else would not give the same out-of-the-box experience and\n> would probably not fly well.\n\nJust to make sure, \"would not fly well\" is not an outright rejection\n(given enough thrust, even a pig could fly).\n\nAn alternative with a bit more friction may be to do a variant of\n(2), without UI but only with gitweb.conf tweakability, _and_\nflipped default.  That will break the out-of-the-box experience but\nI suspect that many people would not notice (because their history\nis linear), some people who do notice would like the change, and the\nremainder can tweak their installation back to the full-history\nversion, as long the change of the default is prominently\nadvertised.\n"}]}