* Re: Newbie to git
From: Eugene Sajine @ 2009-12-28 16:51 UTC (permalink / raw)
To: mysql.jorge; +Cc: Junio C Hamano, git
In-Reply-To: <7a0ae9cb57a1bc55653872ab254ea922@192.168.1.222>
On Mon, Dec 28, 2009 at 5:34 AM, <mysql.jorge@decimal.pt> wrote:
>> If you are addressing Andreas, why does your mail have:
>>
>> To: <git@vger.kernel.org>
>> Cc: <git@vger.kernel.org>
>>
>> and no other addressee???
>
> My error, sorry :)
>
>> You created "myproject1" somewhere you started "mkdir" in (perhaps in
>> $HOME?) [*1*] and that project tracks a single file "a.txt"; you are
>> correct if that was what you wanted to do.
>>
>> The new repository "myproject1" doesn't have any relation to the bare
>> repository at /home/apache/gitprojects/mydir.git/ you created earlier.
>> The next steps I recommend new people are:
>>
>> (1) push into the public repository, by doing:
>>
>> cd myproject1
>> git push /home/apache/gitprojects/mydir.git/ master
>>
>> (2) make sure push went correctly by trying to clone from there:
>>
>> cd ..
>> mv myproject1 myproject1.old
>> git clone /home/apache/gitprojects/mydir.git/ myproject1
>>
>> (3) check if the clone is what you expect
>>
>> diff myproject1.old/a.txt myproject1/a.txt
>>
>> (4) once satisfied, remove the old one
>>
>> rm -fr myproject1.old
>>
>> And keep working in the myproject1 repository from there on.
>
> Thank you, i understood, i believe i really did. did that test and it's
> OK.
> But let me reask in another way:
>
> I want to setup the git server, to accept new branch's created in a remote
> place that will be push'ed to it, please correct me, 'cause i'm doing
> something wrong and i don't know what yet.
>
> - setup git server to run with:
> /usr/lib/git-core/git-daemon --reuseaddr --syslog --export-all
> --enable=receive-pack --verbose --base-path=/home/apache/gitprojects
>
> - created directory /home/apache/gitprojects
> - git init --bare /home/apache/gitprojects
>
> - what will be my link on the remote? "git://192.168.1.206" just?
> - From now on, how can I have access to push projects that exist on other
> machine?
>
> Sorry for the questions... they are newbie!
> Jorge,
Your /home/apache/gitprojects is a folder where your git repositories
are supposed to be placed.
Your Git repository = your project.
By running a git daemon the way you do - you say that you are going to
serve all repositories from /home/apache/gitprojects.
Bare repo = repo without working copy - the one which contains only
history and git objects (imagine it to be only .git folder from normal
repo) Therefore for bare repos there is a naming convention so they
have .git extension, while normal repo doesn't. So, myProject.git is
server based bare repo, while myProject is a local repo.
Finally you have /home/apache/gitprojects/myProject.git
The URL to clone from there will be - should be shown to you by CGIT
if you have everything correctly set up
git://192.168.1.206/myProject.git
Hope that helps,
Eugene
^ permalink raw reply
* Re: [PATCH 2/2] Smart-http: check if repository is OK to export before serving it
From: Tarmigan @ 2009-12-28 16:57 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Junio C Hamano, git, rctay89, drizzd, warthog9
In-Reply-To: <20091228155931.GC2252@spearce.org>
On Mon, Dec 28, 2009 at 10:59 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> Tarmigan <tarmigan+git@gmail.com> wrote:
>> I've been thinking that the not_found() to a forbidden() instead.
>
> Oh. Interesting question.
>
> Because you can't resolve the access error by authenticating to
> the server, we may actually want to just return not_found() here
> with a message in the log of "Repository not exported: '%s'".
I'm no http expert, but isn't that what 401 would be? From
http://tools.ietf.org/html/rfc2616#section-10.4.4
403 Forbidden
The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated.
If the request method was not HEAD and the server wishes to make
public why the request has not been fulfilled, it SHOULD describe the
reason for the refusal in the entity. If the server does not wish to
make this information available to the client, the status code 404
(Not Found) can be used instead.
which to me points to 403 instead of 404.
I don't have a strong preference, and will resend with those changes
if you'd prefer 404.
Thanks,
Tarmigan
^ permalink raw reply
* Re: [PATCH 2/2] Smart-http: check if repository is OK to export before serving it
From: Shawn O. Pearce @ 2009-12-28 17:08 UTC (permalink / raw)
To: Tarmigan; +Cc: Junio C Hamano, git, rctay89, drizzd, warthog9
In-Reply-To: <905315640912280857g710b45fcne21a21d53ff0fedf@mail.gmail.com>
Tarmigan <tarmigan+git@gmail.com> wrote:
> On Mon, Dec 28, 2009 at 10:59 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> > Tarmigan <tarmigan+git@gmail.com> wrote:
> >> I've been thinking that the not_found() to a forbidden() instead.
> >
> > Because you can't resolve the access error by authenticating to
> > the server, we may actually want to just return not_found() here
> > with a message in the log of "Repository not exported: '%s'".
>
> I'm no http expert, but isn't that what 401 would be? From
> http://tools.ietf.org/html/rfc2616#section-10.4.4
> 403 Forbidden
> The server understood the request, but is refusing to fulfill it.
> Authorization will not help and the request SHOULD NOT be repeated.
> If the request method was not HEAD and the server wishes to make
> public why the request has not been fulfilled, it SHOULD describe the
> reason for the refusal in the entity. If the server does not wish to
> make this information available to the client, the status code 404
> (Not Found) can be used instead.
> which to me points to 403 instead of 404.
Good point, that is 403. But the last sentance leads me to believe
404 might be a better use here. Under git-daemon we don't tell
the client the difference between "Not Found" and "Not Exported",
so I think we should be doing the same thing here under HTTP.
--
Shawn.
^ permalink raw reply
* Re: [PATCH] Allow git to use any HTTP authentication method.
From: Tay Ray Chuan @ 2009-12-28 17:15 UTC (permalink / raw)
To: Shawn O. Pearce
Cc: Junio C Hamano, Martin Storsj?, Lénaïc Huard, git
In-Reply-To: <20091228155346.GB2252@spearce.org>
Hi,
On Mon, Dec 28, 2009 at 11:53 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
> Martin Storsj? <martin@martin.st> wrote:
>> Should I send in a new patch that removes the http.authAny option and
>> always enables this, or send a rewritten version of the patch that already
>> is in 'next'?
>
> I'm not Junio, but I would suggest sending in a new patch series,
> and asking Junio politely to revert the one that is currently in
> next before merging in the new series.
>
> If we really are killing http.authAny before it hits master, there
> is no reason for it to appear in the final project history.
hmm, a few days back Junio (added to Cc list) sent out an email
regarding branch shuffling and dropping topics from 'next'. Junio,
could we piggyback on this?
--
Cheers,
Ray Chuan
^ permalink raw reply
* Re: [PATCH] Allow git to use any HTTP authentication method.
From: Junio C Hamano @ 2009-12-28 18:04 UTC (permalink / raw)
To: Tay Ray Chuan
Cc: Shawn O. Pearce, Junio C Hamano, Martin Storsj?,
Lénaïc Huard, git
In-Reply-To: <be6fef0d0912280915k1320110o6a361a0950aa60f6@mail.gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
> On Mon, Dec 28, 2009 at 11:53 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
>> Martin Storsj? <martin@martin.st> wrote:
>>> Should I send in a new patch that removes the http.authAny option and
>>> always enables this, or send a rewritten version of the patch that already
>>> is in 'next'?
>>
>> I'm not Junio, but I would suggest sending in a new patch series,
>> and asking Junio politely to revert the one that is currently in
>> next before merging in the new series.
>>
>> If we really are killing http.authAny before it hits master, there
>> is no reason for it to appear in the final project history.
>
> hmm, a few days back Junio (added to Cc list) sent out an email
> regarding branch shuffling and dropping topics from 'next'. Junio,
> could we piggyback on this?
If people want to go that way that is fine by me, but unlike the ones that
are _ejected_ from next without trace, if we are going to have the primary
feature the patch introduces and changing only a minor detail of external
interface, I don't think we gain much by hinding that story from the
history, especially for something that has been cooking in 'next'.
A separate follow-up commit would be more honest about the feature's
history. Also a follow-up patch to remove conditionals is much easier to
review than a resend of a rewritten patch, especially when the original
was reviewed adequately for its primary codepath to implement the feature.
Would it be just a matter of queueing something like this on top of
b8ac923 (Add an option for using any HTTP authentication scheme, not only
basic, 2009-11-27)?
-- >8 --
From: "Shawn O. Pearce" <spearce@spearce.org>,
Subject: Remove http.authAny
Back when the feature to use different HTTP authentication methods was
originally written, it needed an extra HTTP request for everything when
the feature was in effect, because we didn't reuse curl sessions.
However, b8ac923 (Add an option for using any HTTP authentication scheme,
not only basic, 2009-11-27) builds on top of an updated codebase that does
reuse curl sessions; there is no need to manually avoid the extra overhead
by making this configurable anymore.
---
Documentation/config.txt | 7 -------
http.c | 17 +----------------
2 files changed, 1 insertions(+), 23 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index a54ede3..b77d66d 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1158,13 +1158,6 @@ http.noEPSV::
support EPSV mode. Can be overridden by the 'GIT_CURL_FTP_NO_EPSV'
environment variable. Default is false (curl will use EPSV).
-http.authAny::
- Allow any HTTP authentication method, not only basic. Enabling
- this lowers the performance slightly, by having to do requests
- without any authentication to discover the authentication method
- to use. Can be overridden by the 'GIT_HTTP_AUTH_ANY'
- environment variable. Default is false.
-
i18n.commitEncoding::
Character encoding the commit messages are stored in; git itself
does not care per se, but this information is necessary e.g. when
diff --git a/http.c b/http.c
index aeb69b3..01e0fdc 100644
--- a/http.c
+++ b/http.c
@@ -40,9 +40,6 @@ static long curl_low_speed_time = -1;
static int curl_ftp_no_epsv;
static const char *curl_http_proxy;
static char *user_name, *user_pass;
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
-static int curl_http_auth_any = 0;
-#endif
#if LIBCURL_VERSION_NUM >= 0x071700
/* Use CURLOPT_KEYPASSWD as is */
@@ -197,12 +194,6 @@ static int http_options(const char *var, const char *value, void *cb)
http_post_buffer = LARGE_PACKET_MAX;
return 0;
}
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- if (!strcmp("http.authany", var)) {
- curl_http_auth_any = git_config_bool(var, value);
- return 0;
- }
-#endif
/* Fall back on the default ones */
return git_default_config(var, value, cb);
@@ -254,8 +245,7 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
#endif
#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- if (curl_http_auth_any)
- curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+ curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
#endif
init_curl_http_auth(result);
@@ -408,11 +398,6 @@ void http_init(struct remote *remote)
if (getenv("GIT_CURL_FTP_NO_EPSV"))
curl_ftp_no_epsv = 1;
-#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
- if (getenv("GIT_HTTP_AUTH_ANY"))
- curl_http_auth_any = 1;
-#endif
-
if (remote && remote->url && remote->url[0]) {
http_auth_init(remote->url[0]);
if (!ssl_cert_password_required &&
^ permalink raw reply related
* Re: [PATCH] Allow git to use any HTTP authentication method.
From: Martin Storsjö @ 2009-12-28 18:10 UTC (permalink / raw)
To: Junio C Hamano
Cc: Tay Ray Chuan, Shawn O. Pearce, Lénaïc Huard, git
In-Reply-To: <7vd41zrn4n.fsf@alter.siamese.dyndns.org>
On Mon, 28 Dec 2009, Junio C Hamano wrote:
> Would it be just a matter of queueing something like this on top of
> b8ac923 (Add an option for using any HTTP authentication scheme, not only
> basic, 2009-11-27)?
Looks good to me:
Acked-by: Martin Storsjo <martin@martin.st>
// Martin
^ permalink raw reply
* Re: [PATCH] Allow git to use any HTTP authentication method.
From: Shawn O. Pearce @ 2009-12-28 18:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Tay Ray Chuan, Martin Storsj?, L??na??c Huard, git
In-Reply-To: <7vd41zrn4n.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> -- >8 --
> From: "Shawn O. Pearce" <spearce@spearce.org>,
> Subject: Remove http.authAny
Ack.
But I'm not sure I should be the author, you did all of the legwork
and therefore should get credit for it. :-)
--
Shawn.
^ permalink raw reply
* [PATCH] Documentation: commit: explain the non-meaning of S-o-b
From: Jan Krüger @ 2009-12-28 18:40 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git ML
In the manpage for git commit, the option --signoff is mentioned but
there is no explanation of what it actually means. Add a brief hint that
S-o-b doesn't have a pre-defined meaning.
Signed-off-by: Jan Krüger <jk@jk.gs>
---
Semi-resend. Nobody commented on this when I first sent it in early
December, so here it is again, with a slightly more verbose
explanation. The repetition is intentional.
Documentation/git-commit.txt | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index d227cec..cae510b 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -114,7 +114,10 @@ OPTIONS
-s::
--signoff::
Add Signed-off-by line by the committer at the end of the commit
- log message.
+ log message. This line has no inherent meaning; it is up to the
+ potential recipient of the commit to decide what it stands for.
+ It is typically understood as an assurance by the committer that
+ the commit conforms to the receiving project's commit guidelines.
-n::
--no-verify::
--
1.6.5.3.171.ge36e
^ permalink raw reply related
* immutable tags?
From: Carlos Santana @ 2009-12-28 20:04 UTC (permalink / raw)
To: git
I would like to know if there is any difference between branches and
tags. Is it only conceptual - convention to be followed by a developer
or some technical difference? e.g. : Is it possible to create
immutable tags so that nothing can be checked in to that 'tagged
directory'?
-
CS.
^ permalink raw reply
* Re: immutable tags?
From: david @ 2009-12-28 20:25 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
In-Reply-To: <92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com>
On Mon, 28 Dec 2009, Carlos Santana wrote:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
tags are pointers into the tree. tags do not change.
in git directories are not tagged, so I'm not sure what you are working
towards here.
David Lang
^ permalink raw reply
* [PATCH 5/5] gitk: Use consistent font for all text input fields
From: Mark Hills @ 2009-12-28 20:04 UTC (permalink / raw)
To: git
In-Reply-To: <1262030643-12952-4-git-send-email-mark@pogo.org.uk>
Instead of setting the font for specific widgets, set the font for the
widget type. If themed widgets are not available, this is via the X
resources. If themed widgets are available, the theme font is used.
The exception is the SHA1 ID which is forced to use the fixed-width
font, even where themed widgets are used.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
gitk-git/gitk | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 5008753..13da663 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -1874,7 +1874,8 @@ proc setoptions {} {
option add *Menubutton.font uifont startupFile
option add *Label.font uifont startupFile
option add *Message.font uifont startupFile
- option add *Entry.font uifont startupFile
+ option add *Entry.font textfont startupFile
+ option add *Text.font textfont startupFile
option add *Labelframe.font uifont startupFile
option add *Spinbox.font textfont startupFile
option add *Listbox.font mainfont startupFile
@@ -2173,7 +2174,7 @@ proc makewindow {} {
set findstring {}
set fstring .tf.lbar.findstring
lappend entries $fstring
- ${NS}::entry $fstring -width 30 -font textfont -textvariable findstring
+ ${NS}::entry $fstring -width 30 -textvariable findstring
trace add variable findstring write find_change
set findtype [mc "Exact"]
set findtypemenu [makedroplist .tf.lbar.findtype \
@@ -2216,7 +2217,7 @@ proc makewindow {} {
pack .bleft.top.search -side left -padx 5
set sstring .bleft.top.sstring
set searchstring ""
- ${NS}::entry $sstring -width 20 -font textfont -textvariable searchstring
+ ${NS}::entry $sstring -width 20 -textvariable searchstring
lappend entries $sstring
trace add variable searchstring write incrsearch
pack $sstring -side left -expand 1 -fill x
@@ -4036,7 +4037,7 @@ proc vieweditor {top n title} {
} elseif {$type eq "path"} {
${NS}::label $top.l -text $title
pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3
- text $top.t -width 40 -height 5 -background $bgcolor -font uifont
+ text $top.t -width 40 -height 5 -background $bgcolor
if {[info exists viewfiles($n)]} {
foreach f $viewfiles($n) {
$top.t insert end $f
--
1.6.6
^ permalink raw reply related
* [PATCH 1/5] gitk: Remove forced use of sans-serif font
From: Mark Hills @ 2009-12-28 20:03 UTC (permalink / raw)
To: git
The X resources set using uifont cover this case.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
gitk-git/gitk | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 364c7a8..c58fd58 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -10513,7 +10513,6 @@ proc mkfontdisp {font top which} {
set fontpref($font) [set $font]
${NS}::button $top.${font}but -text $which \
-command [list choosefont $font $which]
- if {!$use_ttk} {$top.${font}but configure -font optionfont}
${NS}::label $top.$font -relief flat -font $font \
-text $fontattr($font,family) -justify left
grid x $top.${font}but $top.$font -sticky w
@@ -10776,15 +10775,6 @@ proc doprefs {} {
mkfontdisp textfont $top [mc "Diff display font"]
mkfontdisp uifont $top [mc "User interface font"]
- if {!$use_ttk} {
- foreach w {maxpctl maxwidthl showlocal autoselect tabstopl ntag
- ldiff lattr extdifff.l extdifff.b bgbut fgbut
- diffoldbut diffnewbut hunksepbut markbgbut selbgbut
- want_ttk ttk_note} {
- $top.$w configure -font optionfont
- }
- }
-
${NS}::frame $top.buts
${NS}::button $top.buts.ok -text [mc "OK"] -command prefsok -default active
${NS}::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
@@ -11396,8 +11386,6 @@ namespace import ::msgcat::mc
catch {source ~/.gitk}
-font create optionfont -family sans-serif -size -12
-
parsefont mainfont $mainfont
eval font create mainfont [fontflags mainfont]
eval font create mainfontbold [fontflags mainfont 1]
--
1.6.6
^ permalink raw reply related
* [PATCH 2/5] gitk: Set the font for all spinbox widgets
From: Mark Hills @ 2009-12-28 20:04 UTC (permalink / raw)
To: git
In-Reply-To: <1262030643-12952-1-git-send-email-mark@pogo.org.uk>
Use the X resources to set the font, removing the need to set the font
for specific widgets.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
gitk-git/gitk | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index c58fd58..299a2ae 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -1876,6 +1876,7 @@ proc setoptions {} {
option add *Message.font uifont startupFile
option add *Entry.font uifont startupFile
option add *Labelframe.font uifont startupFile
+ option add *Spinbox.font textfont startupFile
}
# Make a menu and submenus.
@@ -2226,7 +2227,7 @@ proc makewindow {} {
-command changediffdisp -variable diffelide -value {1 0}
${NS}::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
- spinbox .bleft.mid.diffcontext -width 5 -font textfont \
+ spinbox .bleft.mid.diffcontext -width 5 \
-from 0 -increment 1 -to 10000000 \
-validate all -validatecommand "diffcontextvalidate %P" \
-textvariable diffcontextstring
--
1.6.6
^ permalink raw reply related
* [PATCH 4/5] gitk: Disable option when themed widgets are not available
From: Mark Hills @ 2009-12-28 20:04 UTC (permalink / raw)
To: git
In-Reply-To: <1262030643-12952-3-git-send-email-mark@pogo.org.uk>
Disable the widget instead of using the label to indicate that themed
widgets are not available.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
gitk-git/gitk | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 5cbc885..5008753 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -10721,14 +10721,14 @@ proc doprefs {} {
${NS}::label $top.lgen -text [mc "General options"]
grid $top.lgen - -sticky w -pady 10
- ${NS}::checkbutton $top.want_ttk -variable want_ttk \
- -text [mc "Use themed widgets"]
if {$have_ttk} {
- ${NS}::label $top.ttk_note -text [mc "(change requires restart)"]
+ ${NS}::checkbutton $top.want_ttk -variable want_ttk \
+ -text [mc "Use themed widgets (change requires restart)"]
} else {
- ${NS}::label $top.ttk_note -text [mc "(currently unavailable)"]
+ ${NS}::checkbutton $top.want_ttk \
+ -text [mc "Use themed widgets"] -state disabled
}
- grid x $top.want_ttk $top.ttk_note -sticky w
+ grid x $top.want_ttk - -sticky w
${NS}::label $top.cdisp -text [mc "Colors: press to choose"]
grid $top.cdisp - -sticky w -pady 10
--
1.6.6
^ permalink raw reply related
* [PATCH 3/5] gitk: Set the font for all listbox widgets
From: Mark Hills @ 2009-12-28 20:04 UTC (permalink / raw)
To: git
In-Reply-To: <1262030643-12952-2-git-send-email-mark@pogo.org.uk>
This affects the font chooser.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
gitk-git/gitk | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 299a2ae..5cbc885 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -1877,6 +1877,7 @@ proc setoptions {} {
option add *Entry.font uifont startupFile
option add *Labelframe.font uifont startupFile
option add *Spinbox.font textfont startupFile
+ option add *Listbox.font mainfont startupFile
}
# Make a menu and submenus.
--
1.6.6
^ permalink raw reply related
* Re: immutable tags?
From: Carlos Santana @ 2009-12-28 20:39 UTC (permalink / raw)
To: david; +Cc: git
In-Reply-To: <alpine.DEB.2.00.0912281223440.24130@asgard.lang.hm>
Thanks for the reply David.
I think 'tagged directory' wasn't the appropriate phrase here.
In Subversion like systems branches and tags are same, i.e., both are
created using 'svn copy'. Branches are generally created for separate
line of development and tags for releasing software. So developers
follow convention of not checking in anything into tags. Otherwise
they are same.
I know that creating branches/tags doesn't involve copying files into
new directory in case of git. It will act as a pointer and make note
of changes thereafter. What I am not sure is difference between
branches and tags. Is it left to developer to follow subversion like
convention or git provides some mechanism to 'lock' tags?
-
CS.
On Mon, Dec 28, 2009 at 2:25 PM, <david@lang.hm> wrote:
> On Mon, 28 Dec 2009, Carlos Santana wrote:
>
>> I would like to know if there is any difference between branches and
>> tags. Is it only conceptual - convention to be followed by a developer
>> or some technical difference? e.g. : Is it possible to create
>> immutable tags so that nothing can be checked in to that 'tagged
>> directory'?
>
> tags are pointers into the tree. tags do not change.
>
> in git directories are not tagged, so I'm not sure what you are working
> towards here.
>
> David Lang
>
>
^ permalink raw reply
* Re: immutable tags?
From: Matthieu Moy @ 2009-12-28 20:58 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
In-Reply-To: <92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com>
Carlos Santana <neubyr@gmail.com> writes:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
A tag is just a named reference to a particular commit (or other
object indeed). Once you set a tag, it doesn't move (unless you
override it explicitely).
You can't prevent people from commiting something. It won't move the
tag, but it will create a new commit whose parent is the tagged
commit.
A branch is also a named reference to a commit, but the difference is
that when you commit, the current branch is updated (i.e. the
reference points to the new commit).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply
* Re: immutable tags?
From: david @ 2009-12-28 21:15 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
In-Reply-To: <92c9564e0912281239h49f9138ena8bbb3a63a337a55@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2296 bytes --]
On Mon, 28 Dec 2009, Carlos Santana wrote:
> Thanks for the reply David.
> I think 'tagged directory' wasn't the appropriate phrase here.
>
> In Subversion like systems branches and tags are same, i.e., both are
> created using 'svn copy'. Branches are generally created for separate
> line of development and tags for releasing software. So developers
> follow convention of not checking in anything into tags. Otherwise
> they are same.
>
> I know that creating branches/tags doesn't involve copying files into
> new directory in case of git. It will act as a pointer and make note
> of changes thereafter. What I am not sure is difference between
> branches and tags. Is it left to developer to follow subversion like
> convention or git provides some mechanism to 'lock' tags?
git works very differently than subversion. All of git history is a
branching tree of commits, all that a tag is is a pointer to a particular
commit somewhere in this tree. it does not have the be the most recent
commit on the branch.
all branches are (pretty much) equal, you can commit and do development on
any branch.
as you say above, branches are seperate lines of development and tags can
point at releases, but when you have a branch that you are doing
development on, you don't have to stop doing development there when you do
a release, anyone who checks out the tag will get the same thing no matter
what additional development you do on that branch in the future.
does this help?
David Lang
> -
> CS.
>
>
>
> On Mon, Dec 28, 2009 at 2:25 PM, <david@lang.hm> wrote:
>> On Mon, 28 Dec 2009, Carlos Santana wrote:
>>
>>> I would like to know if there is any difference between branches and
>>> tags. Is it only conceptual - convention to be followed by a developer
>>> or some technical difference? e.g. : Is it possible to create
>>> immutable tags so that nothing can be checked in to that 'tagged
>>> directory'?
>>
>> tags are pointers into the tree. tags do not change.
>>
>> in git directories are not tagged, so I'm not sure what you are working
>> towards here.
>>
>> David Lang
>>
>>
> --
> 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: immutable tags?
From: David Kågedal @ 2009-12-28 21:21 UTC (permalink / raw)
To: git
In-Reply-To: <92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com>
Carlos Santana <neubyr@gmail.com> writes:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
You are always in full control of your own repository, and have no
control over what other people do with their's. So you can't prevent
other people from changing the tags in their private repos, but you can
prevent them from propagating these changes back to you, or to a central
repository you control.
But perhaps there is nothing to worry about. I think the git commands
won't modify a tag unless you force it.
Also, if you use signed tags, you can be sure that they are not silently
replaced while still claiming to be tagged by you.
--
David Kågedal
^ permalink raw reply
* [PATCH] Smart-http: check if repository is OK to export before serving it
From: Tarmigan Casebolt @ 2009-12-28 21:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, spearce, Tarmigan Casebolt
In-Reply-To: <20091228170811.GE2252@spearce.org>
Similar to how git-daemon checks whether a repository is OK to be
exported, smart-http should also check. This check can be satisfied
in two different ways: the environmental variable GIT_HTTP_EXPORT_ALL
may be set to export all repositories, or the individual repository
may have the file git-daemon-export-ok.
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
---
OK, I see what you're saying Shawn. I've changed it back to "404
Not Found" again.
I've also reordered the new tests since the last time I sent it out.
The new tests use the same test as in
"static file is ok"
so put the new tests after that test in case that test breaks.
Documentation/git-http-backend.txt | 10 +++++++++
http-backend.c | 3 ++
t/lib-httpd/apache.conf | 5 ++++
t/t5560-http-backend.sh | 39 ++++++++++++++++++++++++++++++++++-
4 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 67aec06..c8fe08a 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -18,6 +18,11 @@ The program supports clients fetching using both the smart HTTP protcol
and the backwards-compatible dumb HTTP protocol, as well as clients
pushing using the smart HTTP protocol.
+It verifies that the directory has the magic file
+"git-daemon-export-ok", and it will refuse to export any git directory
+that hasn't explicitly been marked for export this way (unless the
+GIT_HTTP_EXPORT_ALL environmental variable is set).
+
By default, only the `upload-pack` service is enabled, which serves
'git-fetch-pack' and 'git-ls-remote' clients, which are invoked from
'git-fetch', 'git-pull', and 'git-clone'. If the client is authenticated,
@@ -70,6 +75,7 @@ Apache 2.x::
+
----------------------------------------------------------------
SetEnv GIT_PROJECT_ROOT /var/www/git
+SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
----------------------------------------------------------------
+
@@ -157,6 +163,10 @@ by the invoking web server, including:
* QUERY_STRING
* REQUEST_METHOD
+The GIT_HTTP_EXPORT_ALL environmental variable may be passed to
+'git-http-backend' to bypass the check for the "git-daemon-export-ok"
+file in each repository before allowing export of that repository.
+
The backend process sets GIT_COMMITTER_NAME to '$REMOTE_USER' and
GIT_COMMITTER_EMAIL to '$\{REMOTE_USER}@http.$\{REMOTE_ADDR\}',
ensuring that any reflogs created by 'git-receive-pack' contain some
diff --git a/http-backend.c b/http-backend.c
index f729488..345c12b 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -648,6 +648,9 @@ int main(int argc, char **argv)
setup_path();
if (!enter_repo(dir, 0))
not_found("Not a git repository: '%s'", dir);
+ if (!getenv("GIT_HTTP_EXPORT_ALL") &&
+ access("git-daemon-export-ok", F_OK) )
+ not_found("Repository not exported: '%s'", dir);
git_config(http_config, NULL);
cmd->imp(cmd_arg);
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 0fe3fd0..4961505 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -22,8 +22,13 @@ Alias /dumb/ www/
<Location /smart/>
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
+ SetEnv GIT_HTTP_EXPORT_ALL
+</Location>
+<Location /smart_noexport/>
+ SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
</Location>
ScriptAlias /smart/ ${GIT_EXEC_PATH}/git-http-backend/
+ScriptAlias /smart_noexport/ ${GIT_EXEC_PATH}/git-http-backend/
<Directory ${GIT_EXEC_PATH}>
Options None
</Directory>
diff --git a/t/t5560-http-backend.sh b/t/t5560-http-backend.sh
index ed034bc..04a9896 100755
--- a/t/t5560-http-backend.sh
+++ b/t/t5560-http-backend.sh
@@ -23,7 +23,7 @@ config() {
}
GET() {
- curl --include "$HTTPD_URL/smart/repo.git/$1" >out 2>/dev/null &&
+ curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null &&
tr '\015' Q <out |
sed '
s/Q$//
@@ -91,6 +91,7 @@ get_static_files() {
GET $IDX_URL "$1"
}
+SMART=smart
test_expect_success 'direct refs/heads/master not found' '
log_div "refs/heads/master"
GET refs/heads/master "404 Not Found"
@@ -99,6 +100,19 @@ test_expect_success 'static file is ok' '
log_div "getanyfile default"
get_static_files "200 OK"
'
+SMART=smart_noexport
+test_expect_success 'no export by default' '
+ log_div "no git-daemon-export-ok"
+ get_static_files "404 Not Found"
+'
+test_expect_success 'export if git-daemon-export-ok' '
+ log_div "git-daemon-export-ok"
+ (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+ touch git-daemon-export-ok
+ ) &&
+ get_static_files "200 OK"
+'
+SMART=smart
test_expect_success 'static file if http.getanyfile true is ok' '
log_div "getanyfile true"
config http.getanyfile true &&
@@ -145,7 +159,6 @@ test_expect_success 'http.receivepack false' '
GET info/refs?service=git-receive-pack "403 Forbidden" &&
POST git-receive-pack 0000 "403 Forbidden"
'
-
run_backend() {
REQUEST_METHOD=GET \
GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \
@@ -194,6 +207,28 @@ GET /smart/repo.git/$LOOSE_URL HTTP/1.1 200
GET /smart/repo.git/$PACK_URL HTTP/1.1 200
GET /smart/repo.git/$IDX_URL HTTP/1.1 200
+### no git-daemon-export-ok
+###
+GET /smart_noexport/repo.git/HEAD HTTP/1.1 404 -
+GET /smart_noexport/repo.git/info/refs HTTP/1.1 404 -
+GET /smart_noexport/repo.git/objects/info/packs HTTP/1.1 404 -
+GET /smart_noexport/repo.git/objects/info/alternates HTTP/1.1 404 -
+GET /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 404 -
+GET /smart_noexport/repo.git/$LOOSE_URL HTTP/1.1 404 -
+GET /smart_noexport/repo.git/$PACK_URL HTTP/1.1 404 -
+GET /smart_noexport/repo.git/$IDX_URL HTTP/1.1 404 -
+
+### git-daemon-export-ok
+###
+GET /smart_noexport/repo.git/HEAD HTTP/1.1 200
+GET /smart_noexport/repo.git/info/refs HTTP/1.1 200
+GET /smart_noexport/repo.git/objects/info/packs HTTP/1.1 200
+GET /smart_noexport/repo.git/objects/info/alternates HTTP/1.1 200 -
+GET /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 200 -
+GET /smart_noexport/repo.git/$LOOSE_URL HTTP/1.1 200
+GET /smart_noexport/repo.git/$PACK_URL HTTP/1.1 200
+GET /smart_noexport/repo.git/$IDX_URL HTTP/1.1 200
+
### getanyfile true
###
GET /smart/repo.git/HEAD HTTP/1.1 200
--
1.6.6.1.g8d7b9
^ permalink raw reply related
* [PATCH RFC 1/2] Smart-http tests: Break test t5560-http-backend into pieces
From: Tarmigan Casebolt @ 2009-12-28 22:04 UTC (permalink / raw)
To: Shawn O . Pearce; +Cc: git, Tarmigan Casebolt
This should introduce no functional change in the tests or the amount
of test coverage.
Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
---
t/t5560-http-backend.sh | 135 +-------------------------------------
t/t5561-http-backend-noserver.sh | 52 +++++++++++++++
t/t556x_common | 105 +++++++++++++++++++++++++++++
3 files changed, 158 insertions(+), 134 deletions(-)
create mode 100755 t/t5561-http-backend-noserver.sh
create mode 100755 t/t556x_common
diff --git a/t/t5560-http-backend.sh b/t/t5560-http-backend.sh
index ed034bc..b0d08e2 100755
--- a/t/t5560-http-backend.sh
+++ b/t/t5560-http-backend.sh
@@ -12,16 +12,6 @@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5560'}
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
-find_file() {
- cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
- find $1 -type f |
- sed -e 1q
-}
-
-config() {
- git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" config $1 $2
-}
-
GET() {
curl --include "$HTTPD_URL/smart/repo.git/$1" >out 2>/dev/null &&
tr '\015' Q <out |
@@ -52,130 +42,7 @@ log_div() {
echo "###" >>"$HTTPD_ROOT_PATH"/access.log
}
-test_expect_success 'setup repository' '
- echo content >file &&
- git add file &&
- git commit -m one &&
-
- mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
- (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
- git --bare init &&
- : >objects/info/alternates &&
- : >objects/info/http-alternates
- ) &&
- git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
- git push public master:master &&
-
- (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
- git repack -a -d
- ) &&
-
- echo other >file &&
- git add file &&
- git commit -m two &&
- git push public master:master &&
-
- LOOSE_URL=$(find_file objects/??) &&
- PACK_URL=$(find_file objects/pack/*.pack) &&
- IDX_URL=$(find_file objects/pack/*.idx)
-'
-
-get_static_files() {
- GET HEAD "$1" &&
- GET info/refs "$1" &&
- GET objects/info/packs "$1" &&
- GET objects/info/alternates "$1" &&
- GET objects/info/http-alternates "$1" &&
- GET $LOOSE_URL "$1" &&
- GET $PACK_URL "$1" &&
- GET $IDX_URL "$1"
-}
-
-test_expect_success 'direct refs/heads/master not found' '
- log_div "refs/heads/master"
- GET refs/heads/master "404 Not Found"
-'
-test_expect_success 'static file is ok' '
- log_div "getanyfile default"
- get_static_files "200 OK"
-'
-test_expect_success 'static file if http.getanyfile true is ok' '
- log_div "getanyfile true"
- config http.getanyfile true &&
- get_static_files "200 OK"
-'
-test_expect_success 'static file if http.getanyfile false fails' '
- log_div "getanyfile false"
- config http.getanyfile false &&
- get_static_files "403 Forbidden"
-'
-
-test_expect_success 'http.uploadpack default enabled' '
- log_div "uploadpack default"
- GET info/refs?service=git-upload-pack "200 OK" &&
- POST git-upload-pack 0000 "200 OK"
-'
-test_expect_success 'http.uploadpack true' '
- log_div "uploadpack true"
- config http.uploadpack true &&
- GET info/refs?service=git-upload-pack "200 OK" &&
- POST git-upload-pack 0000 "200 OK"
-'
-test_expect_success 'http.uploadpack false' '
- log_div "uploadpack false"
- config http.uploadpack false &&
- GET info/refs?service=git-upload-pack "403 Forbidden" &&
- POST git-upload-pack 0000 "403 Forbidden"
-'
-
-test_expect_success 'http.receivepack default disabled' '
- log_div "receivepack default"
- GET info/refs?service=git-receive-pack "403 Forbidden" &&
- POST git-receive-pack 0000 "403 Forbidden"
-'
-test_expect_success 'http.receivepack true' '
- log_div "receivepack true"
- config http.receivepack true &&
- GET info/refs?service=git-receive-pack "200 OK" &&
- POST git-receive-pack 0000 "200 OK"
-'
-test_expect_success 'http.receivepack false' '
- log_div "receivepack false"
- config http.receivepack false &&
- GET info/refs?service=git-receive-pack "403 Forbidden" &&
- POST git-receive-pack 0000 "403 Forbidden"
-'
-
-run_backend() {
- REQUEST_METHOD=GET \
- GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \
- PATH_INFO="$2" \
- git http-backend >act.out 2>act.err
-}
-
-path_info() {
- if test $1 = 0; then
- run_backend "$2"
- else
- test_must_fail run_backend "$2" &&
- echo "fatal: '$2': aliased" >exp.err &&
- test_cmp exp.err act.err
- fi
-}
-
-test_expect_success 'http-backend blocks bad PATH_INFO' '
- config http.getanyfile true &&
-
- run_backend 0 /repo.git/HEAD &&
-
- run_backend 1 /repo.git/../HEAD &&
- run_backend 1 /../etc/passwd &&
- run_backend 1 ../etc/passwd &&
- run_backend 1 /etc//passwd &&
- run_backend 1 /etc/./passwd &&
- run_backend 1 /etc/.../passwd &&
- run_backend 1 //domain/data.txt
-'
+. "$TEST_DIRECTORY"/t556x_common
cat >exp <<EOF
diff --git a/t/t5561-http-backend-noserver.sh b/t/t5561-http-backend-noserver.sh
new file mode 100755
index 0000000..501b328
--- /dev/null
+++ b/t/t5561-http-backend-noserver.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+test_description='test git-http-backend-noserver'
+. ./test-lib.sh
+
+HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
+
+GET() {
+ return 0
+}
+
+POST() {
+ return 0
+}
+
+logdiv() {
+ return 0
+}
+
+. "$TEST_DIRECTORY"/t556x_common
+
+run_backend() {
+ REQUEST_METHOD=GET \
+ GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \
+ PATH_INFO="$2" \
+ git http-backend >act.out 2>act.err
+}
+
+path_info() {
+ if test $1 = 0; then
+ run_backend "$2"
+ else
+ test_must_fail run_backend "$2" &&
+ echo "fatal: '$2': aliased" >exp.err &&
+ test_cmp exp.err act.err
+ fi
+}
+
+test_expect_success 'http-backend blocks bad PATH_INFO' '
+ config http.getanyfile true &&
+
+ run_backend 0 /repo.git/HEAD &&
+
+ run_backend 1 /repo.git/../HEAD &&
+ run_backend 1 /../etc/passwd &&
+ run_backend 1 ../etc/passwd &&
+ run_backend 1 /etc//passwd &&
+ run_backend 1 /etc/./passwd &&
+ run_backend 1 /etc/.../passwd &&
+ run_backend 1 //domain/data.txt
+'
+test_done
diff --git a/t/t556x_common b/t/t556x_common
new file mode 100755
index 0000000..1845072
--- /dev/null
+++ b/t/t556x_common
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+find_file() {
+ cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+ find $1 -type f |
+ sed -e 1q
+}
+
+config() {
+ git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" config $1 $2
+}
+
+test_expect_success 'setup repository' '
+ echo content >file &&
+ git add file &&
+ git commit -m one &&
+
+ mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+ (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+ git --bare init &&
+ : >objects/info/alternates &&
+ : >objects/info/http-alternates
+ ) &&
+ git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+ git push public master:master &&
+
+ (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+ git repack -a -d
+ ) &&
+
+ echo other >file &&
+ git add file &&
+ git commit -m two &&
+ git push public master:master &&
+
+ LOOSE_URL=$(find_file objects/??) &&
+ PACK_URL=$(find_file objects/pack/*.pack) &&
+ IDX_URL=$(find_file objects/pack/*.idx)
+'
+
+get_static_files() {
+ GET HEAD "$1" &&
+ GET info/refs "$1" &&
+ GET objects/info/packs "$1" &&
+ GET objects/info/alternates "$1" &&
+ GET objects/info/http-alternates "$1" &&
+ GET $LOOSE_URL "$1" &&
+ GET $PACK_URL "$1" &&
+ GET $IDX_URL "$1"
+}
+
+test_expect_success 'direct refs/heads/master not found' '
+ log_div "refs/heads/master"
+ GET refs/heads/master "404 Not Found"
+'
+test_expect_success 'static file is ok' '
+ log_div "getanyfile default"
+ get_static_files "200 OK"
+'
+test_expect_success 'static file if http.getanyfile true is ok' '
+ log_div "getanyfile true"
+ config http.getanyfile true &&
+ get_static_files "200 OK"
+'
+test_expect_success 'static file if http.getanyfile false fails' '
+ log_div "getanyfile false"
+ config http.getanyfile false &&
+ get_static_files "403 Forbidden"
+'
+
+test_expect_success 'http.uploadpack default enabled' '
+ log_div "uploadpack default"
+ GET info/refs?service=git-upload-pack "200 OK" &&
+ POST git-upload-pack 0000 "200 OK"
+'
+test_expect_success 'http.uploadpack true' '
+ log_div "uploadpack true"
+ config http.uploadpack true &&
+ GET info/refs?service=git-upload-pack "200 OK" &&
+ POST git-upload-pack 0000 "200 OK"
+'
+test_expect_success 'http.uploadpack false' '
+ log_div "uploadpack false"
+ config http.uploadpack false &&
+ GET info/refs?service=git-upload-pack "403 Forbidden" &&
+ POST git-upload-pack 0000 "403 Forbidden"
+'
+
+test_expect_success 'http.receivepack default disabled' '
+ log_div "receivepack default"
+ GET info/refs?service=git-receive-pack "403 Forbidden" &&
+ POST git-receive-pack 0000 "403 Forbidden"
+'
+test_expect_success 'http.receivepack true' '
+ log_div "receivepack true"
+ config http.receivepack true &&
+ GET info/refs?service=git-receive-pack "200 OK" &&
+ POST git-receive-pack 0000 "200 OK"
+'
+test_expect_success 'http.receivepack false' '
+ log_div "receivepack false"
+ config http.receivepack false &&
+ GET info/refs?service=git-receive-pack "403 Forbidden" &&
+ POST git-receive-pack 0000 "403 Forbidden"
+'
--
1.6.6.62.g67314
^ permalink raw reply related
* [PATCH RFC 2/2] Smart-http tests: Test http-backend without curl or a webserver
From: Tarmigan Casebolt @ 2009-12-28 22:04 UTC (permalink / raw)
To: Shawn O . Pearce; +Cc: git, Tarmigan Casebolt
In-Reply-To: <1262037899-16786-1-git-send-email-tarmigan+git@gmail.com>
This reuses many of the tests from t5560 but runs those tests without curl
or a webserver. This will hopefully increase the testing coverage for
http-backend because it does not require users to set GIT_TEST_HTTPD.
Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
---
t/t5561-http-backend-noserver.sh | 45 ++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/t/t5561-http-backend-noserver.sh b/t/t5561-http-backend-noserver.sh
index 501b328..6371e97 100755
--- a/t/t5561-http-backend-noserver.sh
+++ b/t/t5561-http-backend-noserver.sh
@@ -5,12 +5,35 @@ test_description='test git-http-backend-noserver'
HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
+run_backend() {
+ echo "$3"| \
+ QUERY_STRING="${2#*\?}" \
+ GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \
+ PATH_INFO="${2%%\?*}" \
+ git http-backend >act.out 2>act.err
+}
+
GET() {
- return 0
+ REQUEST_METHOD="GET" \
+ run_backend 0 "/repo.git/$1" &&
+ grep "Status" act.out >act
+ if [ $? -ne 1 ];
+ then
+ printf "Status: $2\r\n" > exp &&
+ test_cmp exp act
+ fi
}
POST() {
- return 0
+ REQUEST_METHOD="POST" \
+ CONTENT_TYPE="application/x-$1-request" \
+ run_backend 0 "/repo.git/$1" "$2" &&
+ grep "Status" act.out >act
+ if [ $? -ne 1 ];
+ then
+ printf "Status: $3\r\n" > exp &&
+ test_cmp exp act
+ fi
}
logdiv() {
@@ -19,26 +42,10 @@ logdiv() {
. "$TEST_DIRECTORY"/t556x_common
-run_backend() {
- REQUEST_METHOD=GET \
- GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \
- PATH_INFO="$2" \
- git http-backend >act.out 2>act.err
-}
-
-path_info() {
- if test $1 = 0; then
- run_backend "$2"
- else
- test_must_fail run_backend "$2" &&
- echo "fatal: '$2': aliased" >exp.err &&
- test_cmp exp.err act.err
- fi
-}
-
test_expect_success 'http-backend blocks bad PATH_INFO' '
config http.getanyfile true &&
+ REQUEST_METHOD="GET" &&
run_backend 0 /repo.git/HEAD &&
run_backend 1 /repo.git/../HEAD &&
--
1.6.6.62.g67314
^ permalink raw reply related
* Re: immutable tags?
From: Jakub Narebski @ 2009-12-28 22:22 UTC (permalink / raw)
To: Carlos Santana; +Cc: git
In-Reply-To: <92c9564e0912281204h13c6a566w95069023e6909eda@mail.gmail.com>
Carlos Santana <neubyr@gmail.com> writes:
> I would like to know if there is any difference between branches and
> tags. Is it only conceptual - convention to be followed by a developer
> or some technical difference? e.g. : Is it possible to create
> immutable tags so that nothing can be checked in to that 'tagged
> directory'?
There is difference. You can commit only on top of local branches, in
the refs/heads/* namespace (or on top of detached HEAD).
For branches:
$ git checkout A # switches current branch, HEAD points to A
$ git commit # creates new commit on branch A, A advances (changes)
* by default fetch gets all branches
* by default push transfers matching branches
* default refspec is refs/heads/*:refs/remotes/origin/*
For tags:
$ git checkout B # detaches HEAD, HEAD points directly to B^{} commit
# you are on 'no branch'
$ git commit # advances HEAD, tag B does not change
* by default fetch autofollows tags (gets tags that point to commits
you have)
* you need to push tags explicitely
* default refspec is refs/tags/*:refs/tags/* (mirror 1:1)
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply
* Re: immutable tags?
From: Carlos Santana @ 2009-12-28 22:22 UTC (permalink / raw)
To: git; +Cc: davidk
In-Reply-To: <87d41yvlpm.fsf@krank.kagedal.org>
Got it now.
Thank you all for explanation...
-
CS.
On Mon, Dec 28, 2009 at 3:21 PM, David Kågedal <davidk@lysator.liu.se> wrote:
> The following message is a courtesy copy of an article
> that has been posted to gmane.comp.version-control.git as well.
>
> Carlos Santana <neubyr@gmail.com> writes:
>
>> I would like to know if there is any difference between branches and
>> tags. Is it only conceptual - convention to be followed by a developer
>> or some technical difference? e.g. : Is it possible to create
>> immutable tags so that nothing can be checked in to that 'tagged
>> directory'?
>
> You are always in full control of your own repository, and have no
> control over what other people do with their's. So you can't prevent
> other people from changing the tags in their private repos, but you can
> prevent them from propagating these changes back to you, or to a central
> repository you control.
>
> But perhaps there is nothing to worry about. I think the git commands
> won't modify a tag unless you force it.
>
> Also, if you use signed tags, you can be sure that they are not silently
> replaced while still claiming to be tagged by you.
>
> --
> David Kågedal
>
^ permalink raw reply
* Re: Newbie to git
From: Jorge Bastos @ 2009-12-28 22:23 UTC (permalink / raw)
To: Eugene Sajine; +Cc: Junio C Hamano, git
In-Reply-To: <76c5b8580912280851k141bc6cev36df72b1993b8359@mail.gmail.com>
> Your /home/apache/gitprojects is a folder where your git repositories
> are supposed to be placed.
> Your Git repository = your project.
>
> By running a git daemon the way you do - you say that you are going to
> serve all repositories from /home/apache/gitprojects.
>
> Bare repo = repo without working copy - the one which contains only
> history and git objects (imagine it to be only .git folder from normal
> repo) Therefore for bare repos there is a naming convention so they
> have .git extension, while normal repo doesn't. So, myProject.git is
> server based bare repo, while myProject is a local repo.
>
> Finally you have /home/apache/gitprojects/myProject.git
>
> The URL to clone from there will be - should be shown to you by CGIT
> if you have everything correctly set up
> git://192.168.1.206/myProject.git
Lets see if i understood:
my steps:
git init --bare /home/apache/gitbare
cd /home/apache/gitprojects
mkdir project
cd project
git init myproject.git
on gitweb, i see the project names in this format:
"myproject.git/.git"
for example, for the git repo on git.kernel.org, it is shown as:
"git/git.git"
shouldn't it appear in the same way here?
i have:
$projectroot = "/home/apache/gitprojects/project/";
for CGIT, i have:
repo.path=/home/apache/gitprojects/project/myproject.git
but it doesn't show nothing after i click it.
on the other hand, i cannot push changes via remote, after cloned the
repository with:
git clone git://192.168.1.206/project/myproject.git
add some files
git add .
git commit -m "aaaa"
git push --tags "origin" master:master
and get:
error: unpack failed: unpack-objects abnormal exit
To git://192.168.1.206/project/myproject.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to
'git://192.168.1.206/project/myproject.git'
Failed
i feel i'm almost there but something is missing here... sorry my
newbienest!
^ 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