* Re: Make more commands builtin
From: Junio C Hamano @ 2006-05-23 8:41 UTC (permalink / raw)
To: Peter Eriksen; +Cc: git
In-Reply-To: <35036.1277036884$1148372628@news.gmane.org>
"Peter Eriksen" <s022018@student.dtu.dk> writes:
> Makefile | 26 +++++++++++++++-----------
> apply.c => builtin-apply.c | 3 ++-
> commit-tree.c => builtin-commit-tree.c | 3 ++-
> diff-files.c => builtin-diff-files.c | 3 ++-
> diff-index.c => builtin-diff-index.c | 3 ++-
> diff-stages.c => builtin-diff-stages.c | 3 ++-
> diff-tree.c => builtin-diff-tree.c | 3 ++-
> ls-files.c => builtin-ls-files.c | 3 ++-
> ls-tree.c => builtin-ls-tree.c | 3 ++-
> read-tree.c => builtin-read-tree.c | 3 ++-
> show-branch.c => builtin-show-branch.c | 3 ++-
> tar-tree.c => builtin-tar-tree.c | 3 ++-
> builtin.h | 12 ++++++++++++
> git.c | 13 ++++++++++++-
>
> I've tried to follow the trend of making commands builtin.
> All patches have the same form. This is my first use
> of git-send-email, so this might come out wrong.
>
> Peter Eriksen <s022018@student.dtu.dk>
Was this intentional?
Reply-To: Patches/@bohr.gbar.dtu.dk
Reply-To: Patches/0001-Builtin-git-ls-files.txt@bohr.gbar.dtu.dk
Otherwise the form looks OK, except that with this particular
series, I would have much preferred to see these with
"format-patch -M"; it is really hard to review otherwise.
BTW, I already have tar-tree built-in in "next" branch.
I'll go to bed now, so please expect review Ack/Nack until
evening my time (it is 01:40 here) from me.
^ permalink raw reply
* [PATCH] --summary output should print immediately after stats.
From: Sean @ 2006-05-23 9:34 UTC (permalink / raw)
To: git
Currently the summary is displayed after the patch. Fix this so
that the output order is stat-summary-patch. As a consequence of
the way this is coded, the --summary option will only actually
display summary data if combined with either the --stat or
--patch-with-stat option.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
3060faeb9c9320e12895cb33d25edb4aa4ba072e
diff.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
3060faeb9c9320e12895cb33d25edb4aa4ba072e
diff --git a/diff.c b/diff.c
index e16e0bf..fa36366 100644
--- a/diff.c
+++ b/diff.c
@@ -1867,6 +1867,9 @@ void diff_flush(struct diff_options *opt
show_stats(diffstat);
free(diffstat);
diffstat = NULL;
+ if (options->summary)
+ for (i = 0; i < q->nr; i++)
+ diff_summary(q->queue[i]);
putchar(options->line_termination);
}
for (i = 0; i < q->nr; i++) {
@@ -1880,7 +1883,7 @@ void diff_flush(struct diff_options *opt
}
for (i = 0; i < q->nr; i++) {
- if (options->summary)
+ if (diffstat && options->summary)
diff_summary(q->queue[i]);
diff_free_filepair(q->queue[i]);
}
--
1.3.GIT
^ permalink raw reply related
* Re: [PATCH 0/2] tagsize < 8kb restriction
From: Sean @ 2006-05-23 9:59 UTC (permalink / raw)
To: Linus Torvalds; +Cc: junkio, BjEngelmann, git
In-Reply-To: <Pine.LNX.4.64.0605221646540.3697@g5.osdl.org>
On Mon, 22 May 2006 17:02:41 -0700 (PDT)
Linus Torvalds <torvalds@osdl.org> wrote:
> That said, I think that what you actually want to do may be totally
> different.
>
> If _each_ commit has some extra information associated with it, you don't
> want to create a tag that points to the commit, you more likely want to
> create an object that is indexed by the commit ID rather than the other
> way around.
>
> IOW, I _think_ that what you described would be that if you have the
> commit ID, you want to find the data based on that ID. No?
Correct. But even though there isn't currently an efficient way to do
the reverse lookup, many of the visual tools do it. So for instance, if
you embed some metadata in the name of a tag, it will actually be nicely
shown to you associated with the proper commit in qgit/gitk/gitweb. So
you _can_ abuse tags and get modest results. And of course the low level
tools let you do.. git name-rev --tags to lookup the meta data as well.
So you can do git log | git name-rev --tags --stdin and see which tags
are associated with each commit.
I'm not arguing that this makes tags well designed for the these types
of things, just that there is no other option built in to the low level
git that comes as close.
> And that you can do quite easily, while _also_ using git to distribute the
> extra per-commit meta-data. Just create a separate branch that has the
> data indexed by commit ID. That could be as simple as having one file per
> commit (using, perhaps, a similar directory layout as the .git/objects/
> directory itself), and then you could do something like
>
> # Get the SHA1 of the named commit
> commit=$(git-rev-parse --verify "$cmitname"^0)
>
> # turn it into a filename (slash between two first chars and the rest)
> filename=$(echo $commit | sed 's:^\(..\)\(.*\):\1/\2:')
>
> # look it up in the "annotations" branch
> git cat-file blob "annotations:$filename"
>
> which gets the data from the "annotations" branch, indexed by the SHA1
> name.
>
> Now, everybody can track your "annotations" branch using git, and get your
> per-commit annotations for the main branch.
>
> See?
Sure, makes a lot of sense. Although the one file per commit thing doesn't
scale well. It's already a problem when trying to use a lot of tags for
instance.
More than the technical details of the implementation though, i'm trying to
make a case that git would do well to codify something like the above and
provide a _standard_ method of associating meta data with commits. This
would allow all the tools to start displaying meta data etc and have a
defined way to efficiently query and manipulate it.
Sean
^ permalink raw reply
* Q: xasprintf
From: Dmitry V. Levin @ 2006-05-23 11:28 UTC (permalink / raw)
To: git
In-Reply-To: <7vzmh98seo.fsf@assigned-by-dhcp.cox.net>
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
Hi,
On Mon, May 22, 2006 at 06:02:39PM -0700, Junio C Hamano wrote:
> Sean <seanlkml@sympatico.ca> writes:
[...]
> > - name = xmalloc(len_a + len_b - pfx_length - sfx_length + 7);
> > + name = xmalloc(pfx_length + a_midlen + b_midlen + sfx_length + 7);
> > sprintf(name, "%.*s{%.*s => %.*s}%s",
>
> Obviously correct given what the sprintf() that immediately
> follows does. Sheesh, what was I smoking back then. *BLUSH*
What about introducing xasprintf() to eliminate such issues?
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* Re: Git 1.3.2 on Solaris
From: Stefan Pfetzing @ 2006-05-23 12:04 UTC (permalink / raw)
To: Git Mailing List
In-Reply-To: <8157.1148359875@lotus.CS.Berkeley.EDU>
Hi Jason,
2006/5/23, Jason Riedy <ejr@eecs.berkeley.edu>:
> This is explicitly allowed by the SUS, even for non-root:
> http://www.opengroup.org/onlinepubs/000095399/functions/access.html
> For non-root, some ACL systems could allow you to execute
> the file even if there are no execute bits. What a joy
> ACLs are. Or NFS uid mappings could play tricks on you,
> or... And as you've noticed, this kills [ -x ]. (Failing
> to run the hooks in receive-pack.c is noisy but not fatal.
> It's the shell scripts that stop.)
Yup, but this breaks test t5400 - I think because of the post-update
hook is failing.
> I think you're stuck. To disable the hooks for all possible
> users, OSes, file systems, etc., you need to remove them.
>
> Or just don't run as root, and hope that the OS isn't
> completely insane.
As non-root it works fine.
> BTW, ERR_RUN_COMMAND_EXEC is never returned. Any failure
> to exec will produce an exit code of 128 from die. This
> will be an issue when commit becomes a built-in, right?
Think so.
bye
Stefan
--
http://www.dreamind.de/
Oroborus and Debian GNU/Linux Developer.
^ permalink raw reply
* [PATCH 8/8] Builtin git-diff-files, git-diff-index, git-diff-stages, and git-diff-tree.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
e2d2468b8550f2760b46a2eb461b051abfef4dff
Makefile | 12 ++++++------
diff-files.c => builtin-diff-files.c | 3 ++-
diff-index.c => builtin-diff-index.c | 3 ++-
diff-stages.c => builtin-diff-stages.c | 3 ++-
diff-tree.c => builtin-diff-tree.c | 3 ++-
builtin.h | 5 +++++
git.c | 6 +++++-
7 files changed, 24 insertions(+), 11 deletions(-)
rename diff-files.c => builtin-diff-files.c (94%)
rename diff-index.c => builtin-diff-index.c (91%)
rename diff-stages.c => builtin-diff-stages.c (97%)
rename diff-tree.c => builtin-diff-tree.c (98%)
e2d2468b8550f2760b46a2eb461b051abfef4dff
diff --git a/Makefile b/Makefile
index b438a90..9dc1326 100644
--- a/Makefile
+++ b/Makefile
@@ -151,9 +151,7 @@ # ... and all the rest that could be mov
PROGRAMS = \
git-cat-file$X \
git-checkout-index$X git-clone-pack$X \
- git-convert-objects$X git-diff-files$X \
- git-diff-index$X git-diff-stages$X \
- git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
+ git-convert-objects$X git-fetch-pack$X git-fsck-objects$X \
git-hash-object$X git-index-pack$X git-local-fetch$X \
git-mailinfo$X git-merge-base$X \
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
@@ -173,7 +171,8 @@ BUILT_INS = git-log$X git-whatchanged$X
git-grep$X git-rev-list$X git-check-ref-format$X \
git-init-db$X git-ls-files$X git-ls-tree$X \
git-tar-tree$X git-read-tree$X git-commit-tree$X \
- git-apply$X git-show-branch$X
+ git-apply$X git-show-branch$X git-diff-files$X \
+ git-diff-index$X git-diff-stages$X git-diff-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -223,8 +222,9 @@ BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
- builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o \
- builtin-apply.o builtin-show-branch.o
+ builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o \
+ builtin-apply.o builtin-show-branch.o builtin-diff-files.o \
+ builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/diff-files.c b/builtin-diff-files.c
similarity index 94%
rename from diff-files.c
rename to builtin-diff-files.c
index b9d193d..cebda82 100644
--- a/diff-files.c
+++ b/builtin-diff-files.c
@@ -7,12 +7,13 @@ #include "cache.h"
#include "diff.h"
#include "commit.h"
#include "revision.h"
+#include "builtin.h"
static const char diff_files_usage[] =
"git-diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
COMMON_DIFF_OPTIONS_HELP;
-int main(int argc, const char **argv)
+int cmd_diff_files(int argc, const char **argv, char **envp)
{
struct rev_info rev;
int silent = 0;
diff --git a/diff-index.c b/builtin-diff-index.c
similarity index 91%
rename from diff-index.c
rename to builtin-diff-index.c
index 8c9f601..1958580 100644
--- a/diff-index.c
+++ b/builtin-diff-index.c
@@ -2,13 +2,14 @@ #include "cache.h"
#include "diff.h"
#include "commit.h"
#include "revision.h"
+#include "builtin.h"
static const char diff_cache_usage[] =
"git-diff-index [-m] [--cached] "
"[<common diff options>] <tree-ish> [<path>...]"
COMMON_DIFF_OPTIONS_HELP;
-int main(int argc, const char **argv)
+int cmd_diff_index(int argc, const char **argv, char **envp)
{
struct rev_info rev;
int cached = 0;
diff --git a/diff-stages.c b/builtin-diff-stages.c
similarity index 97%
rename from diff-stages.c
rename to builtin-diff-stages.c
index dcd20e7..7c157ca 100644
--- a/diff-stages.c
+++ b/builtin-diff-stages.c
@@ -4,6 +4,7 @@
#include "cache.h"
#include "diff.h"
+#include "builtin.h"
static struct diff_options diff_options;
@@ -54,7 +55,7 @@ static void diff_stages(int stage1, int
}
}
-int main(int ac, const char **av)
+int cmd_diff_stages(int ac, const char **av, char **envp)
{
int stage1, stage2;
const char *prefix = setup_git_directory();
diff --git a/diff-tree.c b/builtin-diff-tree.c
similarity index 98%
rename from diff-tree.c
rename to builtin-diff-tree.c
index 69bb74b..cc53b81 100644
--- a/diff-tree.c
+++ b/builtin-diff-tree.c
@@ -2,6 +2,7 @@ #include "cache.h"
#include "diff.h"
#include "commit.h"
#include "log-tree.h"
+#include "builtin.h"
static struct rev_info log_tree_opt;
@@ -58,7 +59,7 @@ static const char diff_tree_usage[] =
" --root include the initial commit as diff against /dev/null\n"
COMMON_DIFF_OPTIONS_HELP;
-int main(int argc, const char **argv)
+int cmd_diff_tree(int argc, const char **argv, char **envp)
{
int nr_sha1;
char line[1000];
diff --git a/builtin.h b/builtin.h
index 01882ec..7620984 100644
--- a/builtin.h
+++ b/builtin.h
@@ -34,5 +34,10 @@ extern int cmd_read_tree(int argc, const
extern int cmd_commit_tree(int argc, const char **argv, char **envp);
extern int cmd_apply(int argc, const char **argv, char **envp);
extern int cmd_show_branch(int argc, const char **argv, char **envp);
+extern int cmd_diff_files(int argc, const char **argv, char **envp);
+extern int cmd_diff_index(int argc, const char **argv, char **envp);
+extern int cmd_diff_stages(int argc, const char **argv, char **envp);
+extern int cmd_diff_tree(int argc, const char **argv, char **envp);
+
#endif
diff --git a/git.c b/git.c
index d29505c..8749748 100644
--- a/git.c
+++ b/git.c
@@ -59,7 +59,11 @@ static void handle_internal_command(int
{ "read-tree", cmd_read_tree },
{ "commit-tree", cmd_commit_tree },
{ "apply", cmd_apply },
- { "show-branch", cmd_show_branch }
+ { "show-branch", cmd_show_branch },
+ { "diff-files", cmd_diff_files },
+ { "diff-index", cmd_diff_index },
+ { "diff-stages", cmd_diff_stages },
+ { "diff-tree", cmd_diff_tree }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* [PATCH 2/8] Builtin git-ls-tree.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
419257801e5bc91fc435bd4ff9eb42aa8063ffbb
Makefile | 6 +++---
ls-tree.c => builtin-ls-tree.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 8 insertions(+), 5 deletions(-)
rename ls-tree.c => builtin-ls-tree.c (98%)
419257801e5bc91fc435bd4ff9eb42aa8063ffbb
diff --git a/Makefile b/Makefile
index e522730..9b02264 100644
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ PROGRAMS = \
git-diff-index$X git-diff-stages$X \
git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
git-hash-object$X git-index-pack$X git-local-fetch$X \
- git-ls-tree$X git-mailinfo$X git-merge-base$X \
+ git-mailinfo$X git-merge-base$X \
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
git-peek-remote$X git-prune-packed$X git-read-tree$X \
git-receive-pack$X git-rev-parse$X \
@@ -171,7 +171,7 @@ PROGRAMS = \
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
- git-init-db$X git-ls-files$X
+ git-init-db$X git-ls-files$X git-ls-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -220,7 +220,7 @@ LIB_OBJS = \
BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
- builtin-init-db.o builtin-ls-files.o
+ builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/ls-tree.c b/builtin-ls-tree.c
similarity index 98%
rename from ls-tree.c
rename to builtin-ls-tree.c
index f2b3bc1..b515307 100644
--- a/ls-tree.c
+++ b/builtin-ls-tree.c
@@ -7,6 +7,7 @@ #include "cache.h"
#include "blob.h"
#include "tree.h"
#include "quote.h"
+#include "builtin.h"
static int line_termination = '\n';
#define LS_RECURSIVE 1
@@ -84,7 +85,7 @@ static int show_tree(unsigned char *sha1
return retval;
}
-int main(int argc, const char **argv)
+int cmd_ls_tree(int argc, const char **argv, char **envp)
{
unsigned char sha1[20];
struct tree *tree;
diff --git a/builtin.h b/builtin.h
index a0713d3..951f206 100644
--- a/builtin.h
+++ b/builtin.h
@@ -28,5 +28,6 @@ extern int cmd_rev_list(int argc, const
extern int cmd_check_ref_format(int argc, const char **argv, char **envp);
extern int cmd_init_db(int argc, const char **argv, char **envp);
extern int cmd_ls_files(int argc, const char **argv, char **envp);
+extern int cmd_ls_tree(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index 9cfa9eb..8574775 100644
--- a/git.c
+++ b/git.c
@@ -53,7 +53,8 @@ static void handle_internal_command(int
{ "rev-list", cmd_rev_list },
{ "init-db", cmd_init_db },
{ "check-ref-format", cmd_check_ref_format },
- { "ls-files", cmd_ls_files }
+ { "ls-files", cmd_ls_files },
+ { "ls-tree", cmd_ls_tree }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* [PATCH 5/8] Builtin git-commit-tree.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
762e5a2efcde796d84c573fe8bf3224c9fbf3588
Makefile | 6 +++---
commit-tree.c => builtin-commit-tree.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 8 insertions(+), 5 deletions(-)
rename commit-tree.c => builtin-commit-tree.c (98%)
762e5a2efcde796d84c573fe8bf3224c9fbf3588
diff --git a/Makefile b/Makefile
index 667fa5d..a5efbc7 100644
--- a/Makefile
+++ b/Makefile
@@ -150,7 +150,7 @@ SIMPLE_PROGRAMS = \
# ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS = \
git-apply$X git-cat-file$X \
- git-checkout-index$X git-clone-pack$X git-commit-tree$X \
+ git-checkout-index$X git-clone-pack$X \
git-convert-objects$X git-diff-files$X \
git-diff-index$X git-diff-stages$X \
git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
@@ -172,7 +172,7 @@ BUILT_INS = git-log$X git-whatchanged$X
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
git-init-db$X git-ls-files$X git-ls-tree$X \
- git-tar-tree$X git-read-tree$X
+ git-tar-tree$X git-read-tree$X git-commit-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -222,7 +222,7 @@ BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
- builtin-tar-tree.o builtin-read-tree.o
+ builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/commit-tree.c b/builtin-commit-tree.c
similarity index 98%
rename from commit-tree.c
rename to builtin-commit-tree.c
index 0320036..4ccdbec 100644
--- a/commit-tree.c
+++ b/builtin-commit-tree.c
@@ -6,6 +6,7 @@
#include "cache.h"
#include "commit.h"
#include "tree.h"
+#include "builtin.h"
#define BLOCKING (1ul << 14)
@@ -76,7 +77,7 @@ static int new_parent(int idx)
return 1;
}
-int main(int argc, char **argv)
+int cmd_commit_tree(int argc, const char **argv, char **envp)
{
int i;
int parents = 0;
diff --git a/builtin.h b/builtin.h
index 88b3523..c6b07d9 100644
--- a/builtin.h
+++ b/builtin.h
@@ -31,5 +31,6 @@ extern int cmd_ls_files(int argc, const
extern int cmd_ls_tree(int argc, const char **argv, char **envp);
extern int cmd_tar_tree(int argc, const char **argv, char **envp);
extern int cmd_read_tree(int argc, const char **argv, char **envp);
+extern int cmd_commit_tree(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index 300e2b2..4c2c062 100644
--- a/git.c
+++ b/git.c
@@ -56,7 +56,8 @@ static void handle_internal_command(int
{ "ls-files", cmd_ls_files },
{ "ls-tree", cmd_ls_tree },
{ "tar-tree", cmd_tar_tree },
- { "read-tree", cmd_read_tree }
+ { "read-tree", cmd_read_tree },
+ { "commit-tree", cmd_commit_tree }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* [PATCH 6/8] Builtin git-apply.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
104e34d8d562584d212f141b7ce736d47016b60a
Makefile | 8 +++++---
apply.c => builtin-apply.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 10 insertions(+), 5 deletions(-)
rename apply.c => builtin-apply.c (100%)
104e34d8d562584d212f141b7ce736d47016b60a
diff --git a/Makefile b/Makefile
index a5efbc7..eeb4fdb 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,7 @@ SIMPLE_PROGRAMS = \
# ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS = \
- git-apply$X git-cat-file$X \
+ git-cat-file$X \
git-checkout-index$X git-clone-pack$X \
git-convert-objects$X git-diff-files$X \
git-diff-index$X git-diff-stages$X \
@@ -172,7 +172,8 @@ BUILT_INS = git-log$X git-whatchanged$X
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
git-init-db$X git-ls-files$X git-ls-tree$X \
- git-tar-tree$X git-read-tree$X git-commit-tree$X
+ git-tar-tree$X git-read-tree$X git-commit-tree$X \
+ git-apply$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -222,7 +223,8 @@ BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
- builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o
+ builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o \
+ builtin-apply.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/apply.c b/builtin-apply.c
similarity index 100%
rename from apply.c
rename to builtin-apply.c
index 0ed9d13..4056b9d 100644
--- a/apply.c
+++ b/builtin-apply.c
@@ -11,6 +11,7 @@ #include "cache.h"
#include "quote.h"
#include "blob.h"
#include "delta.h"
+#include "builtin.h"
// --check turns on checking that the working tree matches the
// files that are being modified, but doesn't apply the patch
@@ -2151,7 +2152,7 @@ static int git_apply_config(const char *
}
-int main(int argc, char **argv)
+int cmd_apply(int argc, const char **argv, char **envp)
{
int i;
int read_stdin = 1;
diff --git a/builtin.h b/builtin.h
index c6b07d9..d6ff88e 100644
--- a/builtin.h
+++ b/builtin.h
@@ -32,5 +32,6 @@ extern int cmd_ls_tree(int argc, const c
extern int cmd_tar_tree(int argc, const char **argv, char **envp);
extern int cmd_read_tree(int argc, const char **argv, char **envp);
extern int cmd_commit_tree(int argc, const char **argv, char **envp);
+extern int cmd_apply(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index 4c2c062..f44e08b 100644
--- a/git.c
+++ b/git.c
@@ -57,7 +57,8 @@ static void handle_internal_command(int
{ "ls-tree", cmd_ls_tree },
{ "tar-tree", cmd_tar_tree },
{ "read-tree", cmd_read_tree },
- { "commit-tree", cmd_commit_tree }
+ { "commit-tree", cmd_commit_tree },
+ { "apply", cmd_apply }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* [PATCH 7/8] Builtin git-show-branch.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
d0d1cfb7985fa90442e423a55ca23e6bc83f912d
Makefile | 6 +++---
show-branch.c => builtin-show-branch.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 8 insertions(+), 5 deletions(-)
rename show-branch.c => builtin-show-branch.c (100%)
d0d1cfb7985fa90442e423a55ca23e6bc83f912d
diff --git a/Makefile b/Makefile
index eeb4fdb..b438a90 100644
--- a/Makefile
+++ b/Makefile
@@ -159,7 +159,7 @@ PROGRAMS = \
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
git-peek-remote$X git-prune-packed$X \
git-receive-pack$X git-rev-parse$X \
- git-send-pack$X git-show-branch$X git-shell$X \
+ git-send-pack$X git-shell$X \
git-show-index$X git-ssh-fetch$X \
git-ssh-upload$X git-unpack-file$X \
git-unpack-objects$X git-update-index$X git-update-server-info$X \
@@ -173,7 +173,7 @@ BUILT_INS = git-log$X git-whatchanged$X
git-grep$X git-rev-list$X git-check-ref-format$X \
git-init-db$X git-ls-files$X git-ls-tree$X \
git-tar-tree$X git-read-tree$X git-commit-tree$X \
- git-apply$X
+ git-apply$X git-show-branch$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -224,7 +224,7 @@ BUILTIN_OBJS = \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
builtin-tar-tree.o builtin-read-tree.o builtin-commit-tree.o \
- builtin-apply.o
+ builtin-apply.o builtin-show-branch.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/show-branch.c b/builtin-show-branch.c
similarity index 100%
rename from show-branch.c
rename to builtin-show-branch.c
index 268c57b..d1be8bb 100644
--- a/show-branch.c
+++ b/builtin-show-branch.c
@@ -3,6 +3,7 @@ #include <fnmatch.h>
#include "cache.h"
#include "commit.h"
#include "refs.h"
+#include "builtin.h"
static const char show_branch_usage[] =
"git-show-branch [--dense] [--current] [--all] [--heads] [--tags] [--topo-order] [--more=count | --list | --independent | --merge-base ] [--topics] [<refs>...]";
@@ -548,7 +549,7 @@ static int omit_in_dense(struct commit *
return 0;
}
-int main(int ac, char **av)
+int cmd_show_branch(int ac, const char **av, char **envp)
{
struct commit *rev[MAX_REVS], *commit;
struct commit_list *list = NULL, *seen = NULL;
diff --git a/builtin.h b/builtin.h
index d6ff88e..01882ec 100644
--- a/builtin.h
+++ b/builtin.h
@@ -33,5 +33,6 @@ extern int cmd_tar_tree(int argc, const
extern int cmd_read_tree(int argc, const char **argv, char **envp);
extern int cmd_commit_tree(int argc, const char **argv, char **envp);
extern int cmd_apply(int argc, const char **argv, char **envp);
+extern int cmd_show_branch(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index f44e08b..d29505c 100644
--- a/git.c
+++ b/git.c
@@ -58,7 +58,8 @@ static void handle_internal_command(int
{ "tar-tree", cmd_tar_tree },
{ "read-tree", cmd_read_tree },
{ "commit-tree", cmd_commit_tree },
- { "apply", cmd_apply }
+ { "apply", cmd_apply },
+ { "show-branch", cmd_show_branch }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* [PATCH 4/8] Builtin git-read-tree.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
baba8c18d8a5fff876d16a434b49677cd3ebbdb0
Makefile | 6 +++---
read-tree.c => builtin-read-tree.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 8 insertions(+), 5 deletions(-)
rename read-tree.c => builtin-read-tree.c (100%)
baba8c18d8a5fff876d16a434b49677cd3ebbdb0
diff --git a/Makefile b/Makefile
index 966f7ee..667fa5d 100644
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,7 @@ PROGRAMS = \
git-hash-object$X git-index-pack$X git-local-fetch$X \
git-mailinfo$X git-merge-base$X \
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
- git-peek-remote$X git-prune-packed$X git-read-tree$X \
+ git-peek-remote$X git-prune-packed$X \
git-receive-pack$X git-rev-parse$X \
git-send-pack$X git-show-branch$X git-shell$X \
git-show-index$X git-ssh-fetch$X \
@@ -172,7 +172,7 @@ BUILT_INS = git-log$X git-whatchanged$X
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
git-init-db$X git-ls-files$X git-ls-tree$X \
- git-tar-tree$X
+ git-tar-tree$X git-read-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -222,7 +222,7 @@ BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
- builtin-tar-tree.o
+ builtin-tar-tree.o builtin-read-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/read-tree.c b/builtin-read-tree.c
similarity index 100%
rename from read-tree.c
rename to builtin-read-tree.c
index 82e2a9a..ec40d01 100644
--- a/read-tree.c
+++ b/builtin-read-tree.c
@@ -11,6 +11,7 @@ #include "object.h"
#include "tree.h"
#include <sys/time.h>
#include <signal.h>
+#include "builtin.h"
static int reset = 0;
static int merge = 0;
@@ -763,7 +764,7 @@ static const char read_tree_usage[] = "g
static struct cache_file cache_file;
-int main(int argc, char **argv)
+int cmd_read_tree(int argc, const char **argv, char **envp)
{
int i, newfd, stage = 0;
unsigned char sha1[20];
diff --git a/builtin.h b/builtin.h
index d210543..88b3523 100644
--- a/builtin.h
+++ b/builtin.h
@@ -30,5 +30,6 @@ extern int cmd_init_db(int argc, const c
extern int cmd_ls_files(int argc, const char **argv, char **envp);
extern int cmd_ls_tree(int argc, const char **argv, char **envp);
extern int cmd_tar_tree(int argc, const char **argv, char **envp);
+extern int cmd_read_tree(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index c253e60..300e2b2 100644
--- a/git.c
+++ b/git.c
@@ -55,7 +55,8 @@ static void handle_internal_command(int
{ "check-ref-format", cmd_check_ref_format },
{ "ls-files", cmd_ls_files },
{ "ls-tree", cmd_ls_tree },
- { "tar-tree", cmd_tar_tree }
+ { "tar-tree", cmd_tar_tree },
+ { "read-tree", cmd_read_tree }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* [PATCH 1/8] Builtin git-ls-files.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
bc0dc50a3e9208011a39adc653e3463aa3ab4886
Makefile | 6 +++---
ls-files.c => builtin-ls-files.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 8 insertions(+), 5 deletions(-)
rename ls-files.c => builtin-ls-files.c (100%)
bc0dc50a3e9208011a39adc653e3463aa3ab4886
diff --git a/Makefile b/Makefile
index efe6b12..e522730 100644
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ PROGRAMS = \
git-diff-index$X git-diff-stages$X \
git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \
git-hash-object$X git-index-pack$X git-local-fetch$X \
- git-ls-files$X git-ls-tree$X git-mailinfo$X git-merge-base$X \
+ git-ls-tree$X git-mailinfo$X git-merge-base$X \
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
git-peek-remote$X git-prune-packed$X git-read-tree$X \
git-receive-pack$X git-rev-parse$X \
@@ -171,7 +171,7 @@ PROGRAMS = \
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
- git-init-db$X
+ git-init-db$X git-ls-files$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -220,7 +220,7 @@ LIB_OBJS = \
BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
- builtin-init-db.o
+ builtin-init-db.o builtin-ls-files.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/ls-files.c b/builtin-ls-files.c
similarity index 100%
rename from ls-files.c
rename to builtin-ls-files.c
index 4a4af1c..3a0c5f2 100644
--- a/ls-files.c
+++ b/builtin-ls-files.c
@@ -10,6 +10,7 @@ #include <fnmatch.h>
#include "cache.h"
#include "quote.h"
+#include "builtin.h"
static int abbrev = 0;
static int show_deleted = 0;
@@ -648,7 +649,7 @@ static const char ls_files_usage[] =
"[ --exclude-per-directory=<filename> ] [--full-name] [--abbrev] "
"[--] [<file>]*";
-int main(int argc, const char **argv)
+int cmd_ls_files(int argc, const char **argv, char** envp)
{
int i;
int exc_given = 0;
diff --git a/builtin.h b/builtin.h
index 6054126..a0713d3 100644
--- a/builtin.h
+++ b/builtin.h
@@ -27,5 +27,6 @@ extern int cmd_grep(int argc, const char
extern int cmd_rev_list(int argc, const char **argv, char **envp);
extern int cmd_check_ref_format(int argc, const char **argv, char **envp);
extern int cmd_init_db(int argc, const char **argv, char **envp);
+extern int cmd_ls_files(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index 3216d31..9cfa9eb 100644
--- a/git.c
+++ b/git.c
@@ -52,7 +52,8 @@ static void handle_internal_command(int
{ "grep", cmd_grep },
{ "rev-list", cmd_rev_list },
{ "init-db", cmd_init_db },
- { "check-ref-format", cmd_check_ref_format }
+ { "check-ref-format", cmd_check_ref_format },
+ { "ls-files", cmd_ls_files }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* Make more commands builtin
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git
Makefile | 26 +++++++++++++++-----------
apply.c => builtin-apply.c | 3 ++-
commit-tree.c => builtin-commit-tree.c | 3 ++-
diff-files.c => builtin-diff-files.c | 3 ++-
diff-index.c => builtin-diff-index.c | 3 ++-
diff-stages.c => builtin-diff-stages.c | 3 ++-
diff-tree.c => builtin-diff-tree.c | 3 ++-
ls-files.c => builtin-ls-files.c | 3 ++-
ls-tree.c => builtin-ls-tree.c | 3 ++-
read-tree.c => builtin-read-tree.c | 3 ++-
show-branch.c => builtin-show-branch.c | 3 ++-
tar-tree.c => builtin-tar-tree.c | 3 ++-
builtin.h | 12 ++++++++++++
git.c | 13 ++++++++++++-
14 files changed, 61 insertions(+), 23 deletions(-)
Junio, I've formatted this batch of patches with -M, so
they are easier to read. It seems there were some problems
with sending the last batch (patch 1 and 6 hasn't arrived),
but this should work, since I tested it by sending the
batch to myself first.
Sorry for the noise.
Regards,
Peter Eriksen
^ permalink raw reply
* [PATCH 3/8] Builtin git-tar-tree.
From: Peter Eriksen @ 2006-05-23 12:15 UTC (permalink / raw)
To: git; +Cc: Peter Eriksen
In-Reply-To: <11483865361243-git-send-email-1>
From: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
---
9860ed2d4a598ad100c3b4f6b07dd0a88a4547a6
Makefile | 8 +++++---
tar-tree.c => builtin-tar-tree.c | 3 ++-
builtin.h | 1 +
git.c | 3 ++-
4 files changed, 10 insertions(+), 5 deletions(-)
rename tar-tree.c => builtin-tar-tree.c (99%)
9860ed2d4a598ad100c3b4f6b07dd0a88a4547a6
diff --git a/Makefile b/Makefile
index 9b02264..966f7ee 100644
--- a/Makefile
+++ b/Makefile
@@ -161,7 +161,7 @@ PROGRAMS = \
git-receive-pack$X git-rev-parse$X \
git-send-pack$X git-show-branch$X git-shell$X \
git-show-index$X git-ssh-fetch$X \
- git-ssh-upload$X git-tar-tree$X git-unpack-file$X \
+ git-ssh-upload$X git-unpack-file$X \
git-unpack-objects$X git-update-index$X git-update-server-info$X \
git-upload-pack$X git-verify-pack$X git-write-tree$X \
git-update-ref$X git-symbolic-ref$X \
@@ -171,7 +171,8 @@ PROGRAMS = \
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
git-count-objects$X git-diff$X git-push$X \
git-grep$X git-rev-list$X git-check-ref-format$X \
- git-init-db$X git-ls-files$X git-ls-tree$X
+ git-init-db$X git-ls-files$X git-ls-tree$X \
+ git-tar-tree$X
# what 'all' will build and 'install' will install, in gitexecdir
ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@ -220,7 +221,8 @@ LIB_OBJS = \
BUILTIN_OBJS = \
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
- builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o
+ builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \
+ builtin-tar-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --git a/tar-tree.c b/builtin-tar-tree.c
similarity index 99%
rename from tar-tree.c
rename to builtin-tar-tree.c
index 3308736..6ada04c 100644
--- a/tar-tree.c
+++ b/builtin-tar-tree.c
@@ -7,6 +7,7 @@ #include "tree-walk.h"
#include "commit.h"
#include "strbuf.h"
#include "tar.h"
+#include "builtin.h"
#define RECORDSIZE (512)
#define BLOCKSIZE (RECORDSIZE * 20)
@@ -301,7 +302,7 @@ static void traverse_tree(struct tree_de
}
}
-int main(int argc, char **argv)
+int cmd_tar_tree(int argc, const char **argv, char** envp)
{
unsigned char sha1[20], tree_sha1[20];
struct commit *commit;
diff --git a/builtin.h b/builtin.h
index 951f206..d210543 100644
--- a/builtin.h
+++ b/builtin.h
@@ -29,5 +29,6 @@ extern int cmd_check_ref_format(int argc
extern int cmd_init_db(int argc, const char **argv, char **envp);
extern int cmd_ls_files(int argc, const char **argv, char **envp);
extern int cmd_ls_tree(int argc, const char **argv, char **envp);
+extern int cmd_tar_tree(int argc, const char **argv, char **envp);
#endif
diff --git a/git.c b/git.c
index 8574775..c253e60 100644
--- a/git.c
+++ b/git.c
@@ -54,7 +54,8 @@ static void handle_internal_command(int
{ "init-db", cmd_init_db },
{ "check-ref-format", cmd_check_ref_format },
{ "ls-files", cmd_ls_files },
- { "ls-tree", cmd_ls_tree }
+ { "ls-tree", cmd_ls_tree },
+ { "tar-tree", cmd_tar_tree }
};
int i;
--
1.3.3.g288c
^ permalink raw reply related
* Re: Make more commands builtin
From: Peter Eriksen @ 2006-05-23 12:20 UTC (permalink / raw)
To: git
In-Reply-To: <11483865361243-git-send-email-1>
Btw.
I used these commands to produce the patch series:
git diff --stat -C 24b65a30015aedd..pe/builtin
git-send-email --no-chain-reply-to --compose \
--from=s022018@student.dtu.dk --not-signed-off-by-cc \
--quiet \
--subject="Make more commands builtin" \
--to=git@vger.kernel.org Patches/*
Is this a reasonable way to do it?
Peter
^ permalink raw reply
* Re: Make more commands builtin
From: Jakub Narebski @ 2006-05-23 12:36 UTC (permalink / raw)
To: git
In-Reply-To: <20060523122056.GA5777@bohr.gbar.dtu.dk>
Peter Eriksen wrote:
> Btw.
>
> I used these commands to produce the patch series:
>
> git diff --stat -C 24b65a30015aedd..pe/builtin
> git-send-email --no-chain-reply-to --compose \
> --from=s022018@student.dtu.dk --not-signed-off-by-cc \
> --quiet \
> --subject="Make more commands builtin" \
> --to=git@vger.kernel.org Patches/*
I wonder why the patches themselves are not replies to the main/summary
email, i.e. "Make more commands builtin" email...
--
Jakub Narebski
Warsaw, Poland
^ permalink raw reply
* Re: Make more commands builtin
From: Peter Eriksen @ 2006-05-23 12:54 UTC (permalink / raw)
To: git
In-Reply-To: <e4uvku$o28$1@sea.gmane.org>
On Tue, May 23, 2006 at 02:36:54PM +0200, Jakub Narebski wrote:
> Peter Eriksen wrote:
>
> > Btw.
> >
> > I used these commands to produce the patch series:
> >
> > git diff --stat -C 24b65a30015aedd..pe/builtin
> > git-send-email --no-chain-reply-to --compose \
> > --from=s022018@student.dtu.dk --not-signed-off-by-cc \
> > --quiet \
> > --subject="Make more commands builtin" \
> > --to=git@vger.kernel.org Patches/*
>
> I wonder why the patches themselves are not replies to the main/summary
> email, i.e. "Make more commands builtin" email...
It seems thay are:
Subject: Make more commands builtin
Message-Id: <11483865361243-git-send-email-1>
Subject: [PATCH 1/8] Builtin git-ls-files.
Message-Id: <11483865362613-git-send-email-1>
In-Reply-To: <11483865361243-git-send-email-1>
Subject: [PATCH 2/8] Builtin git-ls-tree.
Message-Id: <11483865362923-git-send-email-1>
In-Reply-To: <11483865361243-git-send-email-1>
Peter
^ permalink raw reply
* Re: Make more commands builtin
From: Jakub Narebski @ 2006-05-23 13:05 UTC (permalink / raw)
To: git
In-Reply-To: <20060523125400.GA11128@bohr.gbar.dtu.dk>
Peter Eriksen wrote:
> On Tue, May 23, 2006 at 02:36:54PM +0200, Jakub Narebski wrote:
>> Peter Eriksen wrote:
>>
>> > Btw.
>> >
>> > I used these commands to produce the patch series:
>> >
>> > git diff --stat -C 24b65a30015aedd..pe/builtin
>> > git-send-email --no-chain-reply-to --compose \
>> > --from=s022018@student.dtu.dk --not-signed-off-by-cc \
>> > --quiet \
>> > --subject="Make more commands builtin" \
>> > --to=git@vger.kernel.org Patches/*
>>
>> I wonder why the patches themselves are not replies to the main/summary
>> email, i.e. "Make more commands builtin" email...
>
> It seems thay are:
>
> Subject: Make more commands builtin
> Message-Id: <11483865361243-git-send-email-1>
>
> Subject: [PATCH 1/8] Builtin git-ls-files.
> Message-Id: <11483865362613-git-send-email-1>
> In-Reply-To: <11483865361243-git-send-email-1>
Ahh... I'm reading git mailing list through GMane NNTP interface.
It would be nice if git-send-email added 'References:' Usenet/news
header in addition to email one 'In-Reply-To:'.
--
Jakub Narebski
Warsaw, Poland
^ permalink raw reply
* Re: [PATCH] git status: ignore empty directories (because they cannot be added)
From: Matthias Lederhofer @ 2006-05-23 14:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd5e56yi6.fsf@assigned-by-dhcp.cox.net>
> > Well, anyway, here the reasons for this patch:
> > - Working in a git repository with a lot of empty directories is
> > annoying, because all of them show up in git status even though they
> > cannot be added. With --no-empty-directories they are hidden.
>
> What directories are they? Will they some day have files that
> you might want to keep track of? The reason for this question
> is, "otherwise you could .gitignore them".
I have been trying ruby on rails and there are some empty directories
which will have files later. I would even add those empty directories
if it would be possible.
> > - If there is a directory which may be added because it is quite
> > useful to have the -u option to see what is in there to add (without
> > using ls path/to/directory).
>
> It really depends on how many files there are in such a
> "interesting" directory _and_ other "uninteresting" directories
> full of transitory files. The -u option that disables "skip
> contents and show only the top directory" behaviour globally
> might not be so useful in such a case -- you will see useful
> contents of an otherwise "closed" directory (because it defeats
> the --directory flag), but at the same time you would get tons
> of uninteresting files in another directory as well in such a
> case. You are likely to end up doing ls path/to/dir after
> noticing that there are non-empty foo/ and bar/ directories that
> have no tracked files, and you know which one has files
> interesting to you.
> So I am OK with the change, but I am somewhat still doubtful how
> useful the option would be.
The case I think about is that there are some directories which are
not tracked because they contain no files yet. All other directories
which are uninteresting are added to .gitignore. If an untracked
directory shows up in git-status one could easily check with
git-status -u what can be added.
PS: I had a typo in the git mailing list e-mail address and resent my
last e-mail to the list. Your reply did not make it to the list,
perhaps you can send it again.
^ permalink raw reply
* Re: Git 1.3.2 on Solaris
From: Linus Torvalds @ 2006-05-23 14:53 UTC (permalink / raw)
To: Jason Riedy; +Cc: Stefan Pfetzing, Git Mailing List
In-Reply-To: <8157.1148359875@lotus.CS.Berkeley.EDU>
On Mon, 22 May 2006, Jason Riedy wrote:
> And "Stefan Pfetzing" writes:
> - printf ("access: %d\n", access("/etc/motd", X_OK));
> [...]
> - will return 0 on solaris - when run as root, even though /etc/motd
> - is not executeable.
>
> This is explicitly allowed by the SUS, even for non-root:
What kind of CRAP has Solaris become?
Yes, it's allowed. That doesn't mean that a quality implementation should
do it.
SunOS used to be the best system around - it was, compared to others,
_nice_ to work with. It wasn't about what was "allowed by the standards",
that was the HP-SUX and AIX's excuses. It was the highest-quality
implementation.
Now, Solaris had some serious problems early on (yes, I was there when
they switched, and yes, I hated it), but I thought they had fixed their
stuff long long ago.
Have Sun people forgotten the difference between "quality" and "crap that
passes standards tests"?
Not doing a reasonable job on "access()" is a joke. It's like VMS being
"posix". Sure, it's the letter of the law, but it's still not _unix_.
Btw, even SuS says:
"The sentence concerning appropriate privileges and execute permission
bits reflects the two possibilities implemented by historical
implementations when checking superuser access for X_OK.
New implementations are discouraged from returning X_OK unless at
least one execution permission bit is set."
which clearly says "Solaris is CRAP" to me.
What the heck is going on? First the totally broken stdio that doesn't
retry on EINTR, now access(). And these people think they can compete?
Somebody hit some Solaris engineers with a 2x4 clue-stick, please.
Linus
^ permalink raw reply
* Re: Git 1.3.2 on Solaris
From: Edgar Toernig @ 2006-05-23 15:20 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jason Riedy, Stefan Pfetzing, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0605230744350.5623@g5.osdl.org>
Linus Torvalds wrote:
>
> > - printf ("access: %d\n", access("/etc/motd", X_OK));
> > [...]
> > - will return 0 on solaris - when run as root, even though /etc/motd
> > - is not executeable.
> >
> > This is explicitly allowed by the SUS, even for non-root:
>
> New implementations are discouraged from returning X_OK unless at
> least one execution permission bit is set."
>
> which clearly says "Solaris is CRAP" to me.
Just for the record: firefox's download manager performs exactly this
test to decide whether you can 'open with' a file (pretty silly because
the test is done on the freshly downloaded file in the temp dir which
never has an x-bit set). But I was hit by this effect on my system
which is - surprise surprise - Linux :-) Ok, it's a pretty old one
with a 2.0 kernel and libc 5. But nevertheless, access(2) is not the
right function to portably test the x-bit.
Ciao, ET.
^ permalink raw reply
* Re: Git 1.3.2 on Solaris
From: Linus Torvalds @ 2006-05-23 15:31 UTC (permalink / raw)
To: Edgar Toernig; +Cc: Jason Riedy, Stefan Pfetzing, Git Mailing List
In-Reply-To: <20060523172053.60ec1145.froese@gmx.de>
On Tue, 23 May 2006, Edgar Toernig wrote:
>
> But I was hit by this effect on my system which is - surprise surprise -
> Linux :-) Ok, it's a pretty old one with a 2.0 kernel and libc 5.
Yes, we've had that bug too, and yes, I was hit by a clue-stick, and still
have the bruise. That's how you teach people.
[ And how the heck does anybody still run 2.0, btw? ]
Linus
^ permalink raw reply
* Re: [PATCH] cvsimport: introduce -L<imit> option to workaround memory leaks
From: Theodore Tso @ 2006-05-23 15:36 UTC (permalink / raw)
To: Linus Torvalds
Cc: Martin Langhoff, Git Mailing List, Junio C Hamano,
Johannes.Schindelin, spyderous, smurf
In-Reply-To: <Pine.LNX.4.64.0605221926270.3697@g5.osdl.org>
On Mon, May 22, 2006 at 07:28:37PM -0700, Linus Torvalds wrote:
>
>
> This stupid patch on top of yours seems to make git happier. It's
> disgusting, I know, but it just repacks things every kilo-commit.
>
> I actually think that I found a real ext3 performance bug from trying to
> determine why git sometimes slows down ridiculously when the tree has been
> allowed to go too long without a repack.
Do you have dir_index (the hashed btree) feature enabled by any chance?
- Ted
^ permalink raw reply
* Re: [PATCH] cvsimport: introduce -L<imit> option to workaround memory leaks
From: Linus Torvalds @ 2006-05-23 16:05 UTC (permalink / raw)
To: Theodore Tso
Cc: Martin Langhoff, Git Mailing List, Junio C Hamano,
Johannes.Schindelin, spyderous, smurf
In-Reply-To: <20060523153636.GA21506@thunk.org>
On Tue, 23 May 2006, Theodore Tso wrote:
> On Mon, May 22, 2006 at 07:28:37PM -0700, Linus Torvalds wrote:
> >
> > I actually think that I found a real ext3 performance bug from trying to
> > determine why git sometimes slows down ridiculously when the tree has been
> > allowed to go too long without a repack.
>
> Do you have dir_index (the hashed btree) feature enabled by any chance?
No, and I know I probably should, since it would hopefully help git usage.
But my problem actually happens even with moderately sized directories:
they were just 40kB or so in size, and the problem isn't high system CPU
usage, but tons of extra IO. I ran things on a machine with 2GB of RAM,
and as far as I could tell, the working set _should_ have fit into memory,
but CPU utilization was consistently in the 1% range.
Now, it's possible that I'm just wrong, and it really didn't fit in
memory, but I I _suspect_ that the issue is that ext3 directory handling
still uses the "buffer_head" thing rather than the page cache, and that we
simply don't LRU the memory appropriately so we don't let the memory
pressure expand the buffer cache.
Now, using buffer cache in this day and age is insane and horrible
(there's a reason I suspect the LRU doesn't work that well: the buffer
heads aren't supposed to be used as a cache, and people are supposed to
use the page cache for it these days), but Andrew tells me that the whole
JBD thing basically requires it. Whatever.
Now, repacking obviously hides it entirely (because then the load becomes
entirely a page-cache load, and the kernel does _that_ beautifully), but
I'm a bit bummed that I think I hit an ext3 braindamage.
So an unpacked git archive on ext3 (but not ext2, I believe: ext2 should
use the page cache for directories) ends up being very buffer-cache
intensive. And the buffer cache is basically deprecated..
Linus
PS. I'll see if I can figure out the problem, and maybe the good news is
that I'll be able to just fix a real kernel performance issue. Still,
there's a _reason_ we tried to get away from the buffer heads as a caching
entity..
^ permalink raw reply
* Re: [PATCH] cvsimport: introduce -L<imit> option to workaround memory leaks
From: Linus Torvalds @ 2006-05-23 16:25 UTC (permalink / raw)
To: Theodore Tso
Cc: Martin Langhoff, Git Mailing List, Junio C Hamano,
Johannes.Schindelin, spyderous, smurf
In-Reply-To: <Pine.LNX.4.64.0605230848060.5623@g5.osdl.org>
On Tue, 23 May 2006, Linus Torvalds wrote:
>
> So an unpacked git archive on ext3 (but not ext2, I believe: ext2 should
> use the page cache for directories) ends up being very buffer-cache
> intensive. And the buffer cache is basically deprecated..
A few notes: I'm not 100% sure things really fit in the 2GB (*), so it
really may be IO limited, and the low CPU use is just because that machine
also happens to have a dang fast next-gen Intel CPU that hasn't even been
released yet.
Also, I do realize that hashed directories should actually decrease the
buffer cache pressure too, just because we wouldn't need to read all of
the directory for a lookup.
Linus
(*) cvsps itself grows to 1.6GB of the 2GB and while that memory should be
largely idle, the problem may simply be that we don't swap it out eagerly
enough. Allowing filesystem metadata to swap out processes is something
we've tuned against, because it tends to result in horrible interactive
behaviour after a nightly "updatedb" run. So it's entirely possible that
this is all normal..
^ 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