From a7e66ae3f70e6e1ae08250d61ff8a968b714754d Mon Sep 17 00:00:00 2001 From: Matt Draisey Date: Tue, 16 Aug 2005 01:46:34 -0400 Subject: [PATCH 1/3] [PATCH] Make do_each_ref() follow symlinks. Because there is no reason not to, and this makes things a bit safer when running "git prune". [jc: I do not necessarily agree with the reasoning of the original author that it is a good way to keep "git prune" from stomping on objects to have a symlink that points at .git/refs of the repository A in the .git/refs of the repository B when repository A borrows object database from repository B. For one thing, the object database that everybody borrows objects from may not even have its own .git/refs hierarchy. Come to think of it, maybe we should disallow symlink inside .git/refs hierarchy; we update the files there by creat/rename pair, so having symlinks would not work anyway when you do anything that would update them.] Signed-off-by: Junio C Hamano --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.c b/refs.c index a5c8946610..161018097d 100644 --- a/refs.c +++ b/refs.c @@ -46,7 +46,7 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u if (namelen > 255) continue; memcpy(path + baselen, de->d_name, namelen+1); - if (lstat(git_path("%s", path), &st) < 0) + if (stat(git_path("%s", path), &st) < 0) continue; if (S_ISDIR(st.st_mode)) { retval = do_for_each_ref(path, fn); From e3fdb7f202c910652f2f19bab55af47b269023d3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 16 Aug 2005 17:24:34 -0700 Subject: [PATCH 2/3] [PATCH] Reformat git-show-branches-script documentation. ... using ListingBlock of asciidoc. Signed-off-by: Junio C Hamano --- Documentation/git-show-branches-script.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/git-show-branches-script.txt b/Documentation/git-show-branches-script.txt index 95c7013445..c7fb02cf7b 100644 --- a/Documentation/git-show-branches-script.txt +++ b/Documentation/git-show-branches-script.txt @@ -37,15 +37,17 @@ otherwise it shows a space. The following example shows three branches, "pu", "master" and "rc": - * [pu] Add cheap local clone '-s' flag to git-clone-script - ! [master] Documentation updates. - ! [rc] Merge master into rc - + Add cheap local clone '-s' flag to git-clone-script - + Alternate object pool mechanism updates. - + Audit rev-parse users. - ++ Documentation updates. - + Merge master into rc - +++ [PATCH] plug memory leak in diff.c::diff_free_filepair() +------------------------------------------------ +* [pu] Add cheap local clone '-s' flag to git-clone-script + ! [master] Documentation updates. + ! [rc] Merge master into rc ++ Add cheap local clone '-s' flag to git-clone-script ++ Alternate object pool mechanism updates. ++ Audit rev-parse users. +++ Documentation updates. + + Merge master into rc ++++ [PATCH] plug memory leak in diff.c::diff_free_filepair() +------------------------------------------------ These three branches all forked from a common commit, "[PATCH] plug memory leak...", and "rc" has one commit ahead of it. The From 83db04ff878f40146952ee5d3d2d113568455f5b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 16 Aug 2005 17:41:32 -0700 Subject: [PATCH 3/3] [PATCH] Add a bit more links to the commands to the main git(7) page. There are many programs like git-add not described at all, and the organization of the list of commands may be suboptimal, but we have to start somewhere. Signed-off-by: Junio C Hamano --- Documentation/git.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/git.txt b/Documentation/git.txt index 27f362626f..be26614ffb 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -74,9 +74,16 @@ link:git-write-tree.html[git-write-tree]:: link:git-pack-objects.html[git-pack-objects]:: Creates a packed archive of objects. +link:git-unpack-objects.html[git-unpack-objects]:: + Unpacks objects out of a packed archive. + link:git-prune-packed.html[git-prune-packed]:: Remove extra objects that are already in pack files. +link:git-apply.html[git-apply]:: + Reads a "diff -up1" or git generated patch file and + applies it to the working tree. + Interrogation commands ~~~~~~~~~~~~~~~~~~~~~~ @@ -92,6 +99,9 @@ link:git-diff-files.html[git-diff-files]:: link:git-diff-tree.html[git-diff-tree]:: Compares the content and mode of blobs found via two tree objects +link:git-diff-stages.html[git-diff-stages]:: + Compares two "merge stages" in the index file. + link:git-export.html[git-export]:: Exports each commit and a diff against each of its parents @@ -122,6 +132,9 @@ link:git-unpack-file.html[git-unpack-file]:: link:git-var.html[git-var]:: Displays a git logical variable +link:git-show-index.html[git-show-index]:: + Displays contents of a pack idx file. + link:git-verify-pack.html[git-verify-pack]:: Validates packed GIT archive files @@ -201,6 +214,12 @@ link:git-show-branches-script.html[git-show-branches-script]:: link:git-repack-script.html[git-repack-script]:: Pack unpacked objects in a repository. +link:git-rename-script.html[git-rename]:: + Rename files and directories. + +link:git-ls-remote-script.html[git-ls-remote-script]:: + Shows references in a remote or local repository. + Ancillary Commands ------------------ @@ -224,6 +243,9 @@ link:git-resolve-script.html[git-resolve-script]:: link:git-tag-script.html[git-tag-script]:: An example script to create a tag object signed with GPG +link:git-cvsimport-script.html[git-cvsimport-script]:: + Salvage your data out of another SCM people love to hate. + Interrogators: @@ -233,6 +255,8 @@ link:git-diff-helper.html[git-diff-helper]:: link:git-ssh-push.html[git-ssh-push]:: Helper "server-side" program used by git-ssh-pull +link:git-send-email-script.html[git-send-email]:: + Send patch e-mails out of "format-patch --mbox" output. Identifier Terminology