* Re: [PATCH] Teach the git wrapper about --name-rev and --name-rev-by-tags
From: Junio C Hamano @ 2006-07-28 15:43 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
In-Reply-To: <Pine.LNX.4.63.0607281308280.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Wed, 26 Jul 2006, Junio C Hamano wrote:
>
> > * Passing the standard error from "fetch-pack -v" to "name-rev
> > --stdin" makes it a bit more pleasant to see what is going on.
>
> This patch makes it even easier.
Probably wouldn't for that particular one, since what I wanted
to do was "git fetch-pack -v 2>&1 | git name-rev >/var/tmp/1",
so isatty(1) check in setup_name_rev_pager() is defeated by
redirection, and the information I wanted to pass name-rev would
not have passed it anyway.
But this _might_ be useful for other more general cases. I'm
not sure -- it feels somewhat like a hack, though.
^ permalink raw reply
* Re: [PATCH] Teach git-apply about '-R'
From: Junio C Hamano @ 2006-07-28 15:36 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Petr Baudis, git
In-Reply-To: <Pine.LNX.4.63.0607281213250.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
A quick comment without looking much at the code. Do you sanely
bail out when asked to reverse-apply a binary patch?
Also what was the reason to change an existing test vector in
4102? That does not look like related to -R flag.
^ permalink raw reply
* Re: [PATCH] Teach git-apply about '-R'
From: Linus Torvalds @ 2006-07-28 15:14 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Petr Baudis, git, junkio
In-Reply-To: <Pine.LNX.4.63.0607281213250.29667@wbgn013.biozentrum.uni-wuerzburg.de>
On Fri, 28 Jul 2006, Johannes Schindelin wrote:
>
> +/* a and b may not overlap! */
> +static void memswap(void *a, void *b, unsigned int len)
This is disgusting.
Especially since it's also slow as hell.
> + memswap(p->new_name, p->old_name, sizeof(char *));
> + memswap(&p->new_mode, &p->old_mode, sizeof(unsigned int));
> + memswap(&p->is_new, &p->is_delete, sizeof(int));
> + memswap(&p->lines_added, &p->lines_deleted, sizeof(int));
> + memswap(p->old_sha1_prefix, p->new_sha1_prefix, 41);
> +
> + for (; frag; frag = frag->next) {
> + memswap(&frag->newpos, &frag->oldpos, sizeof(int));
> + memswap(&frag->newlines, &frag->oldlines, sizeof(int));
All but one of those are register sizes, so doing a horribly ugly
"memswap()"to do them is truly nasty, when you could have done
#define swap(a,b) myswap((a),(b),sizeof(a))
#define myswap(a,b,size) do { \
unsigned char mytmp[size]; \
memcpy(tmp, &a, size); \
memcpy(&a, &b, size); \
memcpy(&b, mytmp, size); \
} while (0)
and it would have worked MUCH more efficiently, since any sane compiler
would immediately have noticed that you're doing word-sized copies, and
optimized the hell out of it.
(Untested, of course).
Linus
^ permalink raw reply
* Re: [PATCH] Allow fetching from multiple repositories at once
From: Petr Baudis @ 2006-07-28 14:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git, alp
In-Reply-To: <Pine.LNX.4.63.0607281608520.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Hi!
Dear diary, on Fri, Jul 28, 2006 at 04:13:28PM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> You misunderstood me: I was talking about a (hidden) local multiplexer.
Yes; I just wanted to cover another obvious alternative. :-)
> But in the scenario you painted, wouldn't it be practical to have one
> consolidated repo _in addition_ to the small ones? Of course, the refs in
> the consolidated one would have to be prefixed with the name of the repo
> they come from.
You still have problems with tags, for example, and pushing may get
tricky. It's also non-intuitive for users (I'm seeing some repositories
in gitweb but fetching from something completely different, and look at
those weird things I have to do with the branches, or git will clone
_all_ the xorg projects at once for me, eeek).
Of course you could hide all that elaborately in the porcelain but I
think this turns to be eventually much less-impact solution which is
significantly easier to maintain for the repository admins, intuitive
for users and also simpler for porcelains supporting at least
light-weight subprojects.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply
* Re: [PATCH] Allow fetching from multiple repositories at once
From: Johannes Schindelin @ 2006-07-28 14:13 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git, alp
In-Reply-To: <20060728140058.GM13776@pasky.or.cz>
Hi,
On Fri, 28 Jul 2006, Petr Baudis wrote:
> Dear diary, on Fri, Jul 28, 2006 at 10:51:56AM CEST, I got a letter
> where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> > So the scenario is: one remote repository (probably shared), and multiple
> > local repositories, all tracking different branches?
> >
> > So, why not setup a single local (master) repository, setup all the other
> > repos with the local master as alternate, and write a simple script which
> > first fetches all branches into the master, and then pulls into the other
> > local repos from that master?
>
> Nope, the scenario is many remote repositories and any number of local
> repositories.
Ah, that clarifies it for me.
> Look at http://gitweb.freedesktop.org/ - as far as I know, many people
> have many (most?) of those repositories cloned and fetching updates is
> just a huge pain. This makes no assumptions about the number of local
> repositories, you can even fetch into various branch of a single local
> repository - only if you fetch into multiple repositories, all of them
> must see the objects you fetched.
>
> The alternative of squashing all the remote repositories into a single
> one is probably not very attractive since you get a huge branches tree
> instead, varying hooks will get impractical, it won't look good in
> gitweb, git clone will by default clone all the stuff, you will need to
> impose tag namespaces, permissions might get tricky and so on and so on.
You misunderstood me: I was talking about a (hidden) local multiplexer.
But in the scenario you painted, wouldn't it be practical to have one
consolidated repo _in addition_ to the small ones? Of course, the refs in
the consolidated one would have to be prefixed with the name of the repo
they come from.
> > The beauty of it is: you can still pull/push directly from the remote
> > repo, if you want.
>
> This should let you do that too.
Of course. But the solution I proposed does not need a patch, and _still_
lets you do said operations. Just wanted to point that out.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] Allow fetching from multiple repositories at once
From: Petr Baudis @ 2006-07-28 14:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, alp
In-Reply-To: <20060728054341.15864.35862.stgit@machine>
Dear diary, on Fri, Jul 28, 2006 at 07:44:21AM CEST, I got a letter
where Petr Baudis <pasky@suse.cz> said that...
> @@ -461,11 +465,52 @@ static int send_ref(const char *refname,
>
> static int upload_pack(void)
> {
> - reset_timeout();
> - head_ref(send_ref);
> - for_each_ref(send_ref);
> - packet_flush(1);
> - receive_needs();
> + int multirepo = 0;
> +
> + while (1) {
> + char *repo;
> + char cwd[PATH_MAX];
> +
> + reset_timeout();
> + head_ref(send_ref);
> + for_each_ref(send_ref);
> + packet_flush(1);
> + repo = receive_needs();
> + if (!repo)
> + break;
> + multirepo++;
> +
> + fprintf(stderr, "git-upload-pack: switching to repo %s", repo);
> +
> + /* So that we still find objects of the original repository... */
> + getcwd(cwd, PATH_MAX);
> + if (strlen(cwd) < PATH_MAX - 8)
> + strcat(cwd, "/objects");
> + link_alt_odb_entry(cwd, strlen(cwd), NULL, 0, 1);
> +
> + if (!enter_repo(repo, strict) || !security_repo_check(!check_export))
> + die("git-upload-pack: security violation");
> + }
> +
> + if (multirepo) {
> +#define ALTENV_SIZE 65536
> + /* Propagate all the repositories to the children */
> + char altenv[ALTENV_SIZE], *p = altenv;
> + struct alternate_object_database *alt;
> + strcpy(p, ALTERNATE_DB_ENVIRONMENT "=");
> + p += sizeof(ALTERNATE_DB_ENVIRONMENT);
> + for (alt = alt_odb_list; alt; alt = alt->next) {
> + strncpy(p, alt->base, alt->name - alt->base);
> + p += alt->name - alt->base;
> + if (p - altenv < ALTENV_SIZE)
> + *p++ = ':';
> + if (p - altenv >= ALTENV_SIZE)
> + die("fetching too many repositories");
> + }
> + p[-1] = '\0';
> + putenv(altenv);
> + }
> +
> if (!want_obj.nr)
> return 0;
> get_common_commits();
Note that you need to be more careful about ALTENV_SIZE checking here,
and I'm not sure if we even need to abuse the alternates database here;
only later I added setting up the alternates variable since I realized
we are executing external tools here, and things would be simpler if we
could get away by just doing that.
I'm sorry, I don't have time to send the updated patch anymore. :-(
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply
* Re: [PATCH] Allow fetching from multiple repositories at once
From: Petr Baudis @ 2006-07-28 14:00 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git, alp
In-Reply-To: <Pine.LNX.4.63.0607281045430.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Hi,
Dear diary, on Fri, Jul 28, 2006 at 10:51:56AM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> So the scenario is: one remote repository (probably shared), and multiple
> local repositories, all tracking different branches?
>
> So, why not setup a single local (master) repository, setup all the other
> repos with the local master as alternate, and write a simple script which
> first fetches all branches into the master, and then pulls into the other
> local repos from that master?
Nope, the scenario is many remote repositories and any number of local
repositories. Look at http://gitweb.freedesktop.org/ - as far as I know,
many people have many (most?) of those repositories cloned and fetching
updates is just a huge pain. This makes no assumptions about the number
of local repositories, you can even fetch into various branch of a
single local repository - only if you fetch into multiple repositories,
all of them must see the objects you fetched.
The alternative of squashing all the remote repositories into a single
one is probably not very attractive since you get a huge branches tree
instead, varying hooks will get impractical, it won't look good in
gitweb, git clone will by default clone all the stuff, you will need to
impose tag namespaces, permissions might get tricky and so on and so on.
> The beauty of it is: you can still pull/push directly from the remote
> repo, if you want.
This should let you do that too.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
^ permalink raw reply
* Re: Git clone stalls at a read(3, ...) saw using strace
From: André Goddard Rosa @ 2006-07-28 13:57 UTC (permalink / raw)
To: Ribeiro, Humberto Plinio; +Cc: Pavel Roskin, Git Mailing List, Linus Torvalds
In-Reply-To: <EA24FE8B11562848B4760FD5EB4D2E9401B3F3C2@SAO1016V.ww101.siemens.net>
On 7/28/06, Ribeiro, Humberto Plinio <humberto.ribeiro@siemens.com> wrote:
> Hi, Andre.
>
> After a "ps -ef" I saw two instances of the script defined by
> GIT_PROXY_COMMAND. Strangely one of those instances was child
> of the other. A strace showed the scripts were blocked in a
>"waitpid(-1,". I've killed the child script and the git clone resumed the
>process.
>
> I didn't understand why this blocking on git happened though. The
> creation of these two instances (one child of the other) was also
> strange.
Yes, it worked to me too, but I also don't know why.
Let me explain exactly what we had to do so someone perhaps can
explain why we had to do this:
I configured GIT_PROXY_COMMAND pointing to a script with this content:
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | nc 172.29.0.6 3128 |
(read a; read a; cat )
Later:
git clone git://source.mvista.com/git/linux-davinci-2.6.git
After some time (downloading 117 Mb) it stalled (git-fetch on a pipe
read) and we had to do this to resume and let it finish:
[root@mao2wx23 tmp]# ps -ef | grep git | grep -v grep
opb694 9975 1451 0 01:39 pts/11 00:00:00 /bin/sh
/usr/bin/git-clone git://source.mvista.com/git/linux-davinci-2.6.git
opb694 9985 9975 3 01:39 pts/11 00:01:56 git-fetch-pack --all
-k git //source.mvista.com git/linux-davinci-2.6.git
[root@mao2wx23 tmp]# ps -ef | grep proxy | grep -v grep
opb694 9986 9985 0 01:39 pts/11 00:00:00 /bin/sh
/home/opb694/proxy-cmd.sh source.mvista.com 9418
opb694 9987 9986 0 01:39 pts/11 00:00:00 /bin/sh
/home/opb694/proxy-cmd.sh source.mvista.com 9418
[root@mao2wx23 tmp]# kill 9987
Thanks again for the patience,
--
[]s,
André Goddard
^ permalink raw reply
* RE: Git clone stalls at a read(3, ...) saw using strace
From: Ribeiro, Humberto Plinio @ 2006-07-28 13:36 UTC (permalink / raw)
To: André Goddard Rosa, Pavel Roskin; +Cc: Git Mailing List, Linus Torvalds
In-Reply-To: <b8bf37780607280258s421faf65o11c5dd241e7a27c6@mail.gmail.com>
Hi, Andre.
After a "ps -ef" I saw two instances of the script defined by GIT_PROXY_COMMAND. Strangely one of those instances was child of the other. A strace showed the scripts were blocked in a "waitpid(-1,". I've killed the child script and the git clone resumed the process.
I didn't understand why this blocking on git happened though. The creation of these two instances (one child of the other) was also strange.
Regards,
Humberto
---
Obrigado/Best regards/Mit freundlichen Grüßen/Pozdrawiam
Humberto Ribeiro, MSc.
SIEMENS Home and Office Communication
Phone: +55 92 2129 6205
Mobile: +55 92 8146 3147
-----Original Message-----
From: André Goddard Rosa [mailto:andre.goddard@gmail.com]
Sent: sexta-feira, 28 de julho de 2006 05:58
To: Pavel Roskin
Cc: Git Mailing List; Linus Torvalds; Ribeiro, Humberto Plinio
Subject: Re: Git clone stalls at a read(3, ...) saw using strace
On 7/28/06, André Goddard Rosa <andre.goddard@gmail.com> wrote:
> On 7/27/06, André Goddard Rosa <andre.goddard@gmail.com> wrote:
> > On 7/27/06, Pavel Roskin <proski@gnu.org> wrote:
> > > On Thu, 2006-07-27 at 10:50 -0700, Linus Torvalds wrote:
> > > > Nope. I have a fairly constant 120kbps, and:
> > > >
> > > > [torvalds@g5 ~]$ git clone git://source.mvista.com/git/linux-davinci-2.6.git
> > > > Checking files out...)
> > > > 100% (19754/19754) done
> > >
> > > Same thing here. Current git from the master branch.
> >
> > Forgot to say that we are using this script in GIT_PROXY_COMMAND
> > environment variable:
> >
> > (echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | nc <proxy_add> <portnum>
> > | (read a; read a; cat )
> >
> > The first 'read a' removes the 'CONNECT SUCCESS HTTP RESPONSE 200' and
> > the second removes an empty line as described here:
> >
> > http://www.gelato.unsw.edu.au/archives/git/0605/20664.html
> >
> > I will try from home later again.
>
> Okey, I tried from home (without the proxy trick) and it behaved a lot
> better but my disc went full in the process and I got these messages:
> ...
> ...
> ...
> error: git-checkout-index: unable to write file drivers/scsi/mac53c94.c
> error: git-checkout-index: unable to write file drivers/scsi/mac53c94.h
> error: git-checkout-index: unable to write file drivers/scsi/mac_esp.c
> error: git-checkout-index: unable to create file
> drivers/scsi/mac_scsi.c (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/mac_scsi.h (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/mca_53c9x.c (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/megaraid.c (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/megaraid.h (No space left on device)
> fatal: cannot create directory at drivers/scsi/megaraid
>
> And it finished keeping the downloaded files, but I still cannot see
> these files listed above.
> I tried to pull but it says that I'm up-to-date:
>
> doctorture:/opt/downloads/mvista/linux-mvista # git-pull
> Already up-to-date.
>
> I remember that using CVS I just used 'cvs update' after checkout and
> it would bring the missing files to me.
>
> What I'm doing wrong here?
I'm also receiving these messages when trying to change branches:
doctorture:/opt/downloads/mvista/linux-mvista # git-checkout origin
fatal: Untracked working tree file '.gitignore' would be overwritten by merge.
Perhaps I will need to download using git-clone again?
Thanks,
--
[]s,
André Goddard
^ permalink raw reply
* [PATCH] Teach the git wrapper about --name-rev and --name-rev-by-tags
From: Johannes Schindelin @ 2006-07-28 11:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v4px4osjv.fsf@assigned-by-dhcp.cox.net>
Now you can say
git --name-rev log
instead of
git log | git name-rev --stdin | less
with the benefit that diff.color=auto still works.
There is also a shortcut "-n" for --name-rev. The option
--name-rev-by-tags (or -t) tries to name the revs by tags instead of all
refs, which is nicer when talking to other people, since their heads may
be different from yours (I feel like talking to Zaphod ;-).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
On Wed, 26 Jul 2006, Junio C Hamano wrote:
> * Passing the standard error from "fetch-pack -v" to "name-rev
> --stdin" makes it a bit more pleasant to see what is going on.
This patch makes it even easier.
Documentation/git.txt | 12 ++++++++++--
cache.h | 1 +
git.c | 9 +++++++--
| 41 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 59 insertions(+), 4 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 7310a2b..eae930f 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -9,7 +9,8 @@ git - the stupid content tracker
SYNOPSIS
--------
'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate]
- [--bare] [--git-dir=GIT_DIR] [--help] COMMAND [ARGS]
+ [-n|--name-rev] [-t|--name-rev-by-tags] [--bare]
+ [--git-dir=GIT_DIR] [--help] COMMAND [ARGS]
DESCRIPTION
-----------
@@ -45,12 +46,19 @@ OPTIONS
-p|--paginate::
Pipe all output into 'less' (or if set, $PAGER).
+-n|--name-rev:
+ Try naming all SHA1s, and page the result (see
+ link:git-name-rev[1] for a detailed explanation).
+
+-t|--name-rev-by-tags:
+ Same as '--name-rev', but try to name the SHA1s by tags.
+
--git-dir=<path>::
Set the path to the repository. This can also be controlled by
setting the GIT_DIR environment variable.
--bare::
- Same as --git-dir=`pwd`.
+ Same as '--git-dir=`pwd`'.
FURTHER DOCUMENTATION
---------------------
diff --git a/cache.h b/cache.h
index 8891073..d6c5edb 100644
--- a/cache.h
+++ b/cache.h
@@ -391,6 +391,7 @@ extern int receive_keep_pack(int fd[2],
/* pager.c */
extern void setup_pager(void);
+extern void setup_name_rev_pager(int by_tags);
extern int pager_in_use;
/* base85 */
diff --git a/git.c b/git.c
index 4ea5efb..4206b43 100644
--- a/git.c
+++ b/git.c
@@ -63,9 +63,14 @@ static int handle_options(const char***
puts(git_exec_path());
exit(0);
}
- } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
+ } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate"))
setup_pager();
- } else if (!strcmp(cmd, "--git-dir")) {
+ else if (!strcmp(cmd, "-n") || !strcmp(cmd, "--name-rev"))
+ setup_name_rev_pager(0);
+ else if (!strcmp(cmd, "-t") ||
+ !strcmp(cmd, "--name-rev-by-tags"))
+ setup_name_rev_pager(1);
+ else if (!strcmp(cmd, "--git-dir")) {
if (*argc < 1)
return -1;
setenv("GIT_DIR", (*argv)[1], 1);
--git a/pager.c b/pager.c
index 280f57f..48b2467 100644
--- a/pager.c
+++ b/pager.c
@@ -53,3 +53,44 @@ void setup_pager(void)
die("unable to execute pager '%s'", pager);
exit(255);
}
+
+void setup_name_rev_pager(int by_tags)
+{
+ pid_t pid;
+ int fd[2];
+
+ if (!isatty(1))
+ return;
+
+ pager_in_use = 1; /* means we are emitting to terminal */
+
+ if (pipe(fd) < 0)
+ return;
+ pid = fork();
+ if (pid < 0) {
+ close(fd[0]);
+ close(fd[1]);
+ return;
+ }
+
+ /* return in the child */
+ if (!pid) {
+ dup2(fd[1], 1);
+ close(fd[0]);
+ close(fd[1]);
+ return;
+ }
+
+ /* The original process turns into paging name-rev */
+ dup2(fd[0], 0);
+ close(fd[0]);
+ close(fd[1]);
+
+ setup_pager();
+ if (by_tags)
+ execl("git", "git", "name-rev", "--tags", "--stdin", NULL);
+ else
+ execl("git", "git", "name-rev", "--stdin", NULL);
+ die("unable to execute git-name-rev");
+ exit(255);
+}
--
1.4.2.rc2.g61d8
^ permalink raw reply related
* Re: Slow fetches of tags
From: Johannes Schindelin @ 2006-07-28 10:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Ralf Baechle, git, Linus Torvalds
In-Reply-To: <7v4px4osjv.fsf@assigned-by-dhcp.cox.net>
Hi,
On Wed, 26 Jul 2006, Junio C Hamano wrote:
> I think the attached patch is safe in general, but somebody may
> want to give an extra set of eyeballs to double check the logic
> is sane.
The only gripe I have with it is that reachable() is relatively expensive,
and it might be misused by a nasty client, making the server go down the
whole history. I have no idea, though, how to prevent that.
Ciao,
Dscho
^ permalink raw reply
* [PATCH] Teach git-apply about '-R'
From: Johannes Schindelin @ 2006-07-28 10:14 UTC (permalink / raw)
To: Petr Baudis; +Cc: git, junkio
In-Reply-To: <20060728013038.GH13776@pasky.or.cz>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
On Fri, 28 Jul 2006, Petr Baudis wrote:
> (i) No git-apply -R - well, it seems to me that I revert patches all
> the time, don't you?
builtin-apply.c | 68 ++++++++++++++++++++++++++++++++++++++++-------
t/t4102-apply-rename.sh | 24 +++++++++++++++--
2 files changed, 80 insertions(+), 12 deletions(-)
diff --git a/builtin-apply.c b/builtin-apply.c
index d924ac3..eb3eda1 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -120,7 +120,7 @@ struct fragment {
struct patch {
char *new_name, *old_name, *def_name;
unsigned int old_mode, new_mode;
- int is_rename, is_copy, is_new, is_delete, is_binary;
+ int is_rename, is_copy, is_new, is_delete, is_binary, is_reverse;
#define BINARY_DELTA_DEFLATED 1
#define BINARY_LITERAL_DEFLATED 2
unsigned long deflate_origlen;
@@ -1119,6 +1119,37 @@ static int parse_chunk(char *buffer, uns
return offset + hdrsize + patchsize;
}
+/* a and b may not overlap! */
+static void memswap(void *a, void *b, unsigned int len)
+{
+ char *ap = a, *bp = b;
+ int i;
+ char c;
+
+ for (i = 0; i < len; i++) {
+ c = ap[i]; ap[i] = bp[i]; bp[i] = c;
+ }
+}
+
+static void reverse_patches(struct patch *p)
+{
+ for (; p; p = p->next) {
+ struct fragment *frag = p->fragments;
+
+ memswap(p->new_name, p->old_name, sizeof(char *));
+ memswap(&p->new_mode, &p->old_mode, sizeof(unsigned int));
+ memswap(&p->is_new, &p->is_delete, sizeof(int));
+ memswap(&p->lines_added, &p->lines_deleted, sizeof(int));
+ memswap(p->old_sha1_prefix, p->new_sha1_prefix, 41);
+
+ for (; frag; frag = frag->next) {
+ memswap(&frag->newpos, &frag->oldpos, sizeof(int));
+ memswap(&frag->newlines, &frag->oldlines, sizeof(int));
+ }
+ p->is_reverse = !p->is_reverse;
+ }
+}
+
static const char pluses[] = "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
static const char minuses[]= "----------------------------------------------------------------------";
@@ -1336,7 +1367,7 @@ static int apply_line(char *output, cons
}
static int apply_one_fragment(struct buffer_desc *desc, struct fragment *frag,
- int inaccurate_eof)
+ int reverse, int inaccurate_eof)
{
int match_beginning, match_end;
char *buf = desc->buffer;
@@ -1350,6 +1381,7 @@ static int apply_one_fragment(struct buf
int pos, lines;
while (size > 0) {
+ char first;
int len = linelen(patch, size);
int plen;
@@ -1366,16 +1398,23 @@ static int apply_one_fragment(struct buf
plen = len-1;
if (len < size && patch[len] == '\\')
plen--;
- switch (*patch) {
+ first = *patch;
+ if (reverse) {
+ if (first == '-')
+ first = '+';
+ else if (first == '+')
+ first = '-';
+ }
+ switch (first) {
case ' ':
case '-':
memcpy(old + oldsize, patch + 1, plen);
oldsize += plen;
- if (*patch == '-')
+ if (first == '-')
break;
/* Fall-through for ' ' */
case '+':
- if (*patch != '+' || !no_add)
+ if (first != '+' || !no_add)
newsize += apply_line(new + newsize, patch,
plen);
break;
@@ -1615,7 +1654,8 @@ static int apply_fragments(struct buffer
return apply_binary(desc, patch);
while (frag) {
- if (apply_one_fragment(desc, frag, patch->inaccurate_eof) < 0)
+ if (apply_one_fragment(desc, frag, patch->is_reverse,
+ patch->inaccurate_eof) < 0)
return error("patch failed: %s:%ld",
name, frag->oldpos);
frag = frag->next;
@@ -2142,7 +2182,8 @@ static int use_patch(struct patch *p)
return 1;
}
-static int apply_patch(int fd, const char *filename, int inaccurate_eof)
+static int apply_patch(int fd, const char *filename,
+ int reverse, int inaccurate_eof)
{
unsigned long offset, size;
char *buffer = read_patch_file(fd, &size);
@@ -2162,6 +2203,8 @@ static int apply_patch(int fd, const cha
nr = parse_chunk(buffer + offset, size, patch);
if (nr < 0)
break;
+ if (reverse)
+ reverse_patches(patch);
if (use_patch(patch)) {
patch_stats(patch);
*listp = patch;
@@ -2226,6 +2269,7 @@ int cmd_apply(int argc, const char **arg
{
int i;
int read_stdin = 1;
+ int reverse = 0;
int inaccurate_eof = 0;
const char *whitespace_option = NULL;
@@ -2236,7 +2280,7 @@ int cmd_apply(int argc, const char **arg
int fd;
if (!strcmp(arg, "-")) {
- apply_patch(0, "<stdin>", inaccurate_eof);
+ apply_patch(0, "<stdin>", reverse, inaccurate_eof);
read_stdin = 0;
continue;
}
@@ -2313,6 +2357,10 @@ int cmd_apply(int argc, const char **arg
parse_whitespace_option(arg + 13);
continue;
}
+ if (!strcmp(arg, "-R") || !strcmp(arg, "--reverse")) {
+ reverse = 1;
+ continue;
+ }
if (!strcmp(arg, "--inaccurate-eof")) {
inaccurate_eof = 1;
continue;
@@ -2333,12 +2381,12 @@ int cmd_apply(int argc, const char **arg
usage(apply_usage);
read_stdin = 0;
set_default_whitespace_mode(whitespace_option);
- apply_patch(fd, arg, inaccurate_eof);
+ apply_patch(fd, arg, reverse, inaccurate_eof);
close(fd);
}
set_default_whitespace_mode(whitespace_option);
if (read_stdin)
- apply_patch(0, "<stdin>", inaccurate_eof);
+ apply_patch(0, "<stdin>", reverse, inaccurate_eof);
if (whitespace_error) {
if (squelch_whitespace_errors &&
squelch_whitespace_errors < whitespace_error) {
diff --git a/t/t4102-apply-rename.sh b/t/t4102-apply-rename.sh
index fbb508d..22da6a0 100755
--- a/t/t4102-apply-rename.sh
+++ b/t/t4102-apply-rename.sh
@@ -13,8 +13,8 @@ # setup
cat >test-patch <<\EOF
diff --git a/foo b/bar
similarity index 47%
-copy from foo
-copy to bar
+rename from foo
+rename to bar
--- a/foo
+++ b/bar
@@ -1 +1 @@
@@ -39,4 +39,24 @@ else
'test -f bar && ls -l bar | grep "^-..x......"'
fi
+test_expect_success 'apply reverse' \
+ 'git-apply -R --index --stat --summary --apply test-patch &&
+ test "$(cat foo)" = "This is foo"'
+
+cat >test-patch <<\EOF
+diff --git a/foo b/bar
+similarity index 47%
+copy from foo
+copy to bar
+--- a/foo
++++ b/bar
+@@ -1 +1 @@
+-This is foo
++This is bar
+EOF
+
+test_expect_success 'apply copy' \
+ 'git-apply --index --stat --summary --apply test-patch &&
+ test "$(cat bar)" = "This is bar" -a "$(cat foo)" = "This is foo"'
+
test_done
--
1.4.2.rc2.g813d5-dirty
^ permalink raw reply related
* Re: Git clone stalls at a read(3, ...) saw using strace
From: André Goddard Rosa @ 2006-07-28 9:58 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Git Mailing List, Linus Torvalds, Ribeiro, Humberto Plinio
In-Reply-To: <b8bf37780607280256q485b7ae9p9cdedf9b621a0e9b@mail.gmail.com>
On 7/28/06, André Goddard Rosa <andre.goddard@gmail.com> wrote:
> On 7/27/06, André Goddard Rosa <andre.goddard@gmail.com> wrote:
> > On 7/27/06, Pavel Roskin <proski@gnu.org> wrote:
> > > On Thu, 2006-07-27 at 10:50 -0700, Linus Torvalds wrote:
> > > > Nope. I have a fairly constant 120kbps, and:
> > > >
> > > > [torvalds@g5 ~]$ git clone git://source.mvista.com/git/linux-davinci-2.6.git
> > > > Checking files out...)
> > > > 100% (19754/19754) done
> > >
> > > Same thing here. Current git from the master branch.
> >
> > Forgot to say that we are using this script in GIT_PROXY_COMMAND
> > environment variable:
> >
> > (echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | nc <proxy_add> <portnum>
> > | (read a; read a; cat )
> >
> > The first 'read a' removes the 'CONNECT SUCCESS HTTP RESPONSE 200' and
> > the second removes an empty line as described here:
> >
> > http://www.gelato.unsw.edu.au/archives/git/0605/20664.html
> >
> > I will try from home later again.
>
> Okey, I tried from home (without the proxy trick) and it behaved a lot
> better but my disc went full in the process and I got these messages:
> ...
> ...
> ...
> error: git-checkout-index: unable to write file drivers/scsi/mac53c94.c
> error: git-checkout-index: unable to write file drivers/scsi/mac53c94.h
> error: git-checkout-index: unable to write file drivers/scsi/mac_esp.c
> error: git-checkout-index: unable to create file
> drivers/scsi/mac_scsi.c (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/mac_scsi.h (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/mca_53c9x.c (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/megaraid.c (No space left on device)
> error: git-checkout-index: unable to create file
> drivers/scsi/megaraid.h (No space left on device)
> fatal: cannot create directory at drivers/scsi/megaraid
>
> And it finished keeping the downloaded files, but I still cannot see
> these files listed above.
> I tried to pull but it says that I'm up-to-date:
>
> doctorture:/opt/downloads/mvista/linux-mvista # git-pull
> Already up-to-date.
>
> I remember that using CVS I just used 'cvs update' after checkout and
> it would bring the missing files to me.
>
> What I'm doing wrong here?
I'm also receiving these messages when trying to change branches:
doctorture:/opt/downloads/mvista/linux-mvista # git-checkout origin
fatal: Untracked working tree file '.gitignore' would be overwritten by merge.
Perhaps I will need to download using git-clone again?
Thanks,
--
[]s,
André Goddard
^ permalink raw reply
* Re: Git clone stalls at a read(3, ...) saw using strace
From: André Goddard Rosa @ 2006-07-28 9:56 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Git Mailing List, Linus Torvalds, Ribeiro, Humberto Plinio
In-Reply-To: <b8bf37780607271216i5b1d8d34n900ffeacbe81f380@mail.gmail.com>
On 7/27/06, André Goddard Rosa <andre.goddard@gmail.com> wrote:
> On 7/27/06, Pavel Roskin <proski@gnu.org> wrote:
> > On Thu, 2006-07-27 at 10:50 -0700, Linus Torvalds wrote:
> > > Nope. I have a fairly constant 120kbps, and:
> > >
> > > [torvalds@g5 ~]$ git clone git://source.mvista.com/git/linux-davinci-2.6.git
> > > Checking files out...)
> > > 100% (19754/19754) done
> >
> > Same thing here. Current git from the master branch.
>
> Forgot to say that we are using this script in GIT_PROXY_COMMAND
> environment variable:
>
> (echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | nc <proxy_add> <portnum>
> | (read a; read a; cat )
>
> The first 'read a' removes the 'CONNECT SUCCESS HTTP RESPONSE 200' and
> the second removes an empty line as described here:
>
> http://www.gelato.unsw.edu.au/archives/git/0605/20664.html
>
> I will try from home later again.
Okey, I tried from home (without the proxy trick) and it behaved a lot
better but my disc went full in the process and I got these messages:
...
...
...
error: git-checkout-index: unable to write file drivers/scsi/mac53c94.c
error: git-checkout-index: unable to write file drivers/scsi/mac53c94.h
error: git-checkout-index: unable to write file drivers/scsi/mac_esp.c
error: git-checkout-index: unable to create file
drivers/scsi/mac_scsi.c (No space left on device)
error: git-checkout-index: unable to create file
drivers/scsi/mac_scsi.h (No space left on device)
error: git-checkout-index: unable to create file
drivers/scsi/mca_53c9x.c (No space left on device)
error: git-checkout-index: unable to create file
drivers/scsi/megaraid.c (No space left on device)
error: git-checkout-index: unable to create file
drivers/scsi/megaraid.h (No space left on device)
fatal: cannot create directory at drivers/scsi/megaraid
And it finished keeping the downloaded files, but I still cannot see
these files listed above.
I tried to pull but it says that I'm up-to-date:
doctorture:/opt/downloads/mvista/linux-mvista # git-pull
Already up-to-date.
I remember that using CVS I just used 'cvs update' after checkout and
it would bring the missing files to me.
What I'm doing wrong here?
Thank you so much,
--
[]s,
André Goddard
^ permalink raw reply
* [PATCH] Makefile: ssh-pull.o depends on ssh-fetch.c
From: Johannes Schindelin @ 2006-07-28 9:17 UTC (permalink / raw)
To: git, junkio
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 636679f..e8037ad 100644
--- a/Makefile
+++ b/Makefile
@@ -661,6 +661,7 @@ git-%$X: %.o $(GITLIBS)
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIB_FILE) $(SIMPLE_LIB)
+ssh-pull.o: ssh-fetch.c
git-local-fetch$X: fetch.o
git-ssh-fetch$X: rsh.o fetch.o
git-ssh-upload$X: rsh.o
--
1.4.2.rc2.g51ee8-dirty
^ permalink raw reply related
* Re: Licensing and the library version of git
From: Johannes Schindelin @ 2006-07-28 9:01 UTC (permalink / raw)
To: Jon Smirl; +Cc: Anand Kumria, git
In-Reply-To: <9e4733910607271743o3b7a27d5v55a216745937c74e@mail.gmail.com>
Hi,
On Thu, 27 Jul 2006, Jon Smirl wrote:
> On 7/27/06, Anand Kumria <wildfire@progsoc.org> wrote:
>
> > So, using CVSNT (a GPL'd SCCI provider) and git-cvsserver would be a way
> > to continue. I'm assuming that the primary functionality they want via
> > their IDE is checkout/diff/commit/log.
>
> Now, that's a great strategy. Tell the large project you are
> interested in switching off from CVS to git that they need to run a
> CVS emulation gateway forever. I don't think a switch has much of a
> chance of happening.
Oh, but it has!
The beautiful thing is that you can change to git _without_ changing all
client software! Just to a git-cvsimport, switch, and some might not even
notice that the server has changed behind their back.
And then, you can phase out CVS slowly.
BTW have you worked with MSVC's integrated source control? In every single
case where I had to work with MSVC, I found I'm way faster with external
tools (and it did not matter if the SCM was Visual Source Safe, CVS or
PVCS). I know that my colleagues found the same.
BTW2 I agree that some deciding people would make MSVC integration a
premise for migration to Git. So, why don't you give it a try? (I do not
have a working MSVC setup, or I would help you.)
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] Allow fetching from multiple repositories at once
From: Johannes Schindelin @ 2006-07-28 8:51 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git, alp
In-Reply-To: <20060728054341.15864.35862.stgit@machine>
Hi,
On Fri, 28 Jul 2006, Petr Baudis wrote:
> This patch enables fetching multiple repositories at once over the Git
> protocol (and SSH, and locally if git-fetch-pack is your cup of coffee
> there). This is done especially for the xorg people who have tons of
> repositories and dislike pulls much slower than they were used to with CVS.
> I'm eager to hear how this affects the situation.
So the scenario is: one remote repository (probably shared), and multiple
local repositories, all tracking different branches?
So, why not setup a single local (master) repository, setup all the other
repos with the local master as alternate, and write a simple script which
first fetches all branches into the master, and then pulls into the other
local repos from that master?
The beauty of it is: you can still pull/push directly from the remote
repo, if you want.
Ciao,
Dscho
^ permalink raw reply
* Re: Licensing and the library version of git
From: Johannes Schindelin @ 2006-07-28 8:44 UTC (permalink / raw)
To: Shawn Pearce; +Cc: Wolfgang Denk, Jon Smirl, git
In-Reply-To: <20060728050444.GA30783@spearce.org>
Hi,
On Fri, 28 Jul 2006, Shawn Pearce wrote:
> [...] as the GPL is incompatible with the Sun JRE runtime lirbary.
This is not true. You can legally write and run GPLed software on the JRE
runtime library.
BTW I found an Eclipse plugin which is GPLed:
http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-651.html
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] Allow fetching from multiple repositories at once
From: Junio C Hamano @ 2006-07-28 7:35 UTC (permalink / raw)
To: Petr Baudis; +Cc: git, alp
In-Reply-To: <20060728054341.15864.35862.stgit@machine>
This is quite heavyweight.
I'll take a look at it eventually ;-), but I'd like to take a
deeper look at merge-recursive by Johannes and Alex first.
Perhaps I can get to it over the weekend, but Saturday is
already booked for friends' wedding, so it might take a while.
^ permalink raw reply
* Re: print errors from git-update-ref
From: Junio C Hamano @ 2006-07-28 7:26 UTC (permalink / raw)
To: Shawn Pearce; +Cc: git, Johannes Schindelin
In-Reply-To: <20060728062720.GC30783@spearce.org>
Shawn Pearce <spearce@spearce.org> writes:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> Hi,
>>
>> On Wed, 26 Jul 2006, Shawn Pearce wrote:
>>
>> > This change adds a test for trying to create a ref within a directory
>> > that is actually currently a file, and adds error printing within
>> > the ref locking routine should the resolve operation fail.
>>
>> Why not just print an error message when the resolve operation fails,
>> instead of special casing this obscure corner case? It is way shorter,
>> too. The test should stay, though.
>
> Did you read the patch? If resolve_ref returns NULL then this
> change prints an error (from errno) no matter what. If errno is
> ENOTDIR then it tries to figure out what part of the ref path wasn't
> a directory (but was attempted to be used as such) and prints an
> ENOTDIR error about that path instead of the one actually given
> to the ref lock function
>
> So I think I'm doing what you are suggesting...
Not quite.
+ int last_errno = errno;
+ if (errno == ENOTDIR) {
+ char* p = not_a_directory(orig_path);
+ error("unable to resolve reference %s: %s",
+ p, strerror(errno));
+ free(p);
+ } else
+ error("unable to resolve reference %s: %s",
+ orig_path, strerror(errno));
unlock_ref(lock);
+ errno = last_errno;
I know you are trying to be nice by pinpointing which component
of the directory hierarchy is offending, but at the same time
the nicety is hiding the orig_path given to the program from the
user. Maybe showing orig_path _and_ p would be nicer.
But I suspect there is even more serious problem here.
- lock_ref_sha1_basic() gets "path" from the user; you stash it
away in "orig_path".
- resolve_ref() tries to resolve both symbolic links and
symrefs. If it fails, it returns NULL.
- When it returns NULL, you use orig_path (say, "a/b/c/d") to
see which path component is not a directory (say, "a/b/c" is
a file).
But the last step does not take into account what resolve_ref()
does, doesn't it? What if orig_path is "HEAD", which is a
symref, which contained "ref: refs/heads/myhack/one" and
"refs/heads/myhack" is a file? Ideally you may want to say
something like:
'''while resolving %s, which points at %s,
we found out %s is not a directory''' %
("HEAD", "refs/heads/myhack/one", "refs/heads/myhack")
So I tend to agree with Johannes's "why bother?" reaction.
^ permalink raw reply
* Re: Java GIT/Eclipse GIT version 0.1.1
From: Peter Baumann @ 2006-07-28 7:23 UTC (permalink / raw)
To: git
In-Reply-To: <20060728030859.n8ks44ck8884ss44@webmail.spamcop.net>
On 2006-07-28, Pavel Roskin <proski@gnu.org> wrote:
> Quoting Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de>:
>
>> On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
>> > My Java GIT library and Eclipse GIT team provider is now at a point
>> > where it may be partially useful to someone else who is also trying
>> > to write something which interacts with GIT. Or who might also
>> > be interested in seeing a pure-Java Eclipse team provider for GIT.
>> >
>> > So I've posted my repository (currently ~200 KB) on my website:
>> >
>> > http://www.spearce.org/projects/scm/egit.git
>> >
>>
>> Doesn't work for me.
>
> Neither does it for me:
>
> $ git clone http://www.spearce.org/projects/scm/egit.git
> error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
> (http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2)
> corrupt
> Getting pack list for http://www.spearce.org/projects/scm/egit.git/
> error: XML error: not well-formed (invalid token)
>
>> *** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
>> /usr/bin/git-clone: line 29: 10712 Aborted git-http-fetch -v
>> -a -w "$tname" "$name" "$1/"
>
> I'm not getting that. I hope you are just using an obsolete version of git.
Not _that_ old, me thinks. I'm using the debian unstable version.
devil:~ dpkg -l |grep git-core
ii git-core 1.4.1-1 content addressable filesystem
(Yes, I'am aware that this version has the timing bug on the server
side, but I was just too lazy to compile git myself this time :-)
-Peter
^ permalink raw reply
* Re: Java GIT/Eclipse GIT version 0.1.1
From: Pavel Roskin @ 2006-07-28 7:08 UTC (permalink / raw)
To: Peter Baumann; +Cc: git
In-Reply-To: <slrnecjcsn.8td.Peter.B.Baumann@xp.machine.xx>
Quoting Peter Baumann <Peter.B.Baumann@stud.informatik.uni-erlangen.de>:
> On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
> > My Java GIT library and Eclipse GIT team provider is now at a point
> > where it may be partially useful to someone else who is also trying
> > to write something which interacts with GIT. Or who might also
> > be interested in seeing a pure-Java Eclipse team provider for GIT.
> >
> > So I've posted my repository (currently ~200 KB) on my website:
> >
> > http://www.spearce.org/projects/scm/egit.git
> >
>
> Doesn't work for me.
Neither does it for me:
$ git clone http://www.spearce.org/projects/scm/egit.git
error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2
(http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2)
corrupt
Getting pack list for http://www.spearce.org/projects/scm/egit.git/
error: XML error: not well-formed (invalid token)
> *** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
> /usr/bin/git-clone: line 29: 10712 Aborted git-http-fetch -v
> -a -w "$tname" "$name" "$1/"
I'm not getting that. I hope you are just using an obsolete version of git.
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: Java GIT/Eclipse GIT version 0.1.1
From: Peter Baumann @ 2006-07-28 6:49 UTC (permalink / raw)
To: git
In-Reply-To: <20060728063620.GD30783@spearce.org>
On 2006-07-28, Shawn Pearce <spearce@spearce.org> wrote:
> My Java GIT library and Eclipse GIT team provider is now at a point
> where it may be partially useful to someone else who is also trying
> to write something which interacts with GIT. Or who might also
> be interested in seeing a pure-Java Eclipse team provider for GIT.
>
> So I've posted my repository (currently ~200 KB) on my website:
>
> http://www.spearce.org/projects/scm/egit.git
>
Doesn't work for me.
devil:~/src git clone http://www.spearce.org/projects/scm/egit.git
error: File ac32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2 (http://www.spearce.org/projects/scm/egit.git/objects/ac/32c7cc2f7cf87a1ed80d0cdfca2af2a0385bb2) corrupt
Getting pack list for http://www.spearce.org/projects/scm/egit.git/
Getting alternates list for http://www.spearce.org/projects/scm/egit.git/
Also look at <html xmlns="http://www.w3.org/1999/
Also look at <title>Insufficiently Random: The lonely musings of a loosely connected software developer.<
Also look at @import url( http://www.spearce.org/wordpress/wp-content/themes/ir-classic/style
Also look at <link rel="pingback" href="http://www.spearce.org/wordpress/xmlrpc.
Also look at <link rel='archives' title='April 2006' href='http://www.spearce.org/2006/
Also look at <link rel='archives' title='February 2006' href='http://www.spearce.org/2006/
[...]
Also look at <li><a href="feed:http://www.spearce.org/comments/feed/" title="The latest comments to all posts in RSS">Comments <abbr title="Really Simple Syndication">RSS</abbr></
*** glibc detected *** double free or corruption (!prev): 0x080933b0 ***
/usr/bin/git-clone: line 29: 10712 Aborted git-http-fetch -v -a -w "$tname" "$name" "$1/"
-Peter
^ permalink raw reply
* Java GIT/Eclipse GIT version 0.1.1
From: Shawn Pearce @ 2006-07-28 6:36 UTC (permalink / raw)
To: git
My Java GIT library and Eclipse GIT team provider is now at a point
where it may be partially useful to someone else who is also trying
to write something which interacts with GIT. Or who might also
be interested in seeing a pure-Java Eclipse team provider for GIT.
So I've posted my repository (currently ~200 KB) on my website:
http://www.spearce.org/projects/scm/egit.git
The underlying Java library is fairly functional and can read and
write a repository. Creating a series of Ant tasks for use in an
automated build environment would probably be pretty trivial with
this library.
The Eclipse plugin can't commit. Or do a lot of other really
useful things. So its not end-user ready. :-)
The code is licensed under the Apache License, version 2.0.
I would appreciate any and all input, feedback, etc. that anyone
might have on this library or plugin. Patches are of course
certainly welcome. :-)
For what its worth I'm trying to keep this library and Eclipse
plugin 100% pure Java and avoid calling out to the canonical C
implementation of GIT. However I have no plans to implement the
delta packing algorithm used by git-pack-objects. Consequently if
this code ever produces packs it will be strictly zlib deflated
objects without delta compression.
--
Shawn.
^ permalink raw reply
* Re: print errors from git-update-ref
From: Shawn Pearce @ 2006-07-28 6:27 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, Alex Riesen, Git Mailing List
In-Reply-To: <Pine.LNX.4.63.0607271302150.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Wed, 26 Jul 2006, Shawn Pearce wrote:
>
> > This change adds a test for trying to create a ref within a directory
> > that is actually currently a file, and adds error printing within
> > the ref locking routine should the resolve operation fail.
>
> Why not just print an error message when the resolve operation fails,
> instead of special casing this obscure corner case? It is way shorter,
> too. The test should stay, though.
Did you read the patch? If resolve_ref returns NULL then this
change prints an error (from errno) no matter what. If errno is
ENOTDIR then it tries to figure out what part of the ref path wasn't
a directory (but was attempted to be used as such) and prints an
ENOTDIR error about that path instead of the one actually given
to the ref lock function
So I think I'm doing what you are suggesting...
--
Shawn.
^ 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