1. 25 6月, 2006 1 次提交
  2. 20 6月, 2006 3 次提交
  3. 19 6月, 2006 1 次提交
  4. 17 6月, 2006 1 次提交
  5. 10 6月, 2006 1 次提交
    • J
      shared repository - add a few missing calls to adjust_shared_perm(). · 138086a7
      Junio C Hamano 提交于
      There were a few calls to adjust_shared_perm() that were
      missing:
      
       - init-db creates refs, refs/heads, and refs/tags before
         reading from templates that could specify sharedrepository in
         the config file;
      
       - updating config file created it under user's umask without
         adjusting;
      
       - updating refs created it under user's umask without
         adjusting;
      
       - switching branches created .git/HEAD under user's umask
         without adjusting.
      
      This moves adjust_shared_perm() from sha1_file.c to path.c,
      since a few SIMPLE_PROGRAM need to call repository configuration
      functions which in turn need to call adjust_shared_perm().
      sha1_file.c needs to link with SHA1 computation library which
      is usually not linked to SIMPLE_PROGRAM.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      138086a7
  6. 18 5月, 2006 1 次提交
    • S
      Log ref updates to logs/refs/<ref> · 6de08ae6
      Shawn Pearce 提交于
      If config parameter core.logAllRefUpdates is true or the log
      file already exists then append a line to ".git/logs/refs/<ref>"
      whenever git-update-ref <ref> is executed.  Each log line contains
      the following information:
      
        oldsha1 <SP> newsha1 <SP> committer <LF>
      
      where committer is the current user, date, time and timezone in
      the standard GIT ident format.  If the caller is unable to append
      to the log file then git-update-ref will fail without updating <ref>.
      
      An optional message may be included in the log line with the -m flag.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6de08ae6
  7. 14 5月, 2006 2 次提交
    • L
      git config syntax updates · d14f7764
      Linus Torvalds 提交于
      This updates the hierarchical section name syntax to
      
      	[section<space>+"<randomstring>"]
      
      where the only rule for "randomstring" is that it can't contain a newline,
      and if you really want to insert a double-quote, you do it with \".
      
      It turns that into the section name "secion.randomstring".  The
      "section" part is still case insensitive, but the "randomstring"
      part is case sensitive.
      
      So you could use this for things like
      
      	[email "torvalds@osdl.org"]
      		name = Linus Torvalds
      
      if you wanted to do the "email->name" conversion as part of the config
      file format (I'm not claiming that is sensible, I'm just giving it as an
      insane example). That would show up as the association
      
      	email.torvalds@osdl.org.name -> Linus Torvalds
      
      which is easy to parse (the "." in the email _looks_ ambiguous, but it
      isn't: you know that there will always be a single key-name, so you find
      the key name with "strrchr(name, '.')" and things are entirely
      unambiguous).
      
      Repo-config is updated to be able to parse the new format, and also
      write things out in the new format.
      
      [jc: rolled two patches from Linus and one fix-up from Sean into one,
       with additional adjustments for t/t1300 test to check the case
       insensitiveness of section base and variable and case sensitiveness
       of the extended section part.  Then stripped some part off to make
       the result applicable to the stale 1.3.X series that does not have
       recent enhancements. ]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NSean Estabrooks <seanlkml@sympatico.ca>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d14f7764
    • S
      Another config file parsing fix. · bdf0ef08
      sean 提交于
      If the variable we need to store should go into a section
      that currently only has a single variable (not matching
      the one we're trying to insert), we will already be into
      the next section before we notice we've bypassed the correct
      location to insert the variable.
      
      To handle this case we store the current location as soon
      as we find a variable matching the section of our new
      variable.
      
      This breakage was brought up by Linus.
      Signed-off-by: NSean Estabrooks <seanlkml@sympatico.ca>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      bdf0ef08
  8. 08 5月, 2006 2 次提交
  9. 07 5月, 2006 1 次提交
    • S
      Another config file parsing fix. · 6f81bf16
      sean 提交于
      If the variable we need to store should go into a section
      that currently only has a single variable (not matching
      the one we're trying to insert), we will already be into
      the next section before we notice we've bypassed the correct
      location to insert the variable.
      
      To handle this case we store the current location as soon
      as we find a variable matching the section of our new
      variable.
      
      This breakage was brought up by Linus.
      Signed-off-by: NSean Estabrooks <seanlkml@sympatico.ca>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6f81bf16
  10. 06 5月, 2006 3 次提交
  11. 03 5月, 2006 2 次提交
  12. 25 4月, 2006 1 次提交
    • P
      Document the configuration file · 1ab661dd
      Petr Baudis 提交于
      This patch adds a Documentation/config.txt file included by git-repo-config
      and currently aggregating hopefully all the available git plumbing / core
      porcelain configuration variables, as well as briefly describing the format.
      
      It also updates an outdated bit of the example in git-repo-config(1).
      Signed-off-by: NPetr Baudis <pasky@suse.cz>
      1ab661dd
  13. 18 4月, 2006 1 次提交
  14. 21 3月, 2006 1 次提交
  15. 09 2月, 2006 1 次提交
    • J
      "Assume unchanged" git · 5f73076c
      Junio C Hamano 提交于
      This adds "assume unchanged" logic, started by this message in the list
      discussion recently:
      
      	<Pine.LNX.4.64.0601311807470.7301@g5.osdl.org>
      
      This is a workaround for filesystems that do not have lstat()
      that is quick enough for the index mechanism to take advantage
      of.  On the paths marked as "assumed to be unchanged", the user
      needs to explicitly use update-index to register the object name
      to be in the next commit.
      
      You can use two new options to update-index to set and reset the
      CE_VALID bit:
      
      	git-update-index --assume-unchanged path...
      	git-update-index --no-assume-unchanged path...
      
      These forms manipulate only the CE_VALID bit; it does not change
      the object name recorded in the index file.  Nor they add a new
      entry to the index.
      
      When the configuration variable "core.ignorestat = true" is set,
      the index entries are marked with CE_VALID bit automatically
      after:
      
       - update-index to explicitly register the current object name to the
         index file.
      
       - when update-index --refresh finds the path to be up-to-date.
      
       - when tools like read-tree -u and apply --index update the working
         tree file and register the current object name to the index file.
      
      The flag is dropped upon read-tree that does not check out the index
      entry.  This happens regardless of the core.ignorestat settings.
      
      Index entries marked with CE_VALID bit are assumed to be
      unchanged most of the time.  However, there are cases that
      CE_VALID bit is ignored for the sake of safety and usability:
      
       - while "git-read-tree -m" or git-apply need to make sure
         that the paths involved in the merge do not have local
         modifications.  This sacrifices performance for safety.
      
       - when git-checkout-index -f -q -u -a tries to see if it needs
         to checkout the paths.  Otherwise you can never check
         anything out ;-).
      
       - when git-update-index --really-refresh (a new flag) tries to
         see if the index entry is up to date.  You can start with
         everything marked as CE_VALID and run this once to drop
         CE_VALID bit for paths that are modified.
      
      Most notably, "update-index --refresh" honours CE_VALID and does
      not actively stat, so after you modified a file in the working
      tree, update-index --refresh would not notice until you tell the
      index about it with "git-update-index path" or "git-update-index
      --no-assume-unchanged path".
      
      This version is not expected to be perfect.  I think diff
      between index and/or tree and working files may need some
      adjustment, and there probably needs other cases we should
      automatically unmark paths that are marked to be CE_VALID.
      
      But the basics seem to work, and ready to be tested by people
      who asked for this feature.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5f73076c
  16. 06 1月, 2006 1 次提交
  17. 22 12月, 2005 1 次提交
  18. 06 12月, 2005 1 次提交
  19. 28 11月, 2005 2 次提交
  20. 27 11月, 2005 1 次提交
    • J
      init-db: check template and repository format. · 4f629539
      Junio C Hamano 提交于
      This makes init-db repository version aware.
      
      It checks if an existing config file says the repository being
      reinitialized is of a wrong version and aborts before doing
      further harm.
      
      When copying the templates, it makes sure the they are of the
      right repository format version.  Otherwise the templates are
      ignored with an warning message.
      
      It copies the templates before creating the HEAD, and if the
      config file is copied from the template directory, reads it,
      primarily to pick up the value of core.symrefsonly.
      
      It changes the way the result of the filemode reliability test
      is written to the configuration file using git_config_set().
      The test is done even if the config file was copied from the
      templates.
      
      And finally, our own repository format version is written to the
      config file.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4f629539
  21. 26 11月, 2005 1 次提交
  22. 22 11月, 2005 3 次提交
  23. 21 11月, 2005 1 次提交
  24. 20 11月, 2005 2 次提交
    • J
      git-config-set: add more options · 4ddba79d
      Johannes Schindelin 提交于
      ... namely
      
      --replace-all, to replace any amount of matching lines, not just 0 or 1,
      --get, to get the value of one key,
      --get-all, the multivar version of --get, and
      --unset-all, which deletes all matching lines from .git/config
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4ddba79d
    • J
      Add functions git_config_set() and git_config_set_multivar() · 10bea152
      Johannes Schindelin 提交于
      The function git_config_set() does exactly what you think it does.
      Given a key (in the form "core.filemode") and a value, it sets the
      key to the value. Example:
      
      	git_config_set("core.filemode", "true");
      
      The function git_config_set_multivar() is meant for setting variables which
      can have several values for the same key. Example:
      
      	[diff]
      		twohead = resolve
      		twohead = recarsive
      
      the typo in the second line can be replaced by
      
      	git_config_set_multivar("diff.twohead", "recursive", "^recar");
      
      The third argument of the function is a POSIX extended regex which has to
      match the value. If there is no key/value pair with a matching value, a new
      key/value pair is added.
      
      These commands are also capable of unsetting (deleting) entries:
      
      	git_config_set_multivar("diff.twohead", NULL, "sol");
      
      will delete the entry
      
      		twohead = resolve
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      10bea152
  25. 17 11月, 2005 1 次提交
  26. 16 11月, 2005 2 次提交
    • J
      diff: make default rename detection limit configurable. · 3299c6f6
      Junio C Hamano 提交于
      A while ago, a rename-detection limit logic was implemented as a
      response to this thread:
      
      	http://marc.theaimsgroup.com/?l=git&m=112413080630175
      
      where gitweb was found to be using a lot of time and memory to
      detect renames on huge commits.  git-diff family takes -l<num>
      flag, and if the number of paths that are rename destination
      candidates (i.e. new paths with -M, or modified paths with -C)
      are larger than that number, skips rename/copy detection even
      when -M or -C is specified on the command line.
      
      This commit makes the rename detection limit easier to use.  You
      can have:
      
      	[diff]
      		renamelimit = 30
      
      in your .git/config file to specify the default rename detection
      limit.  You can override this from the command line; giving 0
      means 'unlimited':
      
      	git diff -M -l0
      
      We might want to change the default behaviour, when you do not
      have the configuration, to limit it to say 20 paths or so.  This
      would also help the diffstat generation after a big 'git pull'.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      3299c6f6
    • J
      Add config variable core.symrefsonly · f8348be3
      Johannes Schindelin 提交于
      This allows you to force git to avoid symlinks for refs. Just add
      something like
      
      	[core]
      		symrefsonly = true
      
      to .git/config.
      
      Don´t forget to "git checkout your_branch", or it does not do anything...
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f8348be3
  27. 03 11月, 2005 1 次提交
  28. 15 10月, 2005 1 次提交