* [RFC PATCH] Add support for figuring out where in the git archive we are
@ 2005-08-16 22:45 Linus Torvalds
2005-08-16 23:10 ` Yasushi SHOJI
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Linus Torvalds @ 2005-08-16 22:45 UTC (permalink / raw)
To: Junio C Hamano, Git Mailing List
This does only "git-diff-cache" and "git-diff-files", but the concept
should work for any command that uses the working tree.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
This is really partly a serious patch, but also just a query whether
people would want git to work in subdirectories, not just the top-level
directory.
So you can be in linux/drivers, and if you do a
git-diff-files -p char
then it will automatically be turned into the full pathname, and do the
right thing (ie do a diff of drivers/char only).
I didn't want to do it originally, but that was largely a complexity
issue, and an issue of there being many more things up in the air at that
time. Now, things have calmed down a bit, the interfaces are fairly
stable, and it turns out to be not that difficult to just walk up the
chain of directories until we hit the one that has the ".git" directory in
it.
I only converted "git-diff-files" and "git-diff-cache" to do this, because
so far it's a technology demo. And the "git-diff-script" file (and the
git-sh-setup-script in particular) does _not_ accept this "automatically
figure out where we are" thing, so it's really only the native git diff
commands that do it.
But if people think it's a good idea, I can pretty trivially convert the
rest. It's done in a way that makes it very easy to convert programs to
take advantage of the auto-git-directory-finding thing.
If you use the GIT_DIR environment variable approach, it assumes that all
filenames you give it are absolute and acts the way it always did before.
Comments? Like? Dislike?
Linus
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -97,7 +97,7 @@ LIB_H=cache.h object.h blob.h tree.h com
LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \
refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o \
- sha1_name.o
+ sha1_name.o setup.o
LIB_H += rev-cache.h
LIB_OBJS += rev-cache.o
diff --git a/cache.h b/cache.h
--- a/cache.h
+++ b/cache.h
@@ -140,6 +140,8 @@ extern char *get_graft_file(void);
#define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES"
+extern char **setup_git_directory(char **pathspec);
+
#define alloc_nr(x) (((x)+16)*3/2)
/* Initialize and use the cache information */
diff --git a/diff-cache.c b/diff-cache.c
--- a/diff-cache.c
+++ b/diff-cache.c
@@ -179,15 +179,12 @@ int main(int argc, const char **argv)
int allow_options = 1;
int i;
- read_cache();
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
if (!allow_options || *arg != '-') {
- if (tree_name) {
- pathspec = argv + i;
+ if (tree_name)
break;
- }
tree_name = arg;
continue;
}
@@ -265,12 +262,16 @@ int main(int argc, const char **argv)
usage(diff_cache_usage);
}
+ pathspec = setup_git_directory(argv + i);
+
if (find_copies_harder && detect_rename != DIFF_DETECT_COPY)
usage(diff_cache_usage);
if (!tree_name || get_sha1(tree_name, sha1))
usage(diff_cache_usage);
+ read_cache();
+
/* The rest is for paths restriction. */
diff_setup(diff_setup_opt);
diff --git a/diff-files.c b/diff-files.c
--- a/diff-files.c
+++ b/diff-files.c
@@ -45,8 +45,7 @@ int main(int argc, const char **argv)
{
static const unsigned char null_sha1[20] = { 0, };
const char **pathspec;
- int entries = read_cache();
- int i;
+ int entries, i;
while (1 < argc && argv[1][0] == '-') {
if (!strcmp(argv[1], "-p") || !strcmp(argv[1], "-u"))
@@ -95,8 +94,9 @@ int main(int argc, const char **argv)
argv++; argc--;
}
- /* Do we have a pathspec? */
- pathspec = (argc > 1) ? argv + 1 : NULL;
+ /* Find the directory, and set up the pathspec */
+ pathspec = setup_git_directory(argv + 1);
+ entries = read_cache();
if (find_copies_harder && detect_rename != DIFF_DETECT_COPY)
usage(diff_files_usage);
diff --git a/setup.c b/setup.c
new file mode 100644
--- /dev/null
+++ b/setup.c
@@ -0,0 +1,66 @@
+#include "cache.h"
+
+char **setup_git_directory(char **pathspec)
+{
+ static char *spec[2], **p;
+ static char cwd[PATH_MAX+1];
+ int len, offset;
+
+ /*
+ * If GIT_DIR is set explicitly, we're not going
+ * to do any discovery
+ */
+ if (gitenv(GIT_DIR_ENVIRONMENT))
+ return *pathspec ? pathspec : NULL;
+
+ if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/')
+ die("Unable to read current working directory");
+
+ offset = len = strlen(cwd);
+ for (;;) {
+ /*
+ * We always want to see a .git/HEAD and a .git/refs/
+ * subdirectory
+ */
+ if (!access(".git/HEAD", R_OK) && !access(".git/refs/", X_OK)) {
+ /*
+ * Then we need either a GIT_OBJECT_DIRECTORY define
+ * or a .git/objects/ directory
+ */
+ if (gitenv(DB_ENVIRONMENT) || !access(".git/objects/", X_OK))
+ break;
+ }
+ chdir("..");
+ do {
+ if (!offset)
+ die("Not a git repository");
+ } while (cwd[--offset] != '/');
+ }
+
+ if (offset == len)
+ return *pathspec ? pathspec : NULL;
+
+ /* Make "offset" point to past the '/', and add a '/' at the end */
+ offset++;
+ cwd[len++] = '/';
+ cwd[len] = 0;
+
+ /* An empty pathspec gets turned into the directory we were in */
+ if (!*pathspec) {
+ spec[0] = cwd + offset;
+ spec[1] = NULL;
+ return spec;
+ }
+
+ /* Otherwise we have to re-write the entries.. */
+ p = pathspec;
+ do {
+ int speclen = strlen(*p);
+ char *n = xmalloc(speclen + len - offset + 1);
+ memcpy(n, cwd + offset, len - offset);
+ memcpy(n + len - offset, *p, speclen+1);
+ *p = n;
+ } while (*++p);
+ return pathspec;
+}
+
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-16 22:45 [RFC PATCH] Add support for figuring out where in the git archive we are Linus Torvalds @ 2005-08-16 23:10 ` Yasushi SHOJI 2005-08-16 23:40 ` Junio C Hamano 2005-08-17 0:25 ` Daniel Barkalow 2 siblings, 0 replies; 10+ messages in thread From: Yasushi SHOJI @ 2005-08-16 23:10 UTC (permalink / raw) To: Linus Torvalds; +Cc: Junio C Hamano, Git Mailing List At Tue, 16 Aug 2005 15:45:35 -0700 (PDT), Linus Torvalds wrote: > > This is really partly a serious patch, but also just a query whether > people would want git to work in subdirectories, not just the top-level > directory. > > So you can be in linux/drivers, and if you do a > > git-diff-files -p char > > then it will automatically be turned into the full pathname, and do the > right thing (ie do a diff of drivers/char only). I've had missed this feature a lot, since quilt has been working this way. now I can close just-for-git terminal.(tm) regards, -- yashi ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-16 22:45 [RFC PATCH] Add support for figuring out where in the git archive we are Linus Torvalds 2005-08-16 23:10 ` Yasushi SHOJI @ 2005-08-16 23:40 ` Junio C Hamano 2005-08-17 0:01 ` Linus Torvalds 2005-08-17 0:25 ` Daniel Barkalow 2 siblings, 1 reply; 10+ messages in thread From: Junio C Hamano @ 2005-08-16 23:40 UTC (permalink / raw) To: Linus Torvalds; +Cc: Git Mailing List Linus Torvalds <torvalds@osdl.org> writes: > If you use the GIT_DIR environment variable approach, it assumes that all > filenames you give it are absolute and acts the way it always did before. > Comments? Like? Dislike? Comments: Wouldn't that mean git-*-scripts would not benefit from this because git-sh-setup would set GIT_DIR for you even if you don't? Even if you do not have to do discovery, it may make more sense to do the pathname translation (making them all relative to the project root) for consistency. If you can do "cd drivers && git-diff-files ../net" that would be very useful. More realistically, people would very much appreciate if stripping the leading ./ in "find . -type f -print0 | xargs -0 git-blah-command". Like: Yes, you finally saw the light ;-). Dislike: I believe I was one of the original proponent for this kind of thing, so no. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-16 23:40 ` Junio C Hamano @ 2005-08-17 0:01 ` Linus Torvalds 2005-08-17 0:16 ` Junio C Hamano 0 siblings, 1 reply; 10+ messages in thread From: Linus Torvalds @ 2005-08-17 0:01 UTC (permalink / raw) To: Junio C Hamano; +Cc: Git Mailing List On Tue, 16 Aug 2005, Junio C Hamano wrote: > > Comments: Wouldn't that mean git-*-scripts would not benefit from this > because git-sh-setup would set GIT_DIR for you even if > you don't? As it stands now, yes. But the point being that if people like this, then I'll just change the git-sh-setup-script accordingly. For example, once git-diff-tree also does the same thing, then "git-diff-script" would have no reason left to even call the current git-sh-setup-script at all, since the git-diff-* commands would basically do the setup _and_ report the errors that git-sh-setup-script does now. > If you can do "cd drivers && git-diff-files ../net" > that would be very useful. I don't do that right now, but it's actually very easy to do in the setup_git_directory() function. It falls out very simply there - both the "./" and the "../" prefix would make tons of sense to handle there. Do you want to take the current patch (which buys you very little because not a lot of stuff has been set up to deal with it, but is the basis for all future work anyway) or do you want me to polish it up a bit and re-submit the whole thing? I'd do at least the "git-diff-tree" part and the "./" and "../" handling, and convert at least the "git diff" thing to the new world order and away from git-sh-setup-script? Linus ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-17 0:01 ` Linus Torvalds @ 2005-08-17 0:16 ` Junio C Hamano 2005-08-17 1:06 ` Linus Torvalds 0 siblings, 1 reply; 10+ messages in thread From: Junio C Hamano @ 2005-08-17 0:16 UTC (permalink / raw) To: Linus Torvalds; +Cc: Git Mailing List Linus Torvalds <torvalds@osdl.org> writes: > Do you want to take the current patch (which buys you very little because > not a lot of stuff has been set up to deal with it, but is the basis for > all future work anyway) or do you want me to polish it up a bit and > re-submit the whole thing? The developement history would look nicer if you did the latter, but I am easy and can go either way. > I'd do at least the "git-diff-tree" part and the "./" and "../" handling, > and convert at least the "git diff" thing to the new world order and away > from git-sh-setup-script? Sounds like fun. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-17 0:16 ` Junio C Hamano @ 2005-08-17 1:06 ` Linus Torvalds 2005-08-17 2:00 ` Junio C Hamano 0 siblings, 1 reply; 10+ messages in thread From: Linus Torvalds @ 2005-08-17 1:06 UTC (permalink / raw) To: Junio C Hamano; +Cc: Git Mailing List On Tue, 16 Aug 2005, Junio C Hamano wrote: > > The developement history would look nicer if you did the latter, > but I am easy and can go either way. Here is. > > I'd do at least the "git-diff-tree" part and the "./" and "../" handling, > > and convert at least the "git diff" thing to the new world order and away > > from git-sh-setup-script? > > Sounds like fun. Mostly done. It actually works from inside subdirectories, but "." at the top-level is still not done. Small detail. Will fix later. But it would help if you would apply this, since I'm going to be off for dinner.. The "../" handling was pretty straightforward. Linus ---- Make "git diff" work inside relative subdirectories We always show the diff as an absolute path, but pathnames to diff are taken relative to the current working directory (and if no pathnames are given, the default ends up being all of the current working directory). Note that "../xyz" also works, so you can do cd linux/drivers/char git diff ../block and it will generate a diff of the linux/drivers/block changes. Signed-off-by: Linus Torvalds <torvalds@osdl.org> --- diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ LIB_H=cache.h object.h blob.h tree.h com LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \ tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \ refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o \ - sha1_name.o + sha1_name.o setup.o LIB_H += rev-cache.h LIB_OBJS += rev-cache.o diff --git a/cache.h b/cache.h --- a/cache.h +++ b/cache.h @@ -140,6 +140,9 @@ extern char *get_graft_file(void); #define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES" +extern const char **get_pathspec(const char *prefix, char **pathspec); +extern const char *setup_git_directory(void); + #define alloc_nr(x) (((x)+16)*3/2) /* Initialize and use the cache information */ diff --git a/diff-cache.c b/diff-cache.c --- a/diff-cache.c +++ b/diff-cache.c @@ -168,10 +168,11 @@ static const char diff_cache_usage[] = "[<common diff options>] <tree-ish> [<path>...]" COMMON_DIFF_OPTIONS_HELP; -int main(int argc, const char **argv) +int main(int argc, char **argv) { const char *tree_name = NULL; unsigned char sha1[20]; + const char *prefix = setup_git_directory(); const char **pathspec = NULL; void *tree; unsigned long size; @@ -179,15 +180,12 @@ int main(int argc, const char **argv) int allow_options = 1; int i; - read_cache(); for (i = 1; i < argc; i++) { const char *arg = argv[i]; if (!allow_options || *arg != '-') { - if (tree_name) { - pathspec = argv + i; + if (tree_name) break; - } tree_name = arg; continue; } @@ -265,12 +263,16 @@ int main(int argc, const char **argv) usage(diff_cache_usage); } + pathspec = get_pathspec(prefix, argv + i); + if (find_copies_harder && detect_rename != DIFF_DETECT_COPY) usage(diff_cache_usage); if (!tree_name || get_sha1(tree_name, sha1)) usage(diff_cache_usage); + read_cache(); + /* The rest is for paths restriction. */ diff_setup(diff_setup_opt); diff --git a/diff-files.c b/diff-files.c --- a/diff-files.c +++ b/diff-files.c @@ -41,12 +41,12 @@ static void show_modified(int oldmode, i diff_change(oldmode, mode, old_sha1, sha1, path, NULL); } -int main(int argc, const char **argv) +int main(int argc, char **argv) { static const unsigned char null_sha1[20] = { 0, }; const char **pathspec; - int entries = read_cache(); - int i; + const char *prefix = setup_git_directory(); + int entries, i; while (1 < argc && argv[1][0] == '-') { if (!strcmp(argv[1], "-p") || !strcmp(argv[1], "-u")) @@ -95,8 +95,9 @@ int main(int argc, const char **argv) argv++; argc--; } - /* Do we have a pathspec? */ - pathspec = (argc > 1) ? argv + 1 : NULL; + /* Find the directory, and set up the pathspec */ + pathspec = get_pathspec(prefix, argv + 1); + entries = read_cache(); if (find_copies_harder && detect_rename != DIFF_DETECT_COPY) usage(diff_files_usage); diff --git a/diff-tree.c b/diff-tree.c --- a/diff-tree.c +++ b/diff-tree.c @@ -395,16 +395,25 @@ static int diff_tree_stdin(char *line) return diff_tree_commit(commit, line); } +static int count_paths(const char **paths) +{ + int i = 0; + while (*paths++) + i++; + return i; +} + static const char diff_tree_usage[] = "git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] " "[<common diff options>] <tree-ish> <tree-ish>" COMMON_DIFF_OPTIONS_HELP; -int main(int argc, const char **argv) +int main(int argc, char **argv) { int nr_sha1; char line[1000]; unsigned char sha1[2][20]; + const char *prefix = setup_git_directory(); nr_sha1 = 0; for (;;) { @@ -523,11 +532,11 @@ int main(int argc, const char **argv) if (find_copies_harder && detect_rename != DIFF_DETECT_COPY) usage(diff_tree_usage); - if (argc > 0) { + paths = get_pathspec(prefix, argv); + if (paths) { int i; - paths = argv; - nr_paths = argc; + nr_paths = count_paths(paths); pathlens = xmalloc(nr_paths * sizeof(int)); for (i=0; i<nr_paths; i++) pathlens[i] = strlen(paths[i]); diff --git a/git-diff-script b/git-diff-script --- a/git-diff-script +++ b/git-diff-script @@ -1,7 +1,5 @@ #!/bin/sh -. git-sh-setup-script || die "Not a git archive" - -rev=($(git-rev-parse --revs-only "$@")) +rev=($(git-rev-parse --revs-only "$@")) || exit flags=($(git-rev-parse --no-revs --flags "$@")) files=($(git-rev-parse --no-revs --no-flags "$@")) case "${#rev[*]}" in diff --git a/rev-parse.c b/rev-parse.c --- a/rev-parse.c +++ b/rev-parse.c @@ -134,7 +134,8 @@ int main(int argc, char **argv) { int i, as_is = 0; unsigned char sha1[20]; - + const char *prefix = setup_git_directory(); + for (i = 1; i < argc; i++) { char *arg = argv[i]; char *dotdot; @@ -189,6 +190,10 @@ int main(int argc, char **argv) for_each_ref(show_reference); continue; } + if (!strcmp(arg, "--show-prefix")) { + puts(prefix); + continue; + } show_arg(arg); continue; } diff --git a/setup.c b/setup.c new file mode 100644 --- /dev/null +++ b/setup.c @@ -0,0 +1,110 @@ +#include "cache.h" + +const char **get_pathspec(const char *prefix, char **pathspec) +{ + char *entry = *pathspec; + char **p; + int prefixlen; + + if (!prefix) { + char **p; + if (!entry) + return NULL; + p = pathspec; + do { + if (*entry != '.') + continue; + /* fixup ? */ + } while ((entry = *++p) != NULL); + return (const char **) pathspec; + } + + if (!entry) { + static const char *spec[2]; + spec[0] = prefix; + spec[1] = NULL; + return spec; + } + + /* Otherwise we have to re-write the entries.. */ + prefixlen = strlen(prefix); + p = pathspec; + do { + int speclen, len = prefixlen; + char *n; + + for (;;) { + if (!strcmp(entry, ".")) { + entry++; + break; + } + if (!strncmp(entry, "./", 2)) { + entry += 2; + continue; + } + if (!strncmp(entry, "../", 3)) { + do { + if (!len) + die("'%s' is outside repository", *p); + len--; + } while (len && prefix[len-1] != '/'); + entry += 3; + continue; + } + break; + } + speclen = strlen(entry); + n = xmalloc(speclen + len + 1); + + memcpy(n, prefix, len); + memcpy(n + len, entry, speclen+1); + *p = n; + } while ((entry = *++p) != NULL); + return (const char **) pathspec; +} + +const char *setup_git_directory(void) +{ + static char cwd[PATH_MAX+1]; + int len, offset; + + /* + * If GIT_DIR is set explicitly, we're not going + * to do any discovery + */ + if (gitenv(GIT_DIR_ENVIRONMENT)) + return NULL; + + if (!getcwd(cwd, sizeof(cwd)) || cwd[0] != '/') + die("Unable to read current working directory"); + + offset = len = strlen(cwd); + for (;;) { + /* + * We always want to see a .git/HEAD and a .git/refs/ + * subdirectory + */ + if (!access(".git/HEAD", R_OK) && !access(".git/refs/", X_OK)) { + /* + * Then we need either a GIT_OBJECT_DIRECTORY define + * or a .git/objects/ directory + */ + if (gitenv(DB_ENVIRONMENT) || !access(".git/objects/", X_OK)) + break; + } + chdir(".."); + do { + if (!offset) + die("Not a git repository"); + } while (cwd[--offset] != '/'); + } + + if (offset == len) + return NULL; + + /* Make "offset" point to past the '/', and add a '/' at the end */ + offset++; + cwd[len++] = '/'; + cwd[len] = 0; + return cwd + offset; +} ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-17 1:06 ` Linus Torvalds @ 2005-08-17 2:00 ` Junio C Hamano 2005-08-17 2:50 ` Linus Torvalds 0 siblings, 1 reply; 10+ messages in thread From: Junio C Hamano @ 2005-08-17 2:00 UTC (permalink / raw) To: Linus Torvalds; +Cc: Git Mailing List Linus Torvalds <torvalds@osdl.org> writes: > Mostly done. It actually works from inside subdirectories, but "." at the > top-level is still not done. Small detail. Will fix later. But it would > help if you would apply this, since I'm going to be off for dinner.. Merged, pushed out, and tested. Ouch. Fails on t0000 test. Next time I'll do merge, test, reject and push out, in that order. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-17 2:00 ` Junio C Hamano @ 2005-08-17 2:50 ` Linus Torvalds 2005-08-17 4:30 ` Junio C Hamano 0 siblings, 1 reply; 10+ messages in thread From: Linus Torvalds @ 2005-08-17 2:50 UTC (permalink / raw) To: Junio C Hamano; +Cc: Git Mailing List On Tue, 16 Aug 2005, Junio C Hamano wrote: > > Merged, pushed out, and tested. Ouch. Fails on t0000 test. It's because the new git-diff-files expects there to be a valid readable .git/HEAD, and is unhappy since the test hasn't updated HEAD. This trivial patch fixes it. Linus ---- Fix test failure due to overly strict .git directory tests We may not actually have a valid HEAD at all times, so relax the validity tests for a .git subdirectory accordingly. Signed-off-by: Linus Torvalds <torvalds@osdl.org> ----- diff --git a/setup.c b/setup.c --- a/setup.c +++ b/setup.c @@ -81,10 +81,9 @@ const char *setup_git_directory(void) offset = len = strlen(cwd); for (;;) { /* - * We always want to see a .git/HEAD and a .git/refs/ - * subdirectory + * We always want to see a .git/refs/ subdirectory */ - if (!access(".git/HEAD", R_OK) && !access(".git/refs/", X_OK)) { + if (!access(".git/refs/", X_OK)) { /* * Then we need either a GIT_OBJECT_DIRECTORY define * or a .git/objects/ directory ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-17 2:50 ` Linus Torvalds @ 2005-08-17 4:30 ` Junio C Hamano 0 siblings, 0 replies; 10+ messages in thread From: Junio C Hamano @ 2005-08-17 4:30 UTC (permalink / raw) To: Linus Torvalds; +Cc: Git Mailing List Linus Torvalds <torvalds@osdl.org> writes: > On Tue, 16 Aug 2005, Junio C Hamano wrote: >> >> Merged, pushed out, and tested. Ouch. Fails on t0000 test. > > It's because the new git-diff-files expects there to be a valid readable > .git/HEAD, and is unhappy since the test hasn't updated HEAD. Ah, good catch. So with this the beginning of the tutorial should work; I think we introduce diff-files before making a commit. Thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC PATCH] Add support for figuring out where in the git archive we are 2005-08-16 22:45 [RFC PATCH] Add support for figuring out where in the git archive we are Linus Torvalds 2005-08-16 23:10 ` Yasushi SHOJI 2005-08-16 23:40 ` Junio C Hamano @ 2005-08-17 0:25 ` Daniel Barkalow 2 siblings, 0 replies; 10+ messages in thread From: Daniel Barkalow @ 2005-08-17 0:25 UTC (permalink / raw) To: Linus Torvalds; +Cc: Junio C Hamano, Git Mailing List On Tue, 16 Aug 2005, Linus Torvalds wrote: > If you use the GIT_DIR environment variable approach, it assumes that all > filenames you give it are absolute and acts the way it always did before. > > Comments? Like? Dislike? I'm all in favor, at least in the general case. I suspect there'll be some things where we have to discuss the behavior, but we can argue that when it comes up. I think, slightly before 1.0, we should sort the library functions into a new set of object files with matching header files, because "setup" is not really distinctive, and there's at least one duplicate implementation (the ssh subprocess code in your connect.c is the same as my rsh.c in what it does, although yours uses two pipes and mine uses a socket). -Daniel *This .sig left intentionally blank* ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-08-17 4:30 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-08-16 22:45 [RFC PATCH] Add support for figuring out where in the git archive we are Linus Torvalds 2005-08-16 23:10 ` Yasushi SHOJI 2005-08-16 23:40 ` Junio C Hamano 2005-08-17 0:01 ` Linus Torvalds 2005-08-17 0:16 ` Junio C Hamano 2005-08-17 1:06 ` Linus Torvalds 2005-08-17 2:00 ` Junio C Hamano 2005-08-17 2:50 ` Linus Torvalds 2005-08-17 4:30 ` Junio C Hamano 2005-08-17 0:25 ` Daniel Barkalow
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).