* [PATCH v2 00/10] More on worktree fixes
@ 2008-03-02 10:33 Nguyễn Thái Ngọc Duy
2008-03-03 0:28 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2008-03-02 10:33 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano
This series cleans up setup.c and makes git handle worktree better.
The series deprecates my patch "Move worktree setup out of..."
Changes from the last version: Junio's concerns are addressed, tests
are also added.
Main points:
- get_git_dir() is now always absolute path.
- setup_git_directory_gently() will no longer do
any worktree setup. If you want worktree with
setup_git_directory_gently(), call setup_work_tree().
- setup_git_directory() will still setup worktree if found. The
behavior is a bit more consistent as it will setup worktree no
matter where it comes from. GIT_WORK_TREE, core.worktree or
autodetection are treated the same.
- Document setup api along the way.
"make test" was run on each patch. Hopefully the series won't break
anything. Tests will come later, my brain has been overheated.
Remaining problems I'm aware of:
- prefix when running a command from outside worktree (currently NULL)
- cmd_update_index() needs setup_work_tree()
Nguyễn Thái Ngọc Duy (10):
"git read-tree -m" and the like require worktree
Make sure setup_git_directory is called before accessing repository
Make get_git_dir() and 'git rev-parse --git-dir' absolute path
Make setup_work_tree() return new prefix
http-push: Avoid calling setup_git_directory() twice
Completely move out worktree setup from setup_git_directory_gently()
builtin-archive: mark unused prefix "unused_prefix"
Make setup_git_directory() auto-setup worktree if found
Documentation: update api-builtin and api-setup
Additional tests to capture worktree special cases
Documentation/technical/api-builtin.txt | 10 +++
Documentation/technical/api-setup.txt | 91 ++++++++++++++++++++++--
builtin-apply.c | 7 ++-
builtin-archive.c | 6 +-
builtin-blame.c | 4 +-
builtin-bundle.c | 9 +--
builtin-config.c | 15 ++---
builtin-diff-files.c | 13 ++--
builtin-diff.c | 13 ++--
builtin-ls-files.c | 10 ++--
builtin-read-tree.c | 3 +
builtin-rev-parse.c | 23 ++----
builtin-rm.c | 5 +-
builtin-upload-archive.c | 4 +-
cache.h | 4 +-
environment.c | 1 +
fast-import.c | 1 +
git.c | 8 +--
hash-object.c | 14 +---
http-push.c | 4 +-
index-pack.c | 2 +
setup.c | 114 +++++++++++-------------------
t/t1300-repo-config.sh | 2 +-
t/t1400-update-ref.sh | 4 +-
t/t1501-worktree.sh | 57 +++++++++++++++-
t/t9300-fast-import.sh | 2 +-
26 files changed, 261 insertions(+), 165 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 00/10] More on worktree fixes
2008-03-02 10:33 [PATCH v2 00/10] More on worktree fixes Nguyễn Thái Ngọc Duy
@ 2008-03-03 0:28 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2008-03-03 0:28 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
Will replace what has been queued in 'pu', but I had to apply the same
fix-up as I did to the previous round when I queued the previous round.
Interdiff below...
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 2a7687e..eebbd6b 100644
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
@@ -17,7 +17,6 @@ int cmd_bundle(int argc, const char **argv, const char *unused_prefix)
int nongit = 0;
const char *cmd, *bundle_file;
int bundle_fd = -1;
- char buffer[PATH_MAX];
if (argc < 3)
usage(bundle_usage);
diff --git a/setup.c b/setup.c
index f0de42f..e225597 100644
--- a/setup.c
+++ b/setup.c
@@ -318,9 +318,6 @@ void setup_git_directory_gently(int *nongit_ok)
if (PATH_MAX - 40 < strlen(gitdirenv))
die("'$%s' too big", GIT_DIR_ENVIRONMENT);
if (is_git_directory(gitdirenv)) {
- static char buffer[1024 + 1];
- const char *retval;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-03 0:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-02 10:33 [PATCH v2 00/10] More on worktree fixes Nguyễn Thái Ngọc Duy
2008-03-03 0:28 ` Junio C Hamano
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).