author | Junio C Hamano <junkio@cox.net> | |
Thu, 28 Sep 2006 05:23:12 +0000 (22:23 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 28 Sep 2006 05:23:12 +0000 (22:23 -0700) |
* master: (72 commits)
runstatus: do not recurse into subdirectories if not needed
grep: fix --fixed-strings combined with expression.
grep: free expressions and patterns when done.
Corrected copy-and-paste thinko in ignore executable bit test case.
An illustration of rev-list --parents --pretty=raw
Allow git-checkout when on a non-existant branch.
gitweb: Decode long title for link tooltips
git-svn: Fix fetch --no-ignore-externals with GIT_SVN_NO_LIB=1
Ignore executable bit when adding files if filemode=0.
Remove empty ref directories that prevent creating a ref.
Use const for interpolate arguments
git-archive: update documentation
Deprecate merge-recursive.py
gitweb: fix over-eager application of esc_html().
Allow '(no author)' in git-svn's authors file.
Allow 'svn fetch' on '(no date)' revisions in Subversion.
git-repack: allow git-repack to run in subdirectory
Remove upload-tar and make git-tar-tree a thin wrapper to git-archive
git-tar-tree: Move code for git-archive --format=tar to archive-tar.c
git-tar-tree: Remove duplicate git_config() call
...
runstatus: do not recurse into subdirectories if not needed
grep: fix --fixed-strings combined with expression.
grep: free expressions and patterns when done.
Corrected copy-and-paste thinko in ignore executable bit test case.
An illustration of rev-list --parents --pretty=raw
Allow git-checkout when on a non-existant branch.
gitweb: Decode long title for link tooltips
git-svn: Fix fetch --no-ignore-externals with GIT_SVN_NO_LIB=1
Ignore executable bit when adding files if filemode=0.
Remove empty ref directories that prevent creating a ref.
Use const for interpolate arguments
git-archive: update documentation
Deprecate merge-recursive.py
gitweb: fix over-eager application of esc_html().
Allow '(no author)' in git-svn's authors file.
Allow 'svn fetch' on '(no date)' revisions in Subversion.
git-repack: allow git-repack to run in subdirectory
Remove upload-tar and make git-tar-tree a thin wrapper to git-archive
git-tar-tree: Move code for git-archive --format=tar to archive-tar.c
git-tar-tree: Remove duplicate git_config() call
...
12 files changed:
1 | 2 | |||
---|---|---|---|---|
.gitignore | patch | | diff1 | | diff2 | | blob | history |
Makefile | patch | | diff1 | | diff2 | | blob | history |
builtin-init-db.c | patch | | diff1 | | diff2 | | blob | history |
builtin-update-index.c | patch | | diff1 | | diff2 | | blob | history |
builtin.h | patch | | diff1 | | diff2 | | blob | history |
cache.h | patch | | diff1 | | diff2 | | blob | history |
git-branch.sh | patch | | diff1 | | diff2 | | blob | history |
git-checkout.sh | patch | | diff1 | | diff2 | | blob | history |
git.c | patch | | diff1 | | diff2 | | blob | history |
receive-pack.c | patch | | diff1 | | diff2 | | blob | history |
revision.c | patch | | diff1 | | diff2 | | blob | history |
sha1_name.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc .gitignore
Simple merge
diff --cc Makefile
index af4d68fd7e7faa1d590cf0eef3f2d1a8e435a136,c888c810bf8220c25b9949f47730742347738c32..65fb8284f3c9ef210c08711b5ce4796593e72e75
+++ b/Makefile
builtin-update-index.o \
builtin-update-ref.o \
builtin-upload-archive.o \
- builtin-upload-tar.o \
builtin-verify-pack.o \
- builtin-write-tree.o
+ builtin-write-tree.o \
- builtin-zip-tree.o \
+ builtin-show-ref.o \
+ builtin-pack-refs.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
diff --cc builtin-init-db.c
Simple merge
diff --cc builtin-update-index.c
Simple merge
diff --cc builtin.h
Simple merge
diff --cc cache.h
Simple merge
diff --cc git-branch.sh
index 4379a07210cf30c5d6e5abdb36722985983edb46,4f31903d63662db7d49d3d257e328004ca2958f7..bf84b30695fdeda5d5e18456813e0b3cc3d11275
--- 1/git-branch.sh
--- 2/git-branch.sh
+++ b/git-branch.sh
git-check-ref-format "heads/$branchname" ||
die "we do not like '$branchname' as a branch name."
-if [ -e "$GIT_DIR/refs/heads/$branchname" ]
+ if [ -d "$GIT_DIR/refs/heads/$branchname" ]
+ then
+ for refdir in `cd "$GIT_DIR" && \
+ find "refs/heads/$branchname" -type d | sort -r`
+ do
+ rmdir "$GIT_DIR/$refdir" || \
+ die "Could not delete '$refdir', there may still be a ref there."
+ done
+ fi
+
+prev=''
+if git-show-ref --verify --quiet -- "refs/heads/$branchname"
then
if test '' = "$force"
then
diff --cc git-checkout.sh
Simple merge
diff --cc git.c
Simple merge
diff --cc receive-pack.c
index c8aacbbdd3089fdc412da368ca7609da590e0ca3,ea2dbd4e3398ca90823dcd453cbb52c5dcea135c..1fcf3a91127250448a659fe0d48393c34ecd7c47
--- 1/receive-pack.c
--- 2/receive-pack.c
+++ b/receive-pack.c
return error("unpack should have generated %s, "
"but I can't find it!", new_hex);
}
- safe_create_leading_directories(lock_name);
-
- newfd = open(lock_name, O_CREAT | O_EXCL | O_WRONLY, 0666);
- if (newfd < 0) {
- cmd->error_string = "can't lock";
- return error("unable to create %s (%s)",
- lock_name, strerror(errno));
- }
-
- /* Write the ref with an ending '\n' */
- new_hex[40] = '\n';
- new_hex[41] = 0;
- written = write(newfd, new_hex, 41);
- /* Remove the '\n' again */
- new_hex[40] = 0;
-
- close(newfd);
- if (written != 41) {
- unlink(lock_name);
- cmd->error_string = "can't write";
- return error("unable to write %s", lock_name);
- }
- if (verify_old_ref(name, old_hex) < 0) {
- unlink(lock_name);
- cmd->error_string = "raced";
- return error("%s changed during push", name);
- }
+ if (deny_non_fast_forwards && !is_null_sha1(old_sha1)) {
+ struct commit *old_commit, *new_commit;
+ struct commit_list *bases, *ent;
+
+ old_commit = (struct commit *)parse_object(old_sha1);
+ new_commit = (struct commit *)parse_object(new_sha1);
+ bases = get_merge_bases(old_commit, new_commit, 1);
+ for (ent = bases; ent; ent = ent->next)
+ if (!hashcmp(old_sha1, ent->item->object.sha1))
+ break;
+ free_commit_list(bases);
+ if (!ent)
+ return error("denying non-fast forward;"
+ " you should pull first");
+ }
if (run_update_hook(name, old_hex, new_hex)) {
- unlink(lock_name);
cmd->error_string = "hook declined";
return error("hook declined to update %s", name);
}
diff --cc revision.c
Simple merge
diff --cc sha1_name.c
Simple merge