* Re: [ANNOUNCE] GIT 0.99.9g
From: Daniel Barkalow @ 2005-11-10 18:31 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, H. Peter Anvin, git, linux-kernel
In-Reply-To: <20051110180311.GR30496@pasky.or.cz>
On Thu, 10 Nov 2005, Petr Baudis wrote:
> Dear diary, on Thu, Nov 10, 2005 at 06:44:43PM CET, I got a letter
> where Junio C Hamano <junkio@cox.net> said that...
> > "H. Peter Anvin" <hpa@zytor.com> writes:
> >
> > > May I *STRONGLY* urge you to name that something different.
> > > "lost+found" is a name with special properties in Unix; for example,
> > > many backup solutions will ignore a directory with that name.
> >
> > Yeah, the original proposal (in TODO list) explicitly stated why
> > I chose lost-found instead of lost+found back then, and somebody
> > on the list (could have been Pasky but I may be mistaken) said
> > not to worry.
>
> It was the Large Angry SCM. I share your concern.
>
> > In any case, if we go the route Daniel suggests, we would not be
> > storing anything on the filesystem ourselves so this would be a
> > non-issue.
>
> I like Daniel's route as well, for the separate command. But it would be
> nice to also have a way to tell git-fsck-cache to save the lost+found
> refs as it goes, much like the filesystem fsck. So if it reports some
> unreachable refs, you will not need to tell it to do the same job
> _another_ time to find out the refs and pass them to gitk. Then again,
> if we do this, the utility of a separate command will be questionable.
Maybe git-fsck-objects should have an option to make it note dangling
objects of certain types, and then count these as reachable? (That is, you
want the head of an unreachable chain listed for recovery, but not other
things reachable from it; you also may want the list of blobs and trees
not reachable either from a ref or from something listed for recovery, but
not omitting a blob reachable only from an unreachable tree)
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply
* Re: Where should I post questions on GIT usage ?
From: Tony Luck @ 2005-11-10 18:27 UTC (permalink / raw)
To: Franck; +Cc: git
In-Reply-To: <cda58cb80511100017v12f8ec77v@mail.gmail.com>
> I'm starting using GIT, and I'm having a couple of basic questions to
> ask. Is it the correct place to post them or is there any other
> mailing list related to GIT usage ?
Read Documentattion/tutorial.txt (and any relevent Documentation/howto/* files).
Search the archives.
If you still have problems, then the best format for questions here seems
to be:
1) I was trying to do ... insert high level description here.
2) So I executed these git commands ...
3) And what happened was ...
Skipping step 1 can cause delays while people answer questions about
the specific micro-problems you had with the commands in step 2, when
the real answer is to use some totally different command.
-Tony (far more frequently an asker-of-questions than an answerer)
^ permalink raw reply
* [PATCH] C implementation of the 'git' program.
From: Andreas Ericsson @ 2005-11-10 18:26 UTC (permalink / raw)
To: git
Subject: [PATCH] C implementation of the 'git' program.
This patch provides a C implementation of the 'git' program and introduces
support for putting the git-* commands in their own directory. It also
saves some time on executing git-* commands in a tight loop and it prints
the currently available git commands in a nicely formatted list.
The location of the GIT_LIB can be obtained by running
git --lib
which will hopefully give porcelainistas ample time to adapt their heavy-duty
loops to use the programs in the library directly if they wish, although
that's strictly speaking not really necessary any more.
Some timing values for 10000 invocations of git-var >&/dev/null;
git.sh: 24.194s
git.c: 9.044s
git-var: 7.377s
The git-<tab><tab> behaviour can still be obtained by adding
PATH=$PATH:$(git --lib)
to one's .profile.
Experimental libraries can be used by either setting the environment variable
GIT_LIB, or by using
git --lib=/some/experimental/lib
As a nice side-effect, the patch also fixes the problem with
make
make prefix=/usr install
Signed-off-by: Andreas Ericsson <ae@op5.se>
---
Documentation/git.txt | 6 +
Makefile | 24 ++---
git.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++++
git.sh | 76 -----------------
4 files changed, 239 insertions(+), 91 deletions(-)
create mode 100644 git.c
delete mode 100755 git.sh
applies-to: 6466c53ae80cddbb581c5fdb2332f9321fade867
b2b97ed9901915dce573516e3a6f10a60bc0c04a
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 2f9622f..848d09a 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -8,7 +8,7 @@ git - the stupid content tracker
SYNOPSIS
--------
-'git-<command>' <args>
+'git' [--version] [--lib[=GIT_LIB]] [--help] <command> <args>
DESCRIPTION
-----------
@@ -535,7 +535,9 @@ include::../README[]
Author
------
-Written by Linus Torvalds <torvalds@osdl.org> and the git-list <git@vger.kernel.org>.
+git's founding father is Linus Torvalds <torvalds@osdl.org>.
+The current git nurse is Junio C. Hamano <junkio@cox.net>.
+Numerous contributions stem from the git-list <git@vger.kernel.org>.
Documentation
--------------
diff --git a/Makefile b/Makefile
index b202be1..80d865b 100644
--- a/Makefile
+++ b/Makefile
@@ -59,6 +59,8 @@ ALL_CFLAGS = $(CFLAGS)
prefix = $(HOME)
bindir = $(prefix)/bin
+# XXX set libdir to bindir for now to not break the porcelain
+libdir = $(bindir)
template_dir = $(prefix)/share/git-core/templates/
GIT_PYTHON_DIR = $(prefix)/share/git-core/python
# DESTDIR=
@@ -86,7 +88,7 @@ SCRIPT_SH = \
git-prune.sh git-pull.sh git-push.sh git-rebase.sh \
git-repack.sh git-request-pull.sh git-reset.sh \
git-resolve.sh git-revert.sh git-sh-setup.sh git-status.sh \
- git-tag.sh git-verify-tag.sh git-whatchanged.sh git.sh \
+ git-tag.sh git-verify-tag.sh git-whatchanged.sh \
git-applymbox.sh git-applypatch.sh git-am.sh \
git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
git-merge-resolve.sh git-merge-ours.sh git-grep.sh
@@ -323,19 +325,13 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)
export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
### Build rules
-all: $(PROGRAMS) $(SCRIPTS)
+all: $(PROGRAMS) $(SCRIPTS) git
-all:
- $(MAKE) -C templates
+git: git.c
+ $(CC) $(CFLAGS) $< -o $@ -DDEFAULT_GIT_LIB='"$(libdir)"' -DGIT_VERSION='"$(GIT_VERSION)"'
-git: git.sh Makefile
- rm -f $@+ $@
- sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
- -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
- -e 's/@@X@@/$(X)/g' \
- $(GIT_LIST_TWEAK) <$@.sh >$@+
- chmod +x $@+
- mv $@+ $@
+# Force rebuild so that "make prefix=<something> install" Just Works.
+.PHONY: git
$(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh
rm -f $@
@@ -420,8 +416,10 @@ check:
### Installation rules
install: $(PROGRAMS) $(SCRIPTS)
+ $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(libdir))
+ $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(libdir))
$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir))
- $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(bindir))
+ $(INSTALL) git $(call shellquote,$(DESTDIR)$(bindir))
$(MAKE) -C templates install
$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
$(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
diff --git a/git.c b/git.c
new file mode 100644
index 0000000..8c01723
--- /dev/null
+++ b/git.c
@@ -0,0 +1,224 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <glob.h>
+
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
+static const char git_usage[] =
+ "Usage: git [--version] [--lib[=<GIT_LIB>]] COMMAND [ OPTIONS ]";
+
+struct string_list {
+ size_t len;
+ char *str;
+ struct string_list *next;
+};
+
+/* most gui terms set COLUMNS (although some don't export it) */
+static int columns(void)
+{
+ char *col_string = getenv("COLUMNS");
+ int n_cols = 0;
+
+ if (col_string && (n_cols = atoi(col_string)) > 0)
+ return n_cols;
+
+ return 80;
+}
+
+static inline void mput_char(char c, unsigned int num)
+{
+ unsigned int i;
+
+ for(i = 0; i < num; i++)
+ putchar(c);
+}
+
+static void fmt_print_string_list(struct string_list *list, int longest)
+{
+ int cols;
+ int space = longest + 1; /* space between start of string1 and string2 */
+ int max_cols = columns() - 1;
+
+ cols = max_cols / space;
+
+ if(cols < 1) {
+ cols = 1;
+ space = 0;
+ }
+
+ while (list) {
+ int c = cols;
+ printf(" ");
+
+ for(c = cols; c; c--) {
+ if (!list)
+ break;
+
+ printf("%s", list->str);
+
+ if (space && c != 1)
+ mput_char(' ', space - list->len);
+
+ list = list->next;
+ }
+
+ putchar('\n');
+ }
+}
+
+#ifdef __GNUC__
+static void usage(char *path, const char *fmt, ...)
+ __attribute__((__format__(__printf__, 2, 3), __noreturn__));
+#endif
+
+static void usage(char *path, const char *fmt, ...)
+{
+ struct string_list *list, *tail;
+ unsigned int longest = 0, i;
+ glob_t gl;
+
+ list = tail = NULL;
+
+ if (!fmt)
+ puts(git_usage);
+ else {
+ printf("git: ");
+ va_list ap;
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ va_end(ap);
+ putchar('\n');
+ }
+
+ putchar('\n');
+
+ if (!path)
+ exit(1);
+
+ if (chdir(path) < 0) {
+ printf("git: '%s': %s\n", path, strerror(errno));
+ exit(1);
+ }
+
+ i = glob("git-*", 0, NULL, &gl);
+ if (i) {
+ switch(i) {
+ case GLOB_NOSPACE:
+ puts("Out of memory while glob()'ing commands");
+ exit(2);
+ case GLOB_ABORTED:
+ printf("'%s': Read error: %s\n", path, strerror(errno));
+ exit(2);
+ case GLOB_NOMATCH:
+ printf("No git commands available in '%s'.\n", path);
+ printf("Do you need to specify --lib or set GIT_LIB?\n");
+ exit(1);
+ }
+ }
+
+ for (i = 0; i < gl.gl_pathc; i++) {
+ int len = strlen(gl.gl_pathv[i] + 4);
+
+ if(access(gl.gl_pathv[i], X_OK))
+ continue;
+
+ if (longest < len)
+ longest = len;
+
+ if (!tail)
+ tail = list = malloc(sizeof(struct string_list));
+ else {
+ tail->next = malloc(sizeof(struct string_list));
+ tail = tail->next;
+ }
+ tail->len = len;
+ tail->str = gl.gl_pathv[i] + 4;
+ tail->next = NULL;
+ }
+
+ printf("git commands available in '%s'\n", path);
+ printf("----------------------------");
+ mput_char('-', strlen(path));
+ putchar('\n');
+ fmt_print_string_list(list, longest);
+
+ puts("\nman-pages can be reached through 'man git-<COMMAND>'\n");
+
+ exit(1);
+}
+
+int main(int argc, char **argv, char **envp)
+{
+ char git_command[PATH_MAX + 1];
+ char wd[PATH_MAX + 1];
+ char *git_lib = getenv("GIT_LIB");
+ int i, len;
+
+ getcwd(wd, PATH_MAX);
+
+ if (!git_lib)
+ git_lib = DEFAULT_GIT_LIB;
+
+ if (argc == 1)
+ usage(git_lib, NULL);
+
+ for (i = 1; i < argc; i++) {
+ char *arg = argv[i];
+
+ if (strncmp(arg, "--", 2))
+ break;
+
+ arg += 2;
+
+ if (!strncmp(arg, "lib", 3)) {
+ arg += 3;
+ if (*arg == '=')
+ git_lib = arg + 1;
+ else {
+ puts(git_lib);
+ exit(0);
+ }
+ }
+ else if (!strcmp(arg, "version")) {
+ printf("git version %s\n", GIT_VERSION);
+ exit(0);
+ }
+ else if (!strcmp(arg, "help"))
+ usage(git_lib, NULL);
+ else
+ usage(NULL, NULL);
+ }
+
+ if (i >= argc)
+ usage(NULL, NULL);
+
+ /* allow relative paths, but run with exact */
+ if (chdir(git_lib)) {
+ printf("git: '%s': %s\n", git_lib, strerror(errno));
+ exit (1);
+ }
+
+ getcwd(git_command, sizeof(git_command));
+ chdir(wd);
+
+ len = strlen(git_command);
+ strncat(&git_command[len], "/git-", sizeof(git_command) - len);
+ len += 5;
+ strncat(&git_command[len], argv[i], sizeof(git_command) - len);
+
+ if (access(git_command, X_OK))
+ usage(git_lib, "'%s' is not a git-command", argv[i]);
+
+ /* execve() can only ever return if it fails */
+ execve(git_command, &argv[i], envp);
+ printf("Failed to run command '%s': %s\n", git_command, strerror(errno));
+
+ return 1;
+}
diff --git a/git.sh b/git.sh
deleted file mode 100755
index 94940ae..0000000
--- a/git.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-cmd=
-path=$(dirname "$0")
-case "$#" in
-0) ;;
-*) cmd="$1"
- shift
- case "$cmd" in
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "git version @@GIT_VERSION@@"
- exit 0 ;;
- esac
-
- test -x "$path/git-$cmd" && exec "$path/git-$cmd" "$@"
-
- case '@@X@@' in
- '')
- ;;
- *)
- test -x "$path/git-$cmd@@X@@" &&
- exec "$path/git-$cmd@@X@@" "$@"
- ;;
- esac
- ;;
-esac
-
-echo "Usage: git COMMAND [OPTIONS] [TARGET]"
-if [ -n "$cmd" ]; then
- echo "git command '$cmd' not found."
-fi
-echo "git commands are:"
-
-fmt <<\EOF | sed -e 's/^/ /'
-add
-apply
-archimport
-bisect
-branch
-checkout
-cherry
-clone
-commit
-count-objects
-cvsimport
-diff
-fetch
-format-patch
-fsck-objects
-get-tar-commit-id
-init-db
-log
-ls-remote
-octopus
-pack-objects
-parse-remote
-patch-id
-prune
-pull
-push
-rebase
-relink
-rename
-repack
-request-pull
-reset
-resolve
-revert
-send-email
-shortlog
-show-branch
-status
-tag
-verify-tag
-whatchanged
-EOF
---
0.99.9.GIT
^ permalink raw reply related
* Re: [ANNOUNCE] GIT 0.99.9g
From: Petr Baudis @ 2005-11-10 18:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: H. Peter Anvin, git, linux-kernel, barkalow
In-Reply-To: <7v4q6k1jp0.fsf@assigned-by-dhcp.cox.net>
Dear diary, on Thu, Nov 10, 2005 at 06:44:43PM CET, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> "H. Peter Anvin" <hpa@zytor.com> writes:
>
> > May I *STRONGLY* urge you to name that something different.
> > "lost+found" is a name with special properties in Unix; for example,
> > many backup solutions will ignore a directory with that name.
>
> Yeah, the original proposal (in TODO list) explicitly stated why
> I chose lost-found instead of lost+found back then, and somebody
> on the list (could have been Pasky but I may be mistaken) said
> not to worry.
It was the Large Angry SCM. I share your concern.
> In any case, if we go the route Daniel suggests, we would not be
> storing anything on the filesystem ourselves so this would be a
> non-issue.
I like Daniel's route as well, for the separate command. But it would be
nice to also have a way to tell git-fsck-cache to save the lost+found
refs as it goes, much like the filesystem fsck. So if it reports some
unreachable refs, you will not need to tell it to do the same job
_another_ time to find out the refs and pass them to gitk. Then again,
if we do this, the utility of a separate command will be questionable.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
^ permalink raw reply
* Re: git and cogito update, gitweb problem
From: Junio C Hamano @ 2005-11-10 17:52 UTC (permalink / raw)
To: Nico -telmich- Schottelius; +Cc: git
In-Reply-To: <20051110120201.GE22064@schottelius.org>
Nico -telmich- Schottelius <nico-linux-git@schottelius.org> writes:
> I just wanted to present you an automatic git and cogito updating script,
> but I've still the problem with '+' in filenames in gitweb [0].
Project names (and perhaps tag names) could contain characters
that need to be URL escaped as well.
I think this minimally should fix it for the list of files on
the commit page (a=commit) but I see the same problem in other
pages everywhere.
---
diff --git a/gitweb.cgi b/gitweb.cgi
index b8f1537..7b05fe2 100755
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -10,7 +10,7 @@
use strict;
use warnings;
use CGI qw(:standard :escapeHTML -nosticky);
-use CGI::Util qw(unescape);
+use CGI::Util qw(unescape escape);
use CGI::Carp qw(fatalsToBrowser);
use Fcntl ':mode';
@@ -1393,7 +1395,7 @@ sub git_tree {
my $t_type = $2;
my $t_hash = $3;
my $t_name = $4;
- $file_key = ";f=$base$t_name";
+ $file_key = ";f=" . escape("$base$t_name");
if ($alternate) {
print "<tr class=\"dark\">\n";
} else {
@@ -1628,23 +1630,26 @@ sub git_commit {
$expires = "+1d";
}
git_header_html(undef, $expires);
+
+ my $eproject = escape($project);
+
print "<div class=\"page_nav\">\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=summary"}, "summary") .
+ " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=shortlog;h=$hash"}, "shortlog") .
+ " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=log;h=$hash"}, "log") .
" | commit";
if (defined $co{'parent'}) {
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff");
+ print " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=commitdiff;h=$hash"}, "commitdiff");
}
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . "\n" .
+ print " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . "\n" .
"<br/><br/></div>\n";
if (defined $co{'parent'}) {
print "<div>\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=commitdiff;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
"</div>\n";
} else {
print "<div>\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=tree;h=$co{'tree'};hb=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
"</div>\n";
}
print "<div class=\"title_text\">\n" .
@@ -1665,19 +1670,19 @@ sub git_commit {
print "<tr>" .
"<td>tree</td>" .
"<td style=\"font-family:monospace\">" .
- $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash", class => "list"}, $co{'tree'}) .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=tree;h=$co{'tree'};hb=$hash", class => "list"}, $co{'tree'}) .
"</td>" .
- "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
+ "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$eproject;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
"</td>" .
"</tr>\n";
my $parents = $co{'parents'};
foreach my $par (@$parents) {
print "<tr>" .
"<td>parent</td>" .
- "<td style=\"font-family:monospace\">" . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$par", class => "list"}, $par) . "</td>" .
+ "<td style=\"font-family:monospace\">" . $cgi->a({-href => "$my_uri?p=$eproject;a=commit;h=$par", class => "list"}, $par) . "</td>" .
"<td class=\"link\">" .
- $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$par"}, "commit") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash;hp=$par"}, "commitdiff") .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=commit;h=$par"}, "commit") .
+ " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=commitdiff;h=$hash;hp=$par"}, "commitdiff") .
"</td>" .
"</tr>\n";
}
@@ -1726,6 +1731,7 @@ sub git_commit {
my $status = $5;
my $similarity = $6;
my $file = $7;
+ my $efile = escape($file);
if ($alternate) {
print "<tr class=\"dark\">\n";
} else {
@@ -1738,16 +1744,16 @@ sub git_commit {
$mode_chng = sprintf(" with mode: %04o", (oct $to_mode) & 0777);
}
print "<td>" .
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file)) . "</td>\n" .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$to_id;hb=$hash;f=$efile", -class => "list"}, escapeHTML($file)) . "</td>\n" .
"<td><span style=\"color: #008000;\">[new " . file_type($to_mode) . "$mode_chng]</span></td>\n" .
- "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"}, "blob") . "</td>\n";
+ "<td class=\"link\">" . $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$to_id;hb=$hash;f=$efile"}, "blob") . "</td>\n";
} elsif ($status eq "D") {
print "<td>" .
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file)) . "</td>\n" .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$from_id;hb=$hash;f=$efile", -class => "list"}, escapeHTML($file)) . "</td>\n" .
"<td><span style=\"color: #c00000;\">[deleted " . file_type($from_mode). "]</span></td>\n" .
"<td class=\"link\">" .
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$file"}, "blob") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=history;h=$hash;f=$file"}, "history") .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$from_id;hb=$hash;f=$efile"}, "blob") .
+ " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=history;h=$hash;f=$efile"}, "history") .
"</td>\n"
} elsif ($status eq "M" || $status eq "T") {
my $mode_chnge = "";
@@ -1767,18 +1773,18 @@ sub git_commit {
}
print "<td>";
if ($to_id ne $from_id) {
- print $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file));
+ print $cgi->a({-href => "$my_uri?p=$eproject;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$efile", -class => "list"}, escapeHTML($file));
} else {
- print $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file", -class => "list"}, escapeHTML($file));
+ print $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$to_id;hb=$hash;f=$efile", -class => "list"}, escapeHTML($file));
}
print "</td>\n" .
"<td>$mode_chnge</td>\n" .
"<td class=\"link\">";
- print $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$file"}, "blob");
+ print $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$to_id;hb=$hash;f=$efile"}, "blob");
if ($to_id ne $from_id) {
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$file"}, "diff");
+ print " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$efile"}, "diff");
}
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=history;h=$hash;f=$file"}, "history") . "\n";
+ print " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=history;h=$hash;f=$efile"}, "history") . "\n";
print "</td>\n";
} elsif ($status eq "R") {
my ($from_file, $to_file) = split "\t", $file;
@@ -1787,14 +1793,14 @@ sub git_commit {
$mode_chng = sprintf(", mode: %04o", (oct $to_mode) & 0777);
}
print "<td>" .
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file", -class => "list"}, escapeHTML($to_file)) . "</td>\n" .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$to_id;hb=$hash;f=$to_file", -class => "list"}, escapeHTML($to_file)) . "</td>\n" .
"<td><span style=\"color: #777777;\">[moved from " .
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$from_id;hb=$hash;f=$from_file", -class => "list"}, escapeHTML($from_file)) .
+ $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$from_id;hb=$hash;f=$from_file", -class => "list"}, escapeHTML($from_file)) .
" with " . (int $similarity) . "% similarity$mode_chng]</span></td>\n" .
"<td class=\"link\">" .
- $cgi->a({-href => "$my_uri?p=$project;a=blob;h=$to_id;hb=$hash;f=$to_file"}, "blob");
+ $cgi->a({-href => "$my_uri?p=$eproject;a=blob;h=$to_id;hb=$hash;f=$to_file"}, "blob");
if ($to_id ne $from_id) {
- print " | " . $cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$to_file"}, "diff");
+ print " | " . $cgi->a({-href => "$my_uri?p=$eproject;a=blobdiff;h=$to_id;hp=$from_id;hb=$hash;f=$to_file"}, "diff");
}
print "</td>\n";
}
^ permalink raw reply related
* Re: [PATCH 1/2] git-clone: Keep remote names when cloning unless explicitly told not to.
From: Andreas Ericsson @ 2005-11-10 17:49 UTC (permalink / raw)
Cc: git
In-Reply-To: <7vd5l81l15.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> exon@op5.se (Andreas Ericsson) writes:
>
>>+# Try using "humanish" part of source repo if user didn't specify one
>>+[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's#/*\.git$##' -e 's#.*[/:]##')
>
>
> Micronit; if I version control contents of my home directory on
> host.xz [*1*] under git, I would say host.xz:.git/ when cloning
> it, wouldn't I?
>
Gah. Does anyone do that?
Anyways,
sed -e 's#:*/*\.git$##' -e 's#.*[/:]##'
would turn that into "host.xz", so that should work real nice like, I
suppose.
> Maybe we would want to check if the resulting $dir makes sense
> after this step.
>
Perhaps, but this would lead to mkdir complaining about the empty
directory name, so it's no worse than the current code. The sane user
then looks at the help output and determines that he needs to specify a
target directory.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: [ANNOUNCE] GIT 0.99.9g
From: Junio C Hamano @ 2005-11-10 17:44 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: git, linux-kernel
In-Reply-To: <43737EC7.6090109@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
> May I *STRONGLY* urge you to name that something different.
> "lost+found" is a name with special properties in Unix; for example,
> many backup solutions will ignore a directory with that name.
Yeah, the original proposal (in TODO list) explicitly stated why
I chose lost-found instead of lost+found back then, and somebody
on the list (could have been Pasky but I may be mistaken) said
not to worry. In any case, if we go the route Daniel suggests,
we would not be storing anything on the filesystem ourselves so
this would be a non-issue.
^ permalink raw reply
* Re: [PATCH 1/2] git-clone: Keep remote names when cloning unless explicitly told not to.
From: Junio C Hamano @ 2005-11-10 17:15 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: git
In-Reply-To: <20051110115808.418125BF88@nox.op5.se>
exon@op5.se (Andreas Ericsson) writes:
> + The name of a new directory to clone into. The "humanish"
> + part of the source repository is used if no directory is
> + explicitly given ("repo" for "/path/to/repo.git" and "foo"
> + for "host.xz:foo/.git"). Cloning into an existing directory
> + is not allowed.
>
> +# Try using "humanish" part of source repo if user didn't specify one
> +[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's#/*\.git$##' -e 's#.*[/:]##')
Micronit; if I version control contents of my home directory on
host.xz [*1*] under git, I would say host.xz:.git/ when cloning
it, wouldn't I?
Maybe we would want to check if the resulting $dir makes sense
after this step.
[Footnote]
*1* ... I wouldn't personally, but some people are known to do
that.
^ permalink raw reply
* Re: [ANNOUNCE] GIT 0.99.9g
From: H. Peter Anvin @ 2005-11-10 17:13 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Junio C Hamano, git, linux-kernel
In-Reply-To: <43730E39.6030601@pobox.com>
Jeff Garzik wrote:
>
>> Oh, and we will not be moving things out of /usr/bin/ during 1.0
>> timeframe.
>
>
> :( bummer. I do like the elegance of having /usr/bin/git executing
> stuff out of /usr/libexec/git.
>
> /usr/libexec/git also makes it IMO cleaner when integrating git plugins
> from third parties (rpm -Uvh git-newfeature), because you don't have to
> worry about the /usr/bin namespace.
>
It's nice in concept, but I think there are a lot of reasons why this is
a bad idea:
- "man" doesn't handle it. It would be another thing if "man" could be
taught to understand commands like "man cvs checkout" or "man git fetch".
- There is no general way to teach shells etc about it, for tab
completion etc.
- Makes it harder (but not impossible) to run git from a build directory
without installing it first.
In comparison, the issue of clutter in /usr/bin is actually a pretty
small issue, especially with htree. Most vendors have gone back to
putting everything into /usr/bin since all variants that involve
splitting it up seem to be more of a loss than a gain.
-hpa
^ permalink raw reply
* Re: [ANNOUNCE] GIT 0.99.9g
From: H. Peter Anvin @ 2005-11-10 17:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, linux-kernel
In-Reply-To: <7vmzkc2a3e.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
>
> - Add git-lost+found. Currently the implementation stores
> found refs under .git/lost+found/{commit,other}
> directories, but writing out their object names to the
> standard output and let the users decide what to do with
> them was suggested on the list by Daniel, which makes sense
> as well. There are pros and cons so until we know if it is
> useful and if so in what form, it will not come out of "pu"
> branch.
>
May I *STRONGLY* urge you to name that something different.
"lost+found" is a name with special properties in Unix; for example,
many backup solutions will ignore a directory with that name.
-hpa
^ permalink raw reply
* cg-admin-setuprepo fails to make a cg-clone'able repo
From: Randal L. Schwartz @ 2005-11-10 16:32 UTC (permalink / raw)
To: Git Mailing List
Repeat by:
cg-admin-setuprepo repo
cg-clone $(PWD)/repo myview
Results:
defaulting to local storage area
Hard links don't work - using copy
cp: illegal option -- b
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target
cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN directory
cg-fetch: unable to get the HEAD branch
cg-clone: fetch failed
Did I just hold my mouth wrong? I can't put a HEAD branch in, because
there's no local view in the repo.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
^ permalink raw reply
* Re: hgmq vs. StGIT
From: Catalin Marinas @ 2005-11-10 16:20 UTC (permalink / raw)
To: Petr Baudis
Cc: Chris Mason, Chuck Lever, Theodore Ts'o, Joel Becker,
Junio C Hamano, pavel, git
In-Reply-To: <20051109233255.GI30496@pasky.or.cz>
On 09/11/05, Petr Baudis <pasky@suse.cz> wrote:
> A night city, the snow slowly falling. Approaching the roofs covered in
> white and illuminated by the yellow street lighting, dark windows - but
> one dimly glowing, a computer screen inside. Close-up on a hacker:
> $EDITOR opened, lost deep in hack mode, fingers dancing over the
> keyboard. Dreamy-monumental music in the background.
I agree with Pavel here :-)
> StGIT user, only part of the patches in stack, and the rest depends on
> the one currently edited, and I want to record my work on this one.
> I can either:
>
> (i) Just keep per-patch history only.
That's probably the simplest.
> (ii) Keep _both_ per-patch and per-stack history (since I don't want to
> record the stack when I have to keep some patches out of it - the
> history would look like randomly removing and adding tons of patches,
> and jumping around would be difficult because of this too).
It happens to me to keep some patches popped which aren't really part
of the stack (i.e. splitting a big patch, I still keep it in the
unapplied patches to push it later and check what was left after
splitting). From this point of view, (ii) would be better but with the
drawback that you need to have a valid stack with all the patches
pushed.
> (iii) Keep per-patchlist history - do not actually record only our
> current stack, but all the patches StGIT knows about. The patches
> depending on the one currently being changed will not be in consistent
> state, but that's tough. Actually, this seems to be the most viable
> strategy. One question is whether to record if some patch is actually
> applied right now or not (I'd say don't record it since you again have
> the "bouncing problem" otherwise).
(iii) is the most comprehensive method and, as Pavel said, we should
record what patches were applied or not and reproduce them exactly
when retrieving a different state.
Another big problem is the base of the stack, which can change. Would
retrieving an old state of the stack also restore the old the base? I
think it should and its up to the user to rebase it.
A simple way to partially achieve (iii) is to extend the existing
'branch' command to clone the whole series into a new one, including
all the patches. The problem with this approach is that there is no
temporal relation between branches.
How would you expect to switch between different states of the stack?
As Chris Mason mentioned, once you start doing this people might ask
for full SCM features (like diffs between revisions) where the objects
are stack states. This would complicate StGIT quite a lot.
--
Catalin
^ permalink raw reply
* Re: Where should I post questions on GIT usage ?
From: Franck @ 2005-11-10 15:39 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Git Mailing List
In-Reply-To: <46a038f90511100206v3fc8de88u9f613dbfb0c0c35a@mail.gmail.com>
2005/11/10, Martin Langhoff <martin.langhoff@gmail.com>:
> I think you'll be fine posting here ;-) Everyone's been patient with
> me so far.
I think so. It's just that I took a look and noticed that most of
questions a related to GIT developpement. So I just want to be sure
before posting any silly questions :)
> marc.theaimsgroup.com , and GIT already has reasonable documentation,
> including a tutorial and a few howtos, reachable at
> http://www.kernel.org/pub/software/scm/git/docs/
I did read that but unfortunately I'm still a rookie user...
thanks
--
Franck
^ permalink raw reply
* Re: Problems with .gitignore
From: Nico -telmich- Schottelius @ 2005-11-10 15:10 UTC (permalink / raw)
To: git
In-Reply-To: <20051019081625.GK22986@schottelius.org>
[-- Attachment #1: Type: text/plain, Size: 2992 bytes --]
Copy and Paste killed me, the file was full of trailing spaces!
Nico
Nico -telmich- Schottelius [Wed, Oct 19, 2005 at 10:16:25AM +0200]:
> It looks like cg-status does not really use .gitignore:
>
> [10:14] srsyg01:walderlift% cat .gitignore
> *.~*
> *.aux
> Design/Programmieredoku/kapitel.lof
> Design/Programmieredoku/kapitel.log
> Design/Programmieredoku/kapitel.lot
> Design/Programmieredoku/kapitel.out
> Design/Programmieredoku/kapitel.pdf
> Design/Programmieredoku/kapitel.toc
> *.conf
> *.dcp
> *.dcu
> *.ddp
> *.dpu
> *.kof
> *.res
> *.so
> Code/Components/Utilities/lw1tools
> Code/lw1/Client/lw1.log
> Code/lw1/Client/lw1client
> Code/lw1/lw1SyTestsystem
>
> [10:15] srsyg01:walderlift% cg-status| grep -e '.so$' -e '.dcu$' -e '.dcp$'
> ? Code/Components/ColoredDBComponents/ColDB.dcp
> ? Code/Components/ColoredDBComponents/bplColDB.~so
> ? Code/Components/Planner/QPlanPkgK3.dcp
> ? Code/Components/Planner/bplQPlanPkgK3.so
> ? Code/Components/Utilities/LW1Tools.dcp
> ? Code/Components/Utilities/Utilities.dcp
> ? Code/Components/Utilities/bplLW1Tools.so
> ? Code/Components/Utilities/bplUtilities.so
> ? Code/Components/rpman21d/bplrppack.~so
> ? Code/Components/rpman21d/bplrppackv.~so
> ? Code/Components/rpman21d/rppack.dcp
> ? Code/Components/rpman21d/rppackv.dcp
> ? Code/Components/zeosdbo/packages/kylix3/bplZComponent.~so
> ? Code/Components/zeosdbo/packages/kylix3/bplZCore.~so
> ? Code/Components/zeosdbo/packages/kylix3/bplZDbc.~so
> ? Code/Components/zeosdbo/packages/kylix3/bplZParseSql.~so
> ? Code/Components/zeosdbo/packages/kylix3/bplZPlain.~so
>
> Why does that happen?
>
> Nico
>
> --
> Latest project: cconfig (http://nico.schotteli.us/papers/linux/cconfig/)
> Open Source nutures open minds and free, creative developers.
--
Latest project: cinit-0.2.1 (http://linux.schottelius.org/cinit/)
Open Source nutures open minds and free, creative developers.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply
* Re: [PATCH] Add --pretty=fuller
From: Jon Loeliger @ 2005-11-10 14:42 UTC (permalink / raw)
To: git
Andreas wrote:
> --show-author=date,timestamp,name
> --show-committer=name,time
> --show=name,date (for both author and committer)
>
> or some such, with --pretty=<something> just a short-hand for those
> show-options?
Which just looks like a candidate for the [log]
section of the config file to me. Or is the "git log"
output needing to be standardized enough that this
level of flexability is a bad idea? Dunno.
jdl
^ permalink raw reply
* You the student also require money? You should begin with us
From: Wyatt Jacobson @ 2005-11-10 11:41 UTC (permalink / raw)
To: git
Thank You for Your interest.huge
Job for you! happy
MakePay Corporation offers the External Financial Management Services leadership,
experience and results in cash flow management. access
We offer You the job of finance manager. more
Thank You for Your interest.dream
Contact us on our post client and specify the. open
Full name
Address
Contact info (e-mail, phone, fax)
And we shall contact you within one day
Details on a site www.makepay.biz
Contact as support@makepay.biz
^ permalink raw reply
* proper way to make cg-fetch work from originally git-clone'd tree
From: Randal L. Schwartz @ 2005-11-10 13:51 UTC (permalink / raw)
To: git
I tried git-fetch this morning, and it said I didn't have an origin,
which makes sense because I made the tree with git-clone, not cg-clone.
However, when I tried
cg-branch-add origin rsync://rsync.kernel.org/pub/scm/git/git.git
it complained that I already had an origin! It seems to work after
that, but what should I have done instead? Is there a way to make
both cg-fetch and git-fetch to default to the same things?
By the way, my "make only if something changed" works now, because
I've separated cg-fetch and cg-merge. My merge step looks like:
cg-merge 2>&1 | grep -v 'already fully merged' && make prefix=/opt/git all install && (cd Documentation && make prefix=/opt/git all install)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
^ permalink raw reply
* [PATCH] Let git-clone/git-fetch follow HTTP redirections
From: Josef Weidendorfer @ 2005-11-10 13:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Let git-clone/git-fetch follow HTTP redirections
Otherwise, git-clone silently failed to clone a remote
repository where redirections (ie. a response with a
"Location" header line) are used.
This includes the fixes from Nick Hengeveld.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
git-clone.sh | 2 +-
git-fetch.sh | 2 +-
http-fetch.c | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
applies-to: f4d9606c4e4ca69203ea9211547083009b34196e
f6bf6aee48c028a4166d4c5d54c8e3c136721e3c
diff --git a/git-clone.sh b/git-clone.sh
index 4fdd652..aafcc18 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -23,7 +23,7 @@ fi
http_fetch () {
# $1 = Remote, $2 = Local
- curl -nsf $curl_extra_args "$1" >"$2"
+ curl -nsfL $curl_extra_args "$1" >"$2"
}
clone_dumb_http () {
diff --git a/git-fetch.sh b/git-fetch.sh
index 31e5f4c..8564cbf 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -230,7 +230,7 @@ do
$u =~ s{([^-a-zA-Z0-9/.])}{sprintf"%%%02x",ord($1)}eg;
print "$u";
' "$remote_name")
- head=$(curl -nsf $curl_extra_args "$remote/$remote_name_quoted") &&
+ head=$(curl -nsfL $curl_extra_args "$remote/$remote_name_quoted") &&
expr "$head" : "$_x40\$" >/dev/null ||
die "Failed to fetch $remote_name from $remote"
echo >&2 Fetching "$remote_name from $remote" using http
diff --git a/http-fetch.c b/http-fetch.c
index ea8af1b..28d225c 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -269,6 +269,8 @@ static CURL* get_curl_handle(void)
curl_low_speed_time);
}
+ curl_easy_setopt(result, CURLOPT_FOLLOWLOCATION, 1);
+
return result;
}
---
0.99.9.GIT
^ permalink raw reply related
* Re: HTTP redirection with git-clone/git-fetch ?
From: Josef Weidendorfer @ 2005-11-10 13:09 UTC (permalink / raw)
To: git
In-Reply-To: <20051110002419.GB4051@reactrix.com>
On Thursday 10 November 2005 01:24, Nick Hengeveld wrote:
> On Wed, Nov 09, 2005 at 11:31:36PM +0100, Josef Weidendorfer wrote:
>
> > This seems because git-fetch should understand redirections, too.
> > I am not familiar to the curl API. So perhaps another one can try to
> > fix this?
>
> This should fix it, although it still tries every GET with the original
> URL which is a bit inefficient.
Thanks, I just sent a patch for git-clone, including your patch, to
Junio.
Josef
^ permalink raw reply
* git and cogito update, gitweb problem
From: Nico -telmich- Schottelius @ 2005-11-10 12:02 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
Hello again!
I just wanted to present you an automatic git and cogito updating script,
but I've still the problem with '+' in filenames in gitweb [0].
If somebody tells me what would be the finest / best way to fix that
in gitweb (i am not that perl guru) I'll fix it myself.
So currently I copied the script temporarily to [1].
I use it to install the latest git and cogito automatically.
Please comment / critize.
Nico
[0]: http://linux.schottelius.org/cgi-bin/gitweb.cgi?p=cLinux/dev-scripts.git;a=blob;h=86f24af137034bb44bc3ce866cd6b20d8ea5ff94;hb=a1ad5cd34497c0cd870c138039eda15dd6fea02f;f=update-git+cogito.sh
[1]: http://creme.schottelius.org/~nico/temp/update-git+cogito.sh
--
Latest project: cinit-0.2.1 (http://linux.schottelius.org/cinit/)
Open Source nutures open minds and free, creative developers.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply
* [PATCH 1/2] git-clone: Keep remote names when cloning unless explicitly told not to.
From: Andreas Ericsson @ 2005-11-10 11:58 UTC (permalink / raw)
To: git
With this patch the following commands all clone into the local directory
"repo". If repo exists, it will still barf.
git-clone git://host.xz/repo.git
git-clone /path/to/repo/.git
git-clone host.xz:repo.git
I ended up doing the same source-to-target sed'ing for all our company
projects, so it was easier to add it directly to git-clone.
Signed-off-by: Andreas Ericsson <ae@op5.se>
---
Documentation/git-clone.txt | 12 +++++++-----
git-clone.sh | 2 ++
2 files changed, 9 insertions(+), 5 deletions(-)
applies-to: 6466c53ae80cddbb581c5fdb2332f9321fade867
fe6fb0e830253803798a2b70222d72e4107db1c1
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index fefd298..83f58ae 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -8,7 +8,7 @@ git-clone - Clones a repository.
SYNOPSIS
--------
-'git-clone' [-l [-s]] [-q] [-n] [-u <upload-pack>] <repository> <directory>
+'git-clone' [-l [-s]] [-q] [-n] [-u <upload-pack>] <repository> [<directory>]
DESCRIPTION
-----------
@@ -68,9 +68,11 @@ OPTIONS
be any URL git-fetch supports.
<directory>::
- The name of a new directory to be cloned into. It is an
- error to specify an existing directory.
-
+ The name of a new directory to clone into. The "humanish"
+ part of the source repository is used if no directory is
+ explicitly given ("repo" for "/path/to/repo.git" and "foo"
+ for "host.xz:foo/.git"). Cloning into an existing directory
+ is not allowed.
Author
------
@@ -78,7 +80,7 @@ Written by Linus Torvalds <torvalds@osdl
Documentation
--------------
-Documentation by Junio C Hamano.
+Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
diff --git a/git-clone.sh b/git-clone.sh
index 4fdd652..70cf7a2 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -96,6 +96,8 @@ if base=$(get_repo_base "$repo"); then
fi
dir="$2"
+# Try using "humanish" part of source repo if user didn't specify one
+[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's#/*\.git$##' -e 's#.*[/:]##')
mkdir "$dir" &&
D=$(
(cd "$dir" && git-init-db && pwd)
---
0.99.9.GIT
^ permalink raw reply related
* [PATCH 2/2] git-clone: Allow cloning into directories other than child of current dir.
From: Andreas Ericsson @ 2005-11-10 11:58 UTC (permalink / raw)
To: git
This patch adds -p to mkdir and an explicit check to see if the target
directory exists (since mkdir -p doesn't throw an error if it does).
Signed-off-by: Andreas Ericsson <ae@op5.se>
---
git-clone.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
applies-to: 28cfa6f299b27be02a24b6887f9b82b42c0e08cd
48b959195a979b113e51e898ac878a0fd7cfb30a
diff --git a/git-clone.sh b/git-clone.sh
index 70cf7a2..4b98fb1 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -98,7 +98,8 @@ fi
dir="$2"
# Try using "humanish" part of source repo if user didn't specify one
[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's#/*\.git$##' -e 's#.*[/:]##')
-mkdir "$dir" &&
+[ -e "$dir" ] && $(echo "$dir already exists."; usage)
+mkdir -p "$dir" &&
D=$(
(cd "$dir" && git-init-db && pwd)
) &&
---
0.99.9.GIT
^ permalink raw reply related
* Re: Strange merge conflicts against earlier merge.
From: Petr Baudis @ 2005-11-10 10:20 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Git Mailing List
In-Reply-To: <46a038f90511091638k726d605r170717539225a712@mail.gmail.com>
Dear diary, on Thu, Nov 10, 2005 at 01:38:35AM CET, I got a letter
where Martin Langhoff <martin.langhoff@gmail.com> said that...
> We are working with a series of closely related heads, and merging
> among them. I am sometimes finding merge conflicts that I don't think
> I should be seeing. Assuming two branches, 'local' and 'remote', where
> local has with remote before (*), and I have no conflicting changes in
> local...
>
> 1 - pull and merge from remote. The merge touches file A, B and C
> 2 - on local, develop on unrelated files O,P,Q, commit
> 3 - pull and merge from remote. The merge touches file B, C and D. I
> am sometimes seeing conflicts on file B and C, which was never touched
> on local.
Interesting. Could you check what the merge base is?
git-merge-base local remote
It should be the merge from (1).
> For an example, clone
> http://locke.catalyst.net.nz/git/moodle.git#mdl-artena-tairawhiti and
> register also the
> http://locke.catalyst.net.nz/git/moodle.git#mdl-local branch. Create
> two heads:
Could you please run git-update-server-info over there?
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
^ permalink raw reply
* Re: Do I misunderstand cg-merge --squash option
From: Petr Baudis @ 2005-11-10 10:12 UTC (permalink / raw)
To: Alan Chandler; +Cc: git
In-Reply-To: <200511100025.05993.alan@chandlerfamily.org.uk>
Dear diary, on Thu, Nov 10, 2005 at 01:25:05AM CET, I got a letter
where Alan Chandler <alan@chandlerfamily.org.uk> said that...
> I am trying to take my current development repository which has several
> hundred commits in it as I was developing my application and make a
> simplified branch for pushing to my public repository.
>
> I basically created a new branch (public) from the tag at the point where I
> started the repository.
>
> git-checkout -b public initial_commit
>
> I then did a merge
>
> cg-merge --squash v1.0
Why do you want to do a squash merge?
> But I don't know how to move forward and merge in changes after my v1.0 tag.
> Any attempt to merge anything else into this "public" branch seems to throw
> up what appears to be merge conflict, but I can't see why - when I look at
> the results one side has extra lines, but there is no other overlap.
I told you in the documentation - "re-merging with that branch later
will cause trouble". If you want to be able to re-merge the branch
later, you shouldn't use squash merge. And you shouldn't use squash
merge anyway, expect for few narrow use cases.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
^ permalink raw reply
* Re: Where should I post questions on GIT usage ?
From: Martin Langhoff @ 2005-11-10 10:06 UTC (permalink / raw)
To: Franck, Git Mailing List
In-Reply-To: <cda58cb80511100017v12f8ec77v@mail.gmail.com>
On 11/10/05, Franck <vagabon.xyz@gmail.com> wrote:
> I'm starting using GIT, and I'm having a couple of basic questions to
> ask. Is it the correct place to post them or is there any other
> mailing list related to GIT usage ?
Hi Franck,
I think you'll be fine posting here ;-) Everyone's been patient with
me so far. OTOH, the list has a good search facility at
marc.theaimsgroup.com , and GIT already has reasonable documentation,
including a tutorial and a few howtos, reachable at
http://www.kernel.org/pub/software/scm/git/docs/
regards,
martin
^ 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