author | Junio C Hamano <junkio@cox.net> | |
Wed, 24 May 2006 23:49:24 +0000 (16:49 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 24 May 2006 23:49:24 +0000 (16:49 -0700) |
* master: (90 commits)
fetch.c: remove an unused variable and dead code.
Clean up sha1 file writing
Builtin git-cat-file
builtin format-patch: squelch content-type for 7-bit ASCII
CMIT_FMT_EMAIL: Q-encode Subject: and display-name part of From: fields.
add more informative error messages to git-mktag
remove the artificial restriction tagsize < 8kb
git-rebase: use canonical A..B syntax to format-patch
git-format-patch: now built-in.
fmt-patch: Support --attach
fmt-patch: understand old <his> notation
Teach fmt-patch about --keep-subject
Teach fmt-patch about --numbered
fmt-patch: implement -o <dir>
fmt-patch: output file names to stdout
Teach fmt-patch to write individual files.
built-in tar-tree and remote tar-tree
Builtin git-diff-files, git-diff-index, git-diff-stages, and git-diff-tree.
Builtin git-show-branch.
Builtin git-apply.
...
fetch.c: remove an unused variable and dead code.
Clean up sha1 file writing
Builtin git-cat-file
builtin format-patch: squelch content-type for 7-bit ASCII
CMIT_FMT_EMAIL: Q-encode Subject: and display-name part of From: fields.
add more informative error messages to git-mktag
remove the artificial restriction tagsize < 8kb
git-rebase: use canonical A..B syntax to format-patch
git-format-patch: now built-in.
fmt-patch: Support --attach
fmt-patch: understand old <his> notation
Teach fmt-patch about --keep-subject
Teach fmt-patch about --numbered
fmt-patch: implement -o <dir>
fmt-patch: output file names to stdout
Teach fmt-patch to write individual files.
built-in tar-tree and remote tar-tree
Builtin git-diff-files, git-diff-index, git-diff-stages, and git-diff-tree.
Builtin git-show-branch.
Builtin git-apply.
...
1 | 2 | |||
---|---|---|---|---|
Documentation/git-branch.txt | patch | | diff1 | | diff2 | | blob | history |
Documentation/git-checkout.txt | patch | | diff1 | | diff2 | | blob | history |
cache.h | patch | | diff1 | | diff2 | | blob | history |
fetch.c | patch | | diff1 | | diff2 | | blob | history |
fetch.h | patch | | diff1 | | diff2 | | blob | history |
git-am.sh | patch | | diff1 | | diff2 | | blob | history |
git-commit.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git-branch.txt
Simple merge
diff --cc Documentation/git-checkout.txt
index 064394385486ca032c52e513c071ec08895a04c6,d82efc00d403dc13ac1e85c53083ccc52a4c79f3..fbdbadc74fbe558285323353b7aa006f3cfd559b
Force a re-read of everything.
-b::
- Create a new branch and start it at <branch>.
+ Create a new branch named <new_branch> and start it at
+ <branch>. The new branch name must pass all checks defined
+ by gitlink:git-check-ref-format[1]. Some of these checks
+ may restrict the characters allowed in a branch name.
+-l::
+ Create the new branch's ref log. This activates recording of
+ all changes to made the branch ref, enabling use of date
+ based sha1 expressions such as "<branchname>@{yesterday}".
+
-m::
If you have local modifications to one or more files that
are different between the current branch and the branch to
diff --cc cache.h
Simple merge
diff --cc fetch.c
index fd57684d8fad43c92df8005aa8fe7b2cd9263bbb,f7f8902580f0f5e4eb7a63000f9987e63715cd09..ae92d5212e9d80e8cee9a8af752d1b564dbd09db
+++ b/fetch.c
#include "refs.h"
const char *write_ref = NULL;
+const char *write_ref_log_details = NULL;
- const unsigned char *current_ref = NULL;
-
int get_tree = 0;
int get_history = 0;
int get_all = 0;
save_commit_buffer = 0;
track_object_refs = 0;
- lock = lock_ref_sha1(write_ref, current_ref, 1);
+ if (write_ref) {
++ lock = lock_ref_sha1(write_ref, NULL, 0);
+ if (!lock) {
+ error("Can't lock ref %s", write_ref);
+ return -1;
+ }
+ }
- if (!get_recover) {
+ if (!get_recover)
for_each_ref(mark_complete);
- }
- if (interpret_target(target, sha1))
- return error("Could not interpret %s as something to pull",
- target);
- if (process(lookup_unknown_object(sha1)))
+ if (interpret_target(target, sha1)) {
+ error("Could not interpret %s as something to pull", target);
+ unlock_ref(lock);
return -1;
- if (loop())
+ }
+ if (process(lookup_unknown_object(sha1))) {
+ unlock_ref(lock);
return -1;
-
- if (write_ref)
- write_ref_sha1_unlocked(write_ref, sha1);
+ }
+ if (loop()) {
+ unlock_ref(lock);
+ return -1;
+ }
+
+ if (write_ref) {
+ if (write_ref_log_details) {
+ msg = xmalloc(strlen(write_ref_log_details) + 12);
+ sprintf(msg, "fetch from %s", write_ref_log_details);
+ } else
+ msg = NULL;
+ ret = write_ref_sha1(lock, sha1, msg ? msg : "fetch (unknown)");
+ if (msg)
+ free(msg);
+ return ret;
+ }
return 0;
}
diff --cc fetch.h
index 0011548de8c3aa085944ac56a1568a433834145f,001a6b8e2dccc02a64266ae804227674ee71338c..841bb1af9cab0c19dda3f0cb5956edaec22f9d3a
+++ b/fetch.h
/* If set, the ref filename to write the target value to. */
extern const char *write_ref;
- /* If set, the hash that the current value of write_ref must be. */
- extern const unsigned char *current_ref;
-
+/* If set additional text will appear in the ref log. */
+extern const char *write_ref_log_details;
+
/* Set to fetch the target tree. */
extern int get_tree;
diff --cc git-am.sh
Simple merge
diff --cc git-commit.sh
Simple merge