Merge branch 'lj/refs'
authorJunio C Hamano <junkio@cox.net>
Wed, 1 Nov 2006 16:48:50 +0000 (08:48 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 1 Nov 2006 16:48:50 +0000 (08:48 -0800)
* lj/refs: (63 commits)
  Fix show-ref usagestring
  t3200: git-branch testsuite update
  sha1_name.c: avoid compilation warnings.
  Make git-branch a builtin
  ref-log: fix D/F conflict coming from deleted refs.
  git-revert with conflicts to behave as git-merge with conflicts
  core.logallrefupdates thinko-fix
  git-pack-refs --all
  core.logallrefupdates create new log file only for branch heads.
  Remove bashism from t3210-pack-refs.sh
  ref-log: allow ref@{count} syntax.
  pack-refs: call fflush before fsync.
  pack-refs: use lockfile as everybody else does.
  git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.
  lock_ref_sha1_basic does not remove empty directories on BSD
  Do not create tag leading directories since git update-ref does it.
  Check that a tag exists using show-ref instead of looking for the ref file.
  Use git-update-ref to delete a tag instead of rm()ing the ref file.
  Fix refs.c;:repack_without_ref() clean-up path
  Clean up "git-branch.sh" and add remove recursive dir test cases.
  ...

15 files changed:
1  2 
Documentation/config.txt
Makefile
builtin-prune.c
builtin.h
cache.h
fetch-pack.c
git-commit.sh
git-fetch.sh
git-revert.sh
git.c
receive-pack.c
revision.c
sha1_name.c
upload-pack.c
wt-status.c

Simple merge
diff --cc Makefile
index 2d62efb5c4eb0a84c440e2e75b521b536b790bf9,be8bf392a2f57b03882f3550da8ddb9b88af9353..40e2a680f050f6f7623f2e49066a8897f4b64cbd
+++ b/Makefile
@@@ -267,9 -265,9 +267,10 @@@ LIB_OBJS = 
  
  BUILTIN_OBJS = \
        builtin-add.o \
 +      builtin-annotate.o \
        builtin-apply.o \
        builtin-archive.o \
+       builtin-branch.o \
        builtin-cat-file.o \
        builtin-checkout-index.o \
        builtin-check-ref-format.o \
diff --cc builtin-prune.c
Simple merge
diff --cc builtin.h
index 708a2f22e8b14f337a0829c53c47e57393c4ee75,db9b369e27206fb56e86cddffea5f1ab2c92e5be..f7150aa6b8c715c05ca1a6c0ec2718ba1d48b7fb
+++ b/builtin.h
@@@ -11,12 -11,11 +11,13 @@@ extern int mailinfo(FILE *in, FILE *out
  extern int split_mbox(const char **mbox, const char *dir, int allow_bare, int nr_prec, int skip);
  extern void stripspace(FILE *in, FILE *out);
  extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
 +extern void prune_packed_objects(int);
  
  extern int cmd_add(int argc, const char **argv, const char *prefix);
 +extern int cmd_annotate(int argc, const char **argv, const char *prefix);
  extern int cmd_apply(int argc, const char **argv, const char *prefix);
  extern int cmd_archive(int argc, const char **argv, const char *prefix);
+ extern int cmd_branch(int argc, const char **argv, const char *prefix);
  extern int cmd_cat_file(int argc, const char **argv, const char *prefix);
  extern int cmd_checkout_index(int argc, const char **argv, const char *prefix);
  extern int cmd_check_ref_format(int argc, const char **argv, const char *prefix);
diff --cc cache.h
Simple merge
diff --cc fetch-pack.c
Simple merge
diff --cc git-commit.sh
Simple merge
diff --cc git-fetch.sh
Simple merge
diff --cc git-revert.sh
Simple merge
diff --cc git.c
index 6475847b7a06750f8095c363dbc7414213042cca,f197169df278ccf5560b9aa61f81ac35526a34e4..af181d93b1ca5908ea58acea73394b1f36554b39
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -219,9 -219,9 +219,10 @@@ static void handle_internal_command(in
                int option;
        } commands[] = {
                { "add", cmd_add, RUN_SETUP },
 +              { "annotate", cmd_annotate, },
                { "apply", cmd_apply },
                { "archive", cmd_archive },
+               { "branch", cmd_branch },
                { "cat-file", cmd_cat_file, RUN_SETUP },
                { "checkout-index", cmd_checkout_index, RUN_SETUP },
                { "check-ref-format", cmd_check_ref_format },
diff --cc receive-pack.c
index f2b1c29bd763fcfec45be05e9f56b7c4f5503995,1fcf3a91127250448a659fe0d48393c34ecd7c47..de1d6a4b1c3f51f8763484b6efea0a8ccd289bb3
@@@ -15,20 -14,7 +15,20 @@@ static int report_status
  static char capabilities[] = "report-status";
  static int capabilities_sent;
  
- static int show_ref(const char *path, const unsigned char *sha1)
 +static int receive_pack_config(const char *var, const char *value)
 +{
 +      git_default_config(var, value);
 +
 +      if (strcmp(var, "receive.denynonfastforwards") == 0)
 +      {
 +              deny_non_fast_forwards = git_config_bool(var, value);
 +              return 0;
 +      }
 +
 +      return 0;
 +}
 +
+ static int show_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
  {
        if (capabilities_sent)
                packet_write(1, "%s %s\n", sha1_to_hex(sha1), path);
@@@ -349,10 -275,11 +289,11 @@@ int main(int argc, char **argv
        if (!dir)
                usage(receive_pack_usage);
  
-       if(!enter_repo(dir, 0))
+       if (!enter_repo(dir, 0))
                die("'%s': unable to chdir or not a git archive", dir);
  
 -      git_config(git_default_config);
+       setup_ident();
 +      git_config(receive_pack_config);
  
        write_head_info();
  
diff --cc revision.c
Simple merge
diff --cc sha1_name.c
Simple merge
diff --cc upload-pack.c
index 9ec3775049a44bf1ffdc145240e6d7cdea303b91,9412a9b2604af161bd8f88c27750e95a24a78097..ddaa72f0a98e9b7f424279b74798bc3cfaadbd48
@@@ -420,9 -416,9 +420,9 @@@ static void receive_needs(void
        }
  }
  
- static int send_ref(const char *refname, const unsigned char *sha1)
+ static int send_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
  {
 -      static const char *capabilities = "multi_ack thin-pack side-band side-band-64k";
 +      static const char *capabilities = "multi_ack thin-pack side-band side-band-64k ofs-delta";
        struct object *o = parse_object(sha1);
  
        if (!o)
diff --cc wt-status.c
Simple merge