Re: [PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-06 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes:

 Heh, in 2008 we already had more than a few dozen.

 I think

  (1) It is perfectly OK to add an UI option to let the web visitor
  choose between simplified and full history at runtime,
  optionally with a new gitweb.conf option to let the project
  owner choose which one is the default;

  (2) It is also OK to add gitweb.conf option to let the project/site
  choose between the two, optionally allowing the web visitor to
  override it with something like (1).

 Anything else would not give the same out-of-the-box experience and
 would probably not fly well.

Just to make sure, would not fly well is not an outright rejection
(given enough thrust, even a pig could fly).

An alternative with a bit more friction may be to do a variant of
(2), without UI but only with gitweb.conf tweakability, _and_
flipped default.  That will break the out-of-the-box experience but
I suspect that many people would not notice (because their history
is linear), some people who do notice would like the change, and the
remainder can tweak their installation back to the full-history
version, as long the change of the default is prominently
advertised.
--
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


[PATCH/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Ævar Arnfjörð Bjarmason
When you look at the history for a file via git log we don't show
--full-history by default, but the Gitweb UI does so, which can be very
confusing for all the reasons discussed in History Simplification in
git-log(1) and in
http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659

We've been doing history via --full-history since pretty much forever,
but I think this is much more usable, and on a typical project with lots
of branches being merged it makes for a much less confusing view. We do
this for git log by default, why wouldn't Gitweb follow suit?

Signed-off-by: Ævar Arnfjörð Bjarmason ava...@gmail.com
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7a5b23a..2913896 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -7387,7 +7387,7 @@ sub git_log_generic {
}
my @commitlist =
parse_commits($commit_hash, 101, (100 * $page),
- defined $file_name ? ($file_name, 
--full-history) : ());
+ defined $file_name ? $file_name : ());
 
my $ftype;
if (!defined $file_hash  defined $file_name) {
-- 
2.1.3

--
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/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason  ava...@gmail.com writes:

 When you look at the history for a file via git log we don't show
 --full-history by default, but the Gitweb UI does so, which can be very
 confusing for all the reasons discussed in History Simplification in
 git-log(1) and in
 http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659

 We've been doing history via --full-history since pretty much forever,
 but I think this is much more usable, and on a typical project with lots
 of branches being merged it makes for a much less confusing view. We do
 this for git log by default, why wouldn't Gitweb follow suit?

http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90758 

seems to agree with you in principle that this would be what gitweb
should do if it were written today.
--
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/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 5, 2015 at 6:54 PM, Junio C Hamano gits...@pobox.com wrote:
 Ævar Arnfjörð Bjarmason  ava...@gmail.com writes:

 When you look at the history for a file via git log we don't show
 --full-history by default, but the Gitweb UI does so, which can be very
 confusing for all the reasons discussed in History Simplification in
 git-log(1) and in
 http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659

 We've been doing history via --full-history since pretty much forever,
 but I think this is much more usable, and on a typical project with lots
 of branches being merged it makes for a much less confusing view. We do
 this for git log by default, why wouldn't Gitweb follow suit?

 http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90758

 seems to agree with you in principle that this would be what gitweb
 should do if it were written today.

I'm reminded of the make(1) story about not supporting spaces instead
of tabs because the guy already had a few dozen users.

We could have changed this in 2008, when Git already had much fewer
users, and I think we can still change it. It makes more sense as a
default, especially on busy repos with lots of merges. At work where
lots of merges are in flight literally 1/10 commits for any given file
is relevant.

Who'd be linking to gitweb's log output expecting its semantics to
never change, and is use case more important than having a saner view
for the vast majority of users who are just browsing around?

But if there's strong objections to it a coworker who encountered this
made a patch to it to add an extra full history an addition to the
history view (which would change, but not the permalinks), in case
there were objections to just changing it.
--
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/RFC] gitweb: Don't pass --full-history to git-log(1)

2015-08-05 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason ava...@gmail.com writes:

 I'm reminded of the make(1) story about not supporting spaces instead
 of tabs because the guy already had a few dozen users.

 We could have changed this in 2008, when Git already had much fewer
 users,

Heh, in 2008 we already had more than a few dozen.

I think

 (1) It is perfectly OK to add an UI option to let the web visitor
 choose between simplified and full history at runtime,
 optionally with a new gitweb.conf option to let the project
 owner choose which one is the default;

 (2) It is also OK to add gitweb.conf option to let the project/site
 choose between the two, optionally allowing the web visitor to
 override it with something like (1).

Anything else would not give the same out-of-the-box experience and
would probably not fly well.

--
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