* Re: [PATCH] gitweb: Support hiding of chosen repositories from project list
From: Junio C Hamano @ 2006-10-07 19:50 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
In-Reply-To: <20061007123200.GY20017@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> (BTW, I privately consider /pub/git as completely specific to kernel.org
> setup and pure evil to have as default; I would much prefer to have the
> default something more standard and LHS-compliant like /srv/git (almost)
> is. Though I can see the possible pitfalls of changing the default at
> this point (though Google says that only tipc.cslab.ericsson.net uses
> the same path), this default leads to people inventing own random paths
> and chaos reigns: /var/git in Gentoo, /srv/git in SUSE, abomination like
> /var/cache/git (!) in Debian, others don't seem to bother with gitweb.)
While I share the same concern to some degree, distro's usually
use whatever path they want to be consistent with their layout
(which I hope to converge to LHS or something). As long as we
have it easily overridable from their build system (which we do)
it should not matter too much for them. For people who build
and install their own, I suspect most of them do so because they
do not either like the version installed by the sysadmin or they
cannot write into system-wide directories, so to them the path
needs to be redefined to point at elsewhere anyway and would not
be an issue either. But my guess might be grossly wrong.
^ permalink raw reply
* Re: [RFC PATCH] Add WEBDAV timeout to http-fetch.
From: Panagiotis Issaris @ 2006-10-07 19:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Sean, git, Panagiotis Issaris, Nick Hengeveld
In-Reply-To: <7viriwsa75.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, Oct 07, 2006 at 03:15:58AM -0700, Junio C Hamano wrote:
> > This patch sets the CURL timeout to two minutes so that things proceed
> > sooner. Even with this patch it takes two extra minutes of "dead time"
> > to complete all operations; obivously this still sucks.
> >
> > However, I don't know if the two minute timeout is long enough for
> > all cases with a server where WEBDAV is functioning properly.
> > Hopefully someone who knows more about Curl can comment and perhaps
> > offer another solution.
> >
> > Maybe the real solution is just to figure out and fix whatever is
> > going on with the WEBDAV server and forget this patch.
>
> I think it is prudent to protect the client from a broken server
> and it is independent from "fixing" the server side. It would
>[...]
Wouldn't most users ctrl-c the program before the two minute timeout occurs?
Especially since their appears to be nothing happening?
With friendly regards,
Takis
^ permalink raw reply
* [PATCH] test-lib: separate individual test better in verbose mode.
From: Martin Waitz @ 2006-10-07 19:27 UTC (permalink / raw)
To: git
When running tests with --verbose it is difficult to see where
one test starts and where it ends because everything is printed
in one big lump.
Fix that by printing one single newline between each test.
Signed-off-by: Martin Waitz <tali@admingilde.org>
---
t/test-lib.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b523fef..2488e6e 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -135,6 +135,7 @@ test_expect_failure () {
else
test_failure_ "$@"
fi
+ echo >&3 ""
}
test_expect_success () {
@@ -148,6 +149,7 @@ test_expect_success () {
else
test_failure_ "$@"
fi
+ echo >&3 ""
}
test_expect_code () {
@@ -161,6 +163,7 @@ test_expect_code () {
else
test_failure_ "$@"
fi
+ echo >&3 ""
}
# Most tests can use the created repository, but some amy need to create more.
--
1.4.2.3
--
Martin Waitz
^ permalink raw reply related
* Re: [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
From: Petr Baudis @ 2006-10-07 19:15 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Junio C Hamano, git
In-Reply-To: <20061007185253.90045.qmail@web31810.mail.mud.yahoo.com>
Dear diary, on Sat, Oct 07, 2006 at 08:52:53PM CEST, I got a letter
where Luben Tuikov <ltuikov@yahoo.com> said that...
> Another thing is that currently tree/directory entries' third (links)
> column to be shortest of all, and this gives my eyes another indication
> that this is a tree.
What would people think about first listing all the trees, then all the
blobs? Just like LANG=C ls does, as well as cvsweb and overally most of
the rest of the relevant world.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* Re: [PATCH 2/2] gitweb: Show trailing slash when listing tree entry in tree listing
From: Petr Baudis @ 2006-10-07 19:12 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <eg8tpu$drj$1@sea.gmane.org>
Dear diary, on Sat, Oct 07, 2006 at 09:06:25PM CEST, I got a letter
where Jakub Narebski <jnareb@gmail.com> said that...
> Luben Tuikov wrote:
>
> > --- Petr Baudis <pasky@suse.cz> wrote:
> >> + esc_html($t->{'name'} . '/'));
> >
> > First, this is a Unixism, and would confuse other OS users.
drwxr-xr-x
> By the way, I miss somewhat the "redundant" tree/blob links in tree
> view...
I didn't want to post about it but I share the feeling - I have to keep
thinking consciously about clicking on the file name instead of on the
view name - and the situation is worse for regular files, since it is
not really apparent that the filenames are clickablea. My mind knows
that I'm supposed to click on them (not users' mind!), but the eyes and
hands are still clueless.
So, I'd like to either have the view links or the filenames in classical
link style so that it's apparent they are clickable; I didn't post a
patch since I didn't have time/energy to fight for it yet. ;-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* [PATCH] git-commit: fix coding style.
From: Martin Waitz @ 2006-10-07 19:07 UTC (permalink / raw)
To: git
git-commit.sh was using a mixture of spaces and tabs for indentation.
This is changed to one tab per indentation level.
No code changes.
Signed-off-by: Martin Waitz <tali@admingilde.org>
---
git-commit.sh | 464 +++++++++++++++++++++++++++++----------------------------
1 files changed, 233 insertions(+), 231 deletions(-)
diff --git a/git-commit.sh b/git-commit.sh
index 6f6cbda..5b1cf85 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -41,21 +41,21 @@ run_status () {
# so the regular index file is what we use to compare.
if test '' != "$TMP_INDEX"
then
- GIT_INDEX_FILE="$TMP_INDEX"
- export GIT_INDEX_FILE
+ GIT_INDEX_FILE="$TMP_INDEX"
+ export GIT_INDEX_FILE
elif test -f "$NEXT_INDEX"
then
- GIT_INDEX_FILE="$NEXT_INDEX"
- export GIT_INDEX_FILE
+ GIT_INDEX_FILE="$NEXT_INDEX"
+ export GIT_INDEX_FILE
fi
- case "$status_only" in
- t) color= ;;
- *) color=--nocolor ;;
- esac
- git-runstatus ${color} \
- ${verbose:+--verbose} \
- ${amend:+--amend} \
+ case "$status_only" in
+ t) color= ;;
+ *) color=--nocolor ;;
+ esac
+ git-runstatus ${color} \
+ ${verbose:+--verbose} \
+ ${amend:+--amend} \
${untracked_files:+--untracked}
}
@@ -87,179 +87,181 @@ only_include_assumed=
untracked_files=
while case "$#" in 0) break;; esac
do
- case "$1" in
- -F|--F|-f|--f|--fi|--fil|--file)
- case "$#" in 1) usage ;; esac
- shift
- no_edit=t
- log_given=t$log_given
- logfile="$1"
- shift
- ;;
- -F*|-f*)
- no_edit=t
- log_given=t$log_given
- logfile=`expr "z$1" : 'z-[Ff]\(.*\)'`
- shift
- ;;
- --F=*|--f=*|--fi=*|--fil=*|--file=*)
- no_edit=t
- log_given=t$log_given
- logfile=`expr "z$1" : 'z-[^=]*=\(.*\)'`
- shift
- ;;
- -a|--a|--al|--all)
- all=t
- shift
- ;;
- --au=*|--aut=*|--auth=*|--autho=*|--author=*)
- force_author=`expr "z$1" : 'z-[^=]*=\(.*\)'`
- shift
- ;;
- --au|--aut|--auth|--autho|--author)
- case "$#" in 1) usage ;; esac
- shift
- force_author="$1"
- shift
- ;;
- -e|--e|--ed|--edi|--edit)
- edit_flag=t
- shift
- ;;
- -i|--i|--in|--inc|--incl|--inclu|--includ|--include)
- also=t
- shift
- ;;
- -o|--o|--on|--onl|--only)
- only=t
- shift
- ;;
- -m|--m|--me|--mes|--mess|--messa|--messag|--message)
- case "$#" in 1) usage ;; esac
- shift
- log_given=m$log_given
- if test "$log_message" = ''
- then
- log_message="$1"
- else
- log_message="$log_message
+ case "$1" in
+ -F|--F|-f|--f|--fi|--fil|--file)
+ case "$#" in 1) usage ;; esac
+ shift
+ no_edit=t
+ log_given=t$log_given
+ logfile="$1"
+ shift
+ ;;
+ -F*|-f*)
+ no_edit=t
+ log_given=t$log_given
+ logfile=`expr "z$1" : 'z-[Ff]\(.*\)'`
+ shift
+ ;;
+ --F=*|--f=*|--fi=*|--fil=*|--file=*)
+ no_edit=t
+ log_given=t$log_given
+ logfile=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+ shift
+ ;;
+ -a|--a|--al|--all)
+ all=t
+ shift
+ ;;
+ --au=*|--aut=*|--auth=*|--autho=*|--author=*)
+ force_author=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+ shift
+ ;;
+ --au|--aut|--auth|--autho|--author)
+ case "$#" in 1) usage ;; esac
+ shift
+ force_author="$1"
+ shift
+ ;;
+ -e|--e|--ed|--edi|--edit)
+ edit_flag=t
+ shift
+ ;;
+ -i|--i|--in|--inc|--incl|--inclu|--includ|--include)
+ also=t
+ shift
+ ;;
+ -o|--o|--on|--onl|--only)
+ only=t
+ shift
+ ;;
+ -m|--m|--me|--mes|--mess|--messa|--messag|--message)
+ case "$#" in 1) usage ;; esac
+ shift
+ log_given=m$log_given
+ if test "$log_message" = ''
+ then
+ log_message="$1"
+ else
+ log_message="$log_message
$1"
- fi
- no_edit=t
- shift
- ;;
- -m*)
- log_given=m$log_given
- if test "$log_message" = ''
- then
- log_message=`expr "z$1" : 'z-m\(.*\)'`
- else
- log_message="$log_message
+ fi
+ no_edit=t
+ shift
+ ;;
+ -m*)
+ log_given=m$log_given
+ if test "$log_message" = ''
+ then
+ log_message=`expr "z$1" : 'z-m\(.*\)'`
+ else
+ log_message="$log_message
`expr "z$1" : 'z-m\(.*\)'`"
- fi
- no_edit=t
- shift
- ;;
- --m=*|--me=*|--mes=*|--mess=*|--messa=*|--messag=*|--message=*)
- log_given=m$log_given
- if test "$log_message" = ''
- then
- log_message=`expr "z$1" : 'z-[^=]*=\(.*\)'`
- else
- log_message="$log_message
+ fi
+ no_edit=t
+ shift
+ ;;
+ --m=*|--me=*|--mes=*|--mess=*|--messa=*|--messag=*|--message=*)
+ log_given=m$log_given
+ if test "$log_message" = ''
+ then
+ log_message=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+ else
+ log_message="$log_message
`expr "z$1" : 'zq-[^=]*=\(.*\)'`"
- fi
- no_edit=t
- shift
- ;;
- -n|--n|--no|--no-|--no-v|--no-ve|--no-ver|--no-veri|--no-verif|--no-verify)
- verify=
- shift
- ;;
- --a|--am|--ame|--amen|--amend)
- amend=t
- log_given=t$log_given
- use_commit=HEAD
- shift
- ;;
- -c)
- case "$#" in 1) usage ;; esac
- shift
- log_given=t$log_given
- use_commit="$1"
- no_edit=
- shift
- ;;
- --ree=*|--reed=*|--reedi=*|--reedit=*|--reedit-=*|--reedit-m=*|\
- --reedit-me=*|--reedit-mes=*|--reedit-mess=*|--reedit-messa=*|\
- --reedit-messag=*|--reedit-message=*)
- log_given=t$log_given
- use_commit=`expr "z$1" : 'z-[^=]*=\(.*\)'`
- no_edit=
- shift
- ;;
- --ree|--reed|--reedi|--reedit|--reedit-|--reedit-m|--reedit-me|\
- --reedit-mes|--reedit-mess|--reedit-messa|--reedit-messag|--reedit-message)
- case "$#" in 1) usage ;; esac
- shift
- log_given=t$log_given
- use_commit="$1"
- no_edit=
- shift
- ;;
- -C)
- case "$#" in 1) usage ;; esac
- shift
- log_given=t$log_given
- use_commit="$1"
- no_edit=t
- shift
- ;;
- --reu=*|--reus=*|--reuse=*|--reuse-=*|--reuse-m=*|--reuse-me=*|\
- --reuse-mes=*|--reuse-mess=*|--reuse-messa=*|--reuse-messag=*|\
- --reuse-message=*)
- log_given=t$log_given
- use_commit=`expr "z$1" : 'z-[^=]*=\(.*\)'`
- no_edit=t
- shift
- ;;
- --reu|--reus|--reuse|--reuse-|--reuse-m|--reuse-me|--reuse-mes|\
- --reuse-mess|--reuse-messa|--reuse-messag|--reuse-message)
- case "$#" in 1) usage ;; esac
- shift
- log_given=t$log_given
- use_commit="$1"
- no_edit=t
- shift
- ;;
- -s|--s|--si|--sig|--sign|--signo|--signof|--signoff)
- signoff=t
- shift
- ;;
- -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
- verbose=t
- shift
- ;;
- -u|--u|--un|--unt|--untr|--untra|--untrac|--untrack|--untracke|--untracked|\
- --untracked-|--untracked-f|--untracked-fi|--untracked-fil|--untracked-file|\
- --untracked-files)
- untracked_files=t
- shift
- ;;
- --)
- shift
- break
- ;;
- -*)
- usage
- ;;
- *)
- break
- ;;
- esac
+ fi
+ no_edit=t
+ shift
+ ;;
+ -n|--n|--no|--no-|--no-v|--no-ve|--no-ver|--no-veri|--no-verif|\
+ --no-verify)
+ verify=
+ shift
+ ;;
+ --a|--am|--ame|--amen|--amend)
+ amend=t
+ log_given=t$log_given
+ use_commit=HEAD
+ shift
+ ;;
+ -c)
+ case "$#" in 1) usage ;; esac
+ shift
+ log_given=t$log_given
+ use_commit="$1"
+ no_edit=
+ shift
+ ;;
+ --ree=*|--reed=*|--reedi=*|--reedit=*|--reedit-=*|--reedit-m=*|\
+ --reedit-me=*|--reedit-mes=*|--reedit-mess=*|--reedit-messa=*|\
+ --reedit-messag=*|--reedit-message=*)
+ log_given=t$log_given
+ use_commit=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+ no_edit=
+ shift
+ ;;
+ --ree|--reed|--reedi|--reedit|--reedit-|--reedit-m|--reedit-me|\
+ --reedit-mes|--reedit-mess|--reedit-messa|--reedit-messag|\
+ --reedit-message)
+ case "$#" in 1) usage ;; esac
+ shift
+ log_given=t$log_given
+ use_commit="$1"
+ no_edit=
+ shift
+ ;;
+ -C)
+ case "$#" in 1) usage ;; esac
+ shift
+ log_given=t$log_given
+ use_commit="$1"
+ no_edit=t
+ shift
+ ;;
+ --reu=*|--reus=*|--reuse=*|--reuse-=*|--reuse-m=*|--reuse-me=*|\
+ --reuse-mes=*|--reuse-mess=*|--reuse-messa=*|--reuse-messag=*|\
+ --reuse-message=*)
+ log_given=t$log_given
+ use_commit=`expr "z$1" : 'z-[^=]*=\(.*\)'`
+ no_edit=t
+ shift
+ ;;
+ --reu|--reus|--reuse|--reuse-|--reuse-m|--reuse-me|--reuse-mes|\
+ --reuse-mess|--reuse-messa|--reuse-messag|--reuse-message)
+ case "$#" in 1) usage ;; esac
+ shift
+ log_given=t$log_given
+ use_commit="$1"
+ no_edit=t
+ shift
+ ;;
+ -s|--s|--si|--sig|--sign|--signo|--signof|--signoff)
+ signoff=t
+ shift
+ ;;
+ -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
+ verbose=t
+ shift
+ ;;
+ -u|--u|--un|--unt|--untr|--untra|--untrac|--untrack|--untracke|\
+ --untracked|--untracked-|--untracked-f|--untracked-fi|--untracked-fil|\
+ --untracked-file|--untracked-files)
+ untracked_files=t
+ shift
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
done
case "$edit_flag" in t) no_edit= ;; esac
@@ -268,33 +270,33 @@ # Sanity check options
case "$amend,$initial_commit" in
t,t)
- die "You do not have anything to amend." ;;
+ die "You do not have anything to amend." ;;
t,)
- if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
- die "You are in the middle of a merge -- cannot amend."
- fi ;;
+ if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
+ die "You are in the middle of a merge -- cannot amend."
+ fi ;;
esac
case "$log_given" in
tt*)
- die "Only one of -c/-C/-F can be used." ;;
+ die "Only one of -c/-C/-F can be used." ;;
*tm*|*mt*)
- die "Option -m cannot be combined with -c/-C/-F." ;;
+ die "Option -m cannot be combined with -c/-C/-F." ;;
esac
case "$#,$also,$only,$amend" in
*,t,t,*)
- die "Only one of --include/--only can be used." ;;
+ die "Only one of --include/--only can be used." ;;
0,t,,* | 0,,t,)
- die "No paths with --include/--only does not make sense." ;;
+ die "No paths with --include/--only does not make sense." ;;
0,,t,t)
- only_include_assumed="# Clever... amending the last one with dirty index." ;;
+ only_include_assumed="# Clever... amending the last one with dirty index." ;;
0,,,*)
- ;;
+ ;;
*,,,*)
- only_include_assumed="# Explicit paths specified without -i nor -o; assuming --only paths..."
- also=
- ;;
+ only_include_assumed="# Explicit paths specified without -i nor -o; assuming --only paths..."
+ also=
+ ;;
esac
unset only
case "$all,$also,$#" in
@@ -341,47 +343,47 @@ t,)
,)
case "$#" in
0)
- ;; # commit as-is
+ ;; # commit as-is
*)
- if test -f "$GIT_DIR/MERGE_HEAD"
- then
- refuse_partial "Cannot do a partial commit during a merge."
- fi
- TMP_INDEX="$GIT_DIR/tmp-index$$"
- if test -z "$initial_commit"
- then
- # make sure index is clean at the specified paths, or
- # they are additions.
- dirty_in_index=`git-diff-index --cached --name-status \
- --diff-filter=DMTU HEAD -- "$@"`
- test -z "$dirty_in_index" ||
- refuse_partial "Different in index and the last commit:
+ if test -f "$GIT_DIR/MERGE_HEAD"
+ then
+ refuse_partial "Cannot do a partial commit during a merge."
+ fi
+ TMP_INDEX="$GIT_DIR/tmp-index$$"
+ if test -z "$initial_commit"
+ then
+ # make sure index is clean at the specified paths, or
+ # they are additions.
+ dirty_in_index=`git-diff-index --cached --name-status \
+ --diff-filter=DMTU HEAD -- "$@"`
+ test -z "$dirty_in_index" ||
+ refuse_partial "Different in index and the last commit:
$dirty_in_index"
- fi
- commit_only=`git-ls-files --error-unmatch -- "$@"` || exit
-
- # Build the temporary index and update the real index
- # the same way.
- if test -z "$initial_commit"
- then
- cp "$THIS_INDEX" "$TMP_INDEX"
- GIT_INDEX_FILE="$TMP_INDEX" git-read-tree -m HEAD
- else
- rm -f "$TMP_INDEX"
- fi || exit
-
- echo "$commit_only" |
- GIT_INDEX_FILE="$TMP_INDEX" \
- git-update-index --add --remove --stdin &&
-
- save_index &&
- echo "$commit_only" |
- (
- GIT_INDEX_FILE="$NEXT_INDEX"
- export GIT_INDEX_FILE
- git-update-index --remove --stdin
- ) || exit
- ;;
+ fi
+ commit_only=`git-ls-files --error-unmatch -- "$@"` || exit
+
+ # Build the temporary index and update the real index
+ # the same way.
+ if test -z "$initial_commit"
+ then
+ cp "$THIS_INDEX" "$TMP_INDEX"
+ GIT_INDEX_FILE="$TMP_INDEX" git-read-tree -m HEAD
+ else
+ rm -f "$TMP_INDEX"
+ fi || exit
+
+ echo "$commit_only" |
+ GIT_INDEX_FILE="$TMP_INDEX" \
+ git-update-index --add --remove --stdin &&
+
+ save_index &&
+ echo "$commit_only" |
+ (
+ GIT_INDEX_FILE="$NEXT_INDEX"
+ export GIT_INDEX_FILE
+ git-update-index --remove --stdin
+ ) || exit
+ ;;
esac
;;
esac
@@ -399,7 +401,7 @@ else
fi
GIT_INDEX_FILE="$USE_INDEX" \
- git-update-index -q $unmerged_ok_if_status --refresh || exit
+ git-update-index -q $unmerged_ok_if_status --refresh || exit
################################################################
# If the request is status, just show it and exit.
--
1.4.2.3
--
Martin Waitz
^ permalink raw reply related
* Re: [PATCH 2/2] gitweb: Show trailing slash when listing tree entry in tree listing
From: Jakub Narebski @ 2006-10-07 19:06 UTC (permalink / raw)
To: git
In-Reply-To: <20061007184418.64881.qmail@web31812.mail.mud.yahoo.com>
Luben Tuikov wrote:
> --- Petr Baudis <pasky@suse.cz> wrote:
>> + esc_html($t->{'name'} . '/'));
>
> First, this is a Unixism, and would confuse other OS users.
But AFAIK _Git_ uses it, in output and in index.
> Second, "/" is after all _not part of the name_ of the tree/directory,
> but part of the filesystem's path separator, let's not export it
> to users of other OS's.
> Third, directories/trees are already clearly
> 1) underlined, and
> 2) differently colored,
> which makes it overly obvious what it what.
>
> In fact, my eyes only scan for the different color/underlined
> entries when I'm searching for a directory in tree view. I don't even
> look at the left-most column.
>
> NACK!
I'd rather like it.
More important though would be to add better support for symlinks,
perhaps in the UNIX form
symlink -> _target_
Whete _text_ denotes link.
By the way, I miss somewhat the "redundant" tree/blob links in tree
view...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
From: Luben Tuikov @ 2006-10-07 18:52 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <20061007184148.GE20017@pasky.or.cz>
--- Petr Baudis <pasky@suse.cz> wrote:
> Dear diary, on Sat, Oct 07, 2006 at 08:37:02PM CEST, I got a letter
> where Luben Tuikov <ltuikov@yahoo.com> said that...
> > --- Petr Baudis <pasky@suse.cz> wrote:
> > > Currently that's inconsistently reachable only by first displaying the
> > > tree.
> >
> > I cannot say that there is any "inconsistency" there per se. I also
> > fail to see the value of this patch.
>
> Currently the bottom navbar is more or less the same as the list of
> links in the tree entry (there's the HEAD link but that's a special
> case).
I completely understand where you're coming from. I do.
But this patch makes the view so much more cluttered. And it isn't
vital. Yes we can do it, yes gitweb can do it, but I doubt the core
value.
Another thing is that currently tree/directory entries' third (links)
column to be shortest of all, and this gives my eyes another indication
that this is a tree.
Imagine a long list of files, and in the middle a directory. Then
you'd see only the "history" link next to it, as opposed to the long
"history | snapshot"...
I'm ambivalent as to whether this goes in or not. If the people want it,
so be it.
Luben
>
> --
> Petr "Pasky" Baudis
> Stuff: http://pasky.or.cz/
> #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
> $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
> lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] gitweb: Support hiding of chosen repositories from project list
From: Martin Waitz @ 2006-10-07 18:48 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <20061007123200.GY20017@pasky.or.cz>
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
hoi :)
On Sat, Oct 07, 2006 at 02:32:00PM +0200, Petr Baudis wrote:
> (BTW, I privately consider /pub/git as completely specific to kernel.org
> setup and pure evil to have as default; I would much prefer to have the
> default something more standard and LHS-compliant like /srv/git (almost)
> is. Though I can see the possible pitfalls of changing the default at
> this point (though Google says that only tipc.cslab.ericsson.net uses
> the same path)
Well, Google is not always right.
I know at least one more site with this path ;-)
--
Martin Waitz
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] gitweb: Show trailing slash when listing tree entry in tree listing
From: Luben Tuikov @ 2006-10-07 18:44 UTC (permalink / raw)
To: Petr Baudis, Junio C Hamano; +Cc: git
In-Reply-To: <20061007141043.16912.73982.stgit@rover>
--- Petr Baudis <pasky@suse.cz> wrote:
> Signed-off-by: Petr Baudis <pasky@suse.cz>
> ---
First, this is a Unixism, and would confuse other OS users.
Second, "/" is after all _not part of the name_ of the tree/directory,
but part of the filesystem's path separator, let's not export it
to users of other OS's.
Third, directories/trees are already clearly
1) underlined, and
2) differently colored,
which makes it overly obvious what it what.
In fact, my eyes only scan for the different color/underlined
entries when I'm searching for a directory in tree view. I don't even
look at the left-most column.
NACK!
Luben
>
> gitweb/gitweb.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 096a01b..c3d09a2 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1791,7 +1791,7 @@ sub git_print_tree_entry {
> print "<td class=\"list\">";
> print $cgi->a({-href => href(action=>"tree", hash=>$t->{'hash'},
> file_name=>"$basedir$t->{'name'}", %base_key)},
> - esc_html($t->{'name'}));
> + esc_html($t->{'name'} . '/'));
> print "</td>\n";
> print "<td class=\"link\">";
> if (defined $hash_base) {
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
From: Petr Baudis @ 2006-10-07 18:41 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Junio C Hamano, git
In-Reply-To: <20061007183702.40162.qmail@web31802.mail.mud.yahoo.com>
Dear diary, on Sat, Oct 07, 2006 at 08:37:02PM CEST, I got a letter
where Luben Tuikov <ltuikov@yahoo.com> said that...
> --- Petr Baudis <pasky@suse.cz> wrote:
> > Currently that's inconsistently reachable only by first displaying the
> > tree.
>
> I cannot say that there is any "inconsistency" there per se. I also
> fail to see the value of this patch.
Currently the bottom navbar is more or less the same as the list of
links in the tree entry (there's the HEAD link but that's a special
case).
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* Re: [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
From: Luben Tuikov @ 2006-10-07 18:37 UTC (permalink / raw)
To: Petr Baudis, Junio C Hamano; +Cc: git
In-Reply-To: <20061007141040.16912.50717.stgit@rover>
--- Petr Baudis <pasky@suse.cz> wrote:
> Currently that's inconsistently reachable only by first displaying the
> tree.
I cannot say that there is any "inconsistency" there per se. I also
fail to see the value of this patch.
It looks like it just adds interface to gitweb, just because "we can"
and "gitweb can do it".
Luben
>
> Signed-off-by: Petr Baudis <pasky@suse.cz>
> ---
>
> gitweb/gitweb.perl | 11 +++++++++--
> 1 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index c4970f4..096a01b 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1752,7 +1752,7 @@ sub git_print_simplified_log {
>
> # print tree entry (row of git_tree), but without encompassing <tr> element
> sub git_print_tree_entry {
> - my ($t, $basedir, $hash_base, $have_blame) = @_;
> + my ($t, $basedir, $hash_base, $have_blame, $have_snapshot) = @_;
>
> my %base_key = ();
> $base_key{hash_base} = $hash_base if defined $hash_base;
> @@ -1798,6 +1798,13 @@ sub git_print_tree_entry {
> print $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
> file_name=>"$basedir$t->{'name'}")},
> "history");
> + if ($have_snapshot) {
> + print " | ";
> + }
> + }
> + if ($have_snapshot) {
> + print $cgi->a({-href => href(action=>"snapshot", hash=>$t->{'hash'})},
> + "snapshot");
> }
> print "</td>\n";
> }
> @@ -2931,7 +2938,7 @@ sub git_tree {
> }
> $alternate ^= 1;
>
> - git_print_tree_entry(\%t, $base, $hash_base, $have_blame);
> + git_print_tree_entry(\%t, $base, $hash_base, $have_blame, $have_snapshot);
>
> print "</tr>\n";
> }
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] gitweb: Convert Content-Disposition filenames into qtext
From: Luben Tuikov @ 2006-10-07 18:01 UTC (permalink / raw)
To: Junio C Hamano, Jakub Narebski; +Cc: git, ltuikov
In-Reply-To: <7vvemwqusl.fsf@assigned-by-dhcp.cox.net>
--- Junio C Hamano <junkio@cox.net> wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
> > Junio C Hamano wrote:
> >
> >> Luben Tuikov <ltuikov@yahoo.com> writes:
> >>
> >>>>> +# Convert a string (e.g. a filename) into qtext as defined
> >>>>> +# in RFC 822, from RFC 2183. To be used by Content-Disposition.
> >>>>> +sub to_qtext {
> >>>>> + my $str = shift;
> >>>>> + $str =~ s/\\/\\\\/g;
> >>>>> + $str =~ s/\"/\\\"/g;
> >
> > Here probably it could be
> > $str =~ s/"/\\"/g;
> >
> >>>>> + $str =~ s/\r/\\r/g;
> >>>>
> >>>> \r? Not \n?
> >>>
> >>> Yes, \r, not \n.
> >>
> >> \r to \\r? Not to \\\r?
> >
> > We want "\r" in suggested filename, not "\
> > " I think, so it is "\\r".
>
> Is that what you guys are attempting to achieve?
I think so.
> If we are trying to suggest a filename that is safe by avoiding
> certain characters, I suspect leaving a backslash and dq as-is
> is just as bad as leaving a CR in. So if that is the goal here,
> I think it might be better and a lot simpler to just replace
> each run of bytes not in Portable Filename Character Set with an
> underscore '_'.
I think that if I were to download a file which had those chars
in it, I'd like to at least be able to see the _intention_ of what
chars the actual file name had.
So if I download a filename which looks like this:
This is a \" test \" file \\.\r
Then I know that the intention had been:
This is a " test " file \.<CR>
It becomes an intention, since it needs to be carried over
a qtext.
Luben
^ permalink raw reply
* Re: [RFC PATCH] Add WEBDAV timeout to http-fetch.
From: Petr Baudis @ 2006-10-07 17:45 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jakub Narebski, git
In-Reply-To: <Pine.LNX.4.63.0610071930300.14200@wbgn013.biozentrum.uni-wuerzburg.de>
(This post's gonna be really strange.)
Dear diary, on Sat, Oct 07, 2006 at 07:32:25PM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> On Sat, 7 Oct 2006, Jakub Narebski wrote:
>
> > Perhaps use undocumented (hint, hint! for whoever did code this)
> > per-user ~/.gitconfig?
>
> A good idea to use this (hint, hint! whoever finds out how it works can
> document it as well) feature.
(Which is no excuse for the initial implementor not documenting it,
though.)
> HOWEVER, Junio pointed out that he'd like a finer grain than per-repo, and
> .gitconfig is a coarser one!
(I honestly don't think it's worth it at all to make this configurable.
What's the point?)
> (BTW why do you strip Junio from your Cc: when you respond directly to
> his email?)
Jakub, what about putting a mini-FAQ to your signature? ;-)
It would be nice if gmane supported honoring mail-followup-to when
gatewaying posts back to the mailing list (of course it would need to do
some smart anti-spam protection).
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* Re: gitweb: using quotemeta
From: Luben Tuikov @ 2006-10-07 17:41 UTC (permalink / raw)
To: Jakub Narebski, Junio C Hamano; +Cc: git
In-Reply-To: <200610071123.23654.jnareb@gmail.com>
--- Jakub Narebski <jnareb@gmail.com> wrote:
> Junio C Hamano wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
> >
> >> I'd rather add (and use) separate subroutine for quoting/escaping
> >> values in HTTP headers, or to be more exact for the filename part
> >> of HTTP header "Content-Disposition:". This way if we decide to
> >> not replace all characters outside US-ASCII in suggested filename
> >> to save with '?', but only qoublequote '"' and linefeed '\n' characters,
> >> or even implement RFC 2047 to do the encoding (of course if browsers
> >> can read it), we could do this in one place.
> >
> > Sounds sane. quote_filename?
>
> Luben Tuikov used to_qtext in
> "[PATCH] gitweb: Convert Content-Disposition filenames into qtext"
> Msg-ID: <20061006191801.68649.qmail@web31815.mail.mud.yahoo.com>
> http://permalink.gmane.org/gmane.comp.version-control.git/28437
I think that people familiar with the RFC will be able to quickly
recognize what this function does, after seeing "qtext" in the
name of the function. After all, not only filenames can be qtext.
Luben
^ permalink raw reply
* Re: [RFC PATCH] Add WEBDAV timeout to http-fetch.
From: Johannes Schindelin @ 2006-10-07 17:32 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <eg82tq$2uq$1@sea.gmane.org>
Hi,
On Sat, 7 Oct 2006, Jakub Narebski wrote:
> Perhaps use undocumented (hint, hint! for whoever did code this)
> per-user ~/.gitconfig?
A good idea to use this (hint, hint! whoever finds out how it works can
document it as well) feature.
HOWEVER, Junio pointed out that he'd like a finer grain than per-repo, and
.gitconfig is a coarser one! (BTW why do you strip Junio from your Cc:
when you respond directly to his email?)
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] gitweb: Do not print "log" and "shortlog" redundantly in commit view
From: Petr Baudis @ 2006-10-07 14:17 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Luben Tuikov, git
In-Reply-To: <200610071605.23277.jnareb@gmail.com>
Dear diary, on Sat, Oct 07, 2006 at 04:05:22PM CEST, I got a letter
where Jakub Narebski <jnareb@gmail.com> said that...
> Petr Baudis wrote:
> > Then it will be impossible to get snapshot of any subtree (apart of
> > manually constructing the URL). Hmm, and it's a bug that we don't show
> > the snapshot link when listing tree entry in tree listing, I thought
> > we did in the past...?
> >
> > I think we should make it more clear what each of the bars concerns,
> > perhaps doing some more significant redesign:
> >
> > [summary] is redundant, you have this big project name link in the top
> > left corner. All the other navbar options concern commit, so why not
> > merge it with the awkward commit box below the navbars?
> >
> > All the "views bar" options concern the currently selected object, so
> > why not merge it with the object "descriptor", that is the path?
To make the idea more graphic:
Commit title master shortlog | log | commit | commitdiff | tree
[project.git] / subdir / filename blame | history | raw | HEAD
Or perhaps first the navigation, then the title.
> > Patches will follow up.
I have decided to reprioritize and do other stuff now. I will get back
to it sometime later if noone does it first.
> I think that "summary" has it's place rather in the bottom navigation
> bar, in the "views bar", because it is related to current object not
> current commit (the "tree" entry in top navigation bar, "actions bar",
> is somewhat misleading because it actually is the tree of the commit,
> not any tree).
It's not related to current object any more than to the current commit
and is really out-of-place in both bars. It's related only to the
current project.
We _do_ have a project-global bar at each page. It's the footer,
containing the description and RSS link. What about stashing it there?
;-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* Re: [PATCH] gitweb: Cleanup Git logo and Git logo target generation
From: Alan Chandler @ 2006-10-07 14:14 UTC (permalink / raw)
To: git
In-Reply-To: <200610071158.26211.jnareb@gmail.com>
On Saturday 07 October 2006 10:58, Jakub Narebski wrote:
> I wonder how many people use non-standard logo image, or non standard
> favicon...
I'm using a non standard favicon to make it consistent with the rest of my
site.
That said, I like the revised form.
--
Alan Chandler
http://www.chandlerfamily.org.uk
^ permalink raw reply
* [PATCH 2/2] gitweb: Show trailing slash when listing tree entry in tree listing
From: Petr Baudis @ 2006-10-07 14:10 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <20061007132457.GB20017@pasky.or.cz>
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 096a01b..c3d09a2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1791,7 +1791,7 @@ sub git_print_tree_entry {
print "<td class=\"list\">";
print $cgi->a({-href => href(action=>"tree", hash=>$t->{'hash'},
file_name=>"$basedir$t->{'name'}", %base_key)},
- esc_html($t->{'name'}));
+ esc_html($t->{'name'} . '/'));
print "</td>\n";
print "<td class=\"link\">";
if (defined $hash_base) {
^ permalink raw reply related
* [PATCH 1/2] gitweb: Show snapshot links for tree entries in tree listing
From: Petr Baudis @ 2006-10-07 14:10 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <20061007132457.GB20017@pasky.or.cz>
Currently that's inconsistently reachable only by first displaying the
tree.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/gitweb.perl | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c4970f4..096a01b 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1752,7 +1752,7 @@ sub git_print_simplified_log {
# print tree entry (row of git_tree), but without encompassing <tr> element
sub git_print_tree_entry {
- my ($t, $basedir, $hash_base, $have_blame) = @_;
+ my ($t, $basedir, $hash_base, $have_blame, $have_snapshot) = @_;
my %base_key = ();
$base_key{hash_base} = $hash_base if defined $hash_base;
@@ -1798,6 +1798,13 @@ sub git_print_tree_entry {
print $cgi->a({-href => href(action=>"history", hash_base=>$hash_base,
file_name=>"$basedir$t->{'name'}")},
"history");
+ if ($have_snapshot) {
+ print " | ";
+ }
+ }
+ if ($have_snapshot) {
+ print $cgi->a({-href => href(action=>"snapshot", hash=>$t->{'hash'})},
+ "snapshot");
}
print "</td>\n";
}
@@ -2931,7 +2938,7 @@ sub git_tree {
}
$alternate ^= 1;
- git_print_tree_entry(\%t, $base, $hash_base, $have_blame);
+ git_print_tree_entry(\%t, $base, $hash_base, $have_blame, $have_snapshot);
print "</tr>\n";
}
^ permalink raw reply related
* Re: [PATCH] gitweb: Do not print "log" and "shortlog" redundantly in commit view
From: Jakub Narebski @ 2006-10-07 14:05 UTC (permalink / raw)
To: Petr Baudis; +Cc: Luben Tuikov, git
In-Reply-To: <20061007132457.GB20017@pasky.or.cz>
Petr Baudis wrote:
> Then it will be impossible to get snapshot of any subtree (apart of
> manually constructing the URL). Hmm, and it's a bug that we don't show
> the snapshot link when listing tree entry in tree listing, I thought
> we did in the past...?
>
> I think we should make it more clear what each of the bars concerns,
> perhaps doing some more significant redesign:
>
> [summary] is redundant, you have this big project name link in the top
> left corner. All the other navbar options concern commit, so why not
> merge it with the awkward commit box below the navbars?
>
> All the "views bar" options concern the currently selected object, so
> why not merge it with the object "descriptor", that is the path?
>
> Patches will follow up.
I think that "summary" has it's place rather in the bottom navigation
bar, in the "views bar", because it is related to current object not
current commit (the "tree" entry in top navigation bar, "actions bar",
is somewhat misleading because it actually is the tree of the commit,
not any tree). But the refactoring of "views" navigation bar is a good
idea. For tree it would be
tree | _history_ | _blame_ | _snapshot_
(when there would be tree_blame back - there was short experiment, patch
on git list; snapshot of course only when enabled).
I'd leave "summary" view, because the uther, especially with custome
$home_link_str might be not obvous that it leads to summary view.
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [PATCH] gitweb: Document features better
From: Jakub Narebski @ 2006-10-07 13:35 UTC (permalink / raw)
To: git
In-Reply-To: <20061007131746.13690.38921.stgit@rover>
Petr Baudis wrote:
> This expands gitweb/README to talk some more about GITWEB_CONFIG, moves
> feature-specific documentation in gitweb.cgi to the inside of the %features
> array, and adds some short description of all the features.
Thanks. Very nice.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply
* Re: [PATCH] gitweb: Do not print "log" and "shortlog" redundantly in commit view
From: Petr Baudis @ 2006-10-07 13:24 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Jakub Narebski, git
In-Reply-To: <20061006221603.50873.qmail@web31815.mail.mud.yahoo.com>
Dear diary, on Sat, Oct 07, 2006 at 12:16:03AM CEST, I got a letter
where Luben Tuikov <ltuikov@yahoo.com> said that...
> --- Jakub Narebski <jnareb@gmail.com> wrote:
> > Gaah, the whole cae1862a3b55b487731e9857f2213ac59d5646d commit
> > "gitweb: More per-view navigation bar links" is somewhat broken.
> > Up to this point we used top navigation bar for commit (hash base)
> > or whole project related links, while bottom part of navigation
> > bar for "formats" i.e. links related to current view (passing hash)
> > or for pagination.
> >
> > So while "snapshot" link has it's place in top navigation bar
> > (but by modyfying git_print_page_nav subroutine, not by adding it
> > by hand), "history" for example IMHO doesn't; history link should be
> > present in the bottom part of navigation bar. Perhaps we could
> > reuse git_print_page_nav for formats, for example blob wiew would have
> > blob | _blame_ | _history_ | _raw_ | _HEAD_
> > while tree view would have
> > tree | _snapshot_ | _history_ | _HEAD_
> > (where _text_ indices link). Perhaps _snapshot_ in tree view
> > shouldn't be repeated, although top one might mean snapshot of commitish,
> > bottom one snapshot of tree.
>
> Only a single one: of committish please.
Then it will be impossible to get snapshot of any subtree (apart of
manually constructing the URL). Hmm, and it's a bug that we don't show
the snapshot link when listing tree entry in tree listing, I thought we
did in the past...?
I think we should make it more clear what each of the bars concerns,
perhaps doing some more significant redesign:
[summary] is redundant, you have this big project name link in the top
left corner. All the other navbar options concern commit, so why not
merge it with the awkward commit box below the navbars?
All the "views bar" options concern the currently selected object, so
why not merge it with the object "descriptor", that is the path?
Patches will follow up.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
* [PATCH] gitweb: Document features better
From: Petr Baudis @ 2006-10-07 13:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
This expands gitweb/README to talk some more about GITWEB_CONFIG, moves
feature-specific documentation in gitweb.cgi to the inside of the %features
array, and adds some short description of all the features.
Signed-off-by: Petr Baudis <pasky@suse.cz>
---
gitweb/README | 16 +++++++++++++-
gitweb/gitweb.perl | 59 ++++++++++++++++++++++++++++++++++++----------------
2 files changed, 56 insertions(+), 19 deletions(-)
diff --git a/gitweb/README b/gitweb/README
index 78e6fc0..e02e90f 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -26,12 +26,26 @@ You can specify the following configurat
* GITWEB_LOGO
Points to the location where you put git-logo.png on your web server.
* GITWEB_CONFIG
- This file will be loaded using 'require'. If the environment
+ This file will be loaded using 'require' and can be used to override any
+ of the options above as well as some other options - see the top of
+ 'gitweb.cgi' for their full list and description. If the environment
$GITWEB_CONFIG is set when gitweb.cgi is executed the file in the
environment variable will be loaded instead of the file
specified when gitweb.cgi was created.
+Runtime gitweb configuration
+----------------------------
+
+You can adjust gitweb behaviour using the file specified in `GITWEB_CONFIG`
+(defaults to 'gitweb_config.perl' in the same directory as the CGI).
+See the top of 'gitweb.cgi' for the list of variables and some description.
+The most notable thing that is not configurable at compile time are the
+optional features, stored in the '%features' variable. You can find further
+description on how to reconfigure the default features setting in your
+`GITWEB_CONFIG` or per-project in `project.git/config` inside 'gitweb.cgi'.
+
+
Webserver configuration
-----------------------
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b06e96a..c4970f4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -100,22 +100,62 @@ our %feature = (
#
# use gitweb_check_feature(<feature>) to check if <feature> is enabled
+ # Enable the 'blame' blob view, showing the last commit that modified
+ # each line in the file. This can be very CPU-intensive.
+
+ # To enable system wide have in $GITWEB_CONFIG
+ # $feature{'blame'}{'default'} = [1];
+ # To have project specific config enable override in $GITWEB_CONFIG
+ # $feature{'blame'}{'override'} = 1;
+ # and in project config gitweb.blame = 0|1;
'blame' => {
'sub' => \&feature_blame,
'override' => 0,
'default' => [0]},
+ # Enable the 'snapshot' link, providing a compressed tarball of any
+ # tree. This can potentially generate high traffic if you have large
+ # project.
+
+ # To disable system wide have in $GITWEB_CONFIG
+ # $feature{'snapshot'}{'default'} = [undef];
+ # To have project specific config enable override in $GITWEB_CONFIG
+ # $feature{'blame'}{'override'} = 1;
+ # and in project config gitweb.snapshot = none|gzip|bzip2;
'snapshot' => {
'sub' => \&feature_snapshot,
'override' => 0,
# => [content-encoding, suffix, program]
'default' => ['x-gzip', 'gz', 'gzip']},
+ # Enable the pickaxe search, which will list the commits that modified
+ # a given string in a file. This can be practical and quite faster
+ # alternative to 'blame', but still potentially CPU-intensive.
+
+ # To enable system wide have in $GITWEB_CONFIG
+ # $feature{'pickaxe'}{'default'} = [1];
+ # To have project specific config enable override in $GITWEB_CONFIG
+ # $feature{'pickaxe'}{'override'} = 1;
+ # and in project config gitweb.pickaxe = 0|1;
'pickaxe' => {
'sub' => \&feature_pickaxe,
'override' => 0,
'default' => [1]},
+ # Make gitweb use an alternative format of the URLs which can be
+ # more readable and natural-looking: project name and some other
+ # information is embedded directly in the path and the query string
+ # contains only auxiliary information. All gitweb installations
+ # support recognizing URL in both formats, this configures only
+ # which formats the gitweb-generated links should use.
+
+ # To enable system wide have in $GITWEB_CONFIG
+ # $feature{'pathinfo'}{'default'} = [1];
+ # Project specific override is not supported.
+ # Note that you will need to change the default location of CSS,
+ # favicon, logo and possibly other files to an absolute URL. Also,
+ # if gitweb.cgi serves as your indexfile, you will need to force
+ # $my_uri to contain the script name in your $GITWEB_CONFIG.
'pathinfo' => {
'override' => 0,
'default' => [0]},
@@ -136,12 +176,6 @@ sub gitweb_check_feature {
return $sub->(@defaults);
}
-# To enable system wide have in $GITWEB_CONFIG
-# $feature{'blame'}{'default'} = [1];
-# To have project specific config enable override in $GITWEB_CONFIG
-# $feature{'blame'}{'override'} = 1;
-# and in project config gitweb.blame = 0|1;
-
sub feature_blame {
my ($val) = git_get_project_config('blame', '--bool');
@@ -154,12 +188,6 @@ sub feature_blame {
return $_[0];
}
-# To disable system wide have in $GITWEB_CONFIG
-# $feature{'snapshot'}{'default'} = [undef];
-# To have project specific config enable override in $GITWEB_CONFIG
-# $feature{'blame'}{'override'} = 1;
-# and in project config gitweb.snapshot = none|gzip|bzip2
-
sub feature_snapshot {
my ($ctype, $suffix, $command) = @_;
@@ -183,12 +211,6 @@ sub gitweb_have_snapshot {
return $have_snapshot;
}
-# To enable system wide have in $GITWEB_CONFIG
-# $feature{'pickaxe'}{'default'} = [1];
-# To have project specific config enable override in $GITWEB_CONFIG
-# $feature{'pickaxe'}{'override'} = 1;
-# and in project config gitweb.pickaxe = 0|1;
-
sub feature_pickaxe {
my ($val) = git_get_project_config('pickaxe', '--bool');
@@ -434,6 +456,7 @@ sub href(%) {
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
# use PATH_INFO for project name
+ # TODO: use PATH_INFO for other stuff as well
$href .= "/$params{'project'}" if defined $params{'project'};
delete $params{'project'};
^ permalink raw reply related
* Re: [PATCH] gitweb: prepare for repositories with packed refs.
From: Petr Baudis @ 2006-10-07 12:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vzmc8tqqe.fsf@assigned-by-dhcp.cox.net>
Dear diary, on Sat, Oct 07, 2006 at 11:33:29AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> When we introduced symref, "cat .git/HEAD" stopped being the way
> to read the value of the tip of the current branch, "echo
> $commit >.git/HEAD" stopped being the way to update it, and
> "rev-parse --verify HEAD" and "update-ref HEAD $commit" were
> introduced at the same time as the official alternatives to
> support both old and new implementations of .git/HEAD.
>
> The way to find out which branch we are currently on used to be
> "readlink .git/HEAD"; that stopped to be true, and we introduced
> "symbolic-ref HEAD" as the official alternative to support both
> old and new implementation.
>
> The way to see if a random symbolic link whose name happens to
> be HEAD is a symref has been to see if it points at a path that
> begins with "refs/".
Cogito does
[ ! -s "$_git/HEAD" ] || { _git_head="$(git-symbolic-ref HEAD)"; _git_head="${_git_head#refs/heads/}"; }
in the common initialization code, so that cg-reset works even on
repositories with broken HEAD. It hasn't been an issue in the past since
HEAD as a dangling symlink indeed _has_ been broken HEAD in the past.
That said, at least cg-reset will indeed repair it:
if ! [ -s "$_git/HEAD" ]; then
rm -f "$_git/HEAD"
# XXX: git-symbolic-ref is a weenie and won't do the job at this point.
echo "ref: refs/heads/$_git_head" >"$_git/HEAD"
fi
But it's still not nice.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox