1. 01 8月, 2007 1 次提交
  2. 05 7月, 2007 1 次提交
  3. 25 6月, 2007 1 次提交
    • J
      Add core.quotepath configuration variable. · 9378c161
      Junio C Hamano 提交于
      We always quote "unusual" byte values in a pathname using
      C-string style, to make it safer for parsing scripts that do not
      handle NUL separated records well (or just too lazy to bother).
      The absolute minimum bytes that need to be quoted for this
      purpose are TAB, LF (and other control characters), double quote
      and backslash.
      
      However, we have also always quoted the bytes in high 8-bit
      range; this was partly because we were lazy and partly because
      we were being cautious.
      
      This introduces an internal "quote_path_fully" variable, and
      core.quotepath configuration variable to control it.  When set
      to false, it does not quote bytes in high 8-bit range anymore
      but passes them intact.
      
      The variable defaults to "true" to retain the traditional
      behaviour for now.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9378c161
  4. 07 6月, 2007 1 次提交
    • J
      War on whitespace · a6080a0a
      Junio C Hamano 提交于
      This uses "git-apply --whitespace=strip" to fix whitespace errors that have
      crept in to our source files over time.  There are a few files that need
      to have trailing whitespaces (most notably, test vectors).  The results
      still passes the test, and build result in Documentation/ area is unchanged.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a6080a0a
  5. 11 5月, 2007 2 次提交
    • D
      Custom compression levels for objects and packs · 960ccca6
      Dana How 提交于
      Add config variables pack.compression and core.loosecompression ,
      and switch --compression=level to pack-objects.
      
      Loose objects will be compressed using core.loosecompression if set,
      else core.compression if set, else Z_BEST_SPEED.
      Packed objects will be compressed using --compression=level if seen,
      else pack.compression if set, else core.compression if set,
      else Z_DEFAULT_COMPRESSION.  This is the "pack compression level".
      
      Loose objects added to a pack undeltified will be recompressed
      to the pack compression level if it is unequal to the current
      loose compression level by the preceding rules,  or if the loose
      object was written while core.legacyheaders = true.  Newly
      deltified loose objects are always compressed to the current
      pack compression level.
      
      Previously packed objects added to a pack are recompressed
      to the current pack compression level exactly when their
      deltification status changes,  since the previous pack data
      cannot be reused.
      
      In either case,  the --no-reuse-object switch from the first
      patch below will always force recompression to the current pack
      compression level,  instead of assuming the pack compression level
      hasn't changed and pack data can be reused when possible.
      
      This applies on top of the following patches from Nicolas Pitre:
      [PATCH] allow for undeltified objects not to be reused
      [PATCH] make "repack -f" imply "pack-objects --no-reuse-object"
      Signed-off-by: NDana L. How <danahow@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      960ccca6
    • N
      deprecate the new loose object header format · 726f852b
      Nicolas Pitre 提交于
      Now that we encourage and actively preserve objects in a packed form
      more agressively than we did at the time the new loose object format and
      core.legacyheaders were introduced, that extra loose object format
      doesn't appear to be worth it anymore.
      
      Because the packing of loose objects has to go through the delta match
      loop anyway, and since most of them should end up being deltified in
      most cases, there is really little advantage to have this parallel loose
      object format as the CPU savings it might provide is rather lost in the
      noise in the end.
      
      This patch gets rid of core.legacyheaders, preserve the legacy format as
      the only writable loose object format and deprecate the other one to
      keep things simpler.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      726f852b
  6. 19 3月, 2007 1 次提交
    • S
      Limit the size of the new delta_base_cache · 18bdec11
      Shawn O. Pearce 提交于
      The new configuration variable core.deltaBaseCacheLimit allows the
      user to control how much memory they are willing to give to Git for
      caching base objects of deltas.  This is not normally meant to be
      a user tweakable knob; the "out of the box" settings are meant to
      be suitable for almost all workloads.
      
      We default to 16 MiB under the assumption that the cache is not
      meant to consume all of the user's available memory, and that the
      cache's main purpose was to cache trees, for faster path limiters
      during revision traversal.  Since trees tend to be relatively small
      objects, this relatively small limit should still allow a large
      number of objects.
      
      On the other hand we don't want the cache to start storing 200
      different versions of a 200 MiB blob, as this could easily blow
      the entire address space of a 32 bit process.
      
      We evict OBJ_BLOB from the cache first (credit goes to Junio) as
      we want to favor OBJ_TREE within the cache.  These are the objects
      that have the highest inflate() startup penalty, as they tend to
      be small and thus don't have that much of a chance to ammortize
      that penalty over the entire data.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      18bdec11
  7. 13 3月, 2007 1 次提交
  8. 08 3月, 2007 1 次提交
    • S
      General const correctness fixes · 3a55602e
      Shawn O. Pearce 提交于
      We shouldn't attempt to assign constant strings into char*, as the
      string is not writable at runtime.  Likewise we should always be
      treating unsigned values as unsigned values, not as signed values.
      
      Most of these are very straightforward.  The only exception is the
      (unnecessary) xstrdup/free in builtin-branch.c for the detached
      head case.  Since this is a user-level interactive type program
      and that particular code path is executed no more than once, I feel
      that the extra xstrdup call is well worth the easy elimination of
      this warning.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      3a55602e
  9. 03 3月, 2007 1 次提交
    • J
      Add core.symlinks to mark filesystems that do not support symbolic links. · 78a8d641
      Johannes Sixt 提交于
      Some file systems that can host git repositories and their working copies
      do not support symbolic links. But then if the repository contains a symbolic
      link, it is impossible to check out the working copy.
      
      This patch enables partial support of symbolic links so that it is possible
      to check out a working copy on such a file system.  A new flag
      core.symlinks (which is true by default) can be set to false to indicate
      that the filesystem does not support symbolic links. In this case, symbolic
      links that exist in the trees are checked out as small plain files, and
      checking in modifications of these files preserve the symlink property in
      the database (as long as an entry exists in the index).
      
      Of course, this does not magically make symbolic links work on such defective
      file systems; hence, this solution does not help if the working copy relies
      on that an entry is a real symbolic link.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      78a8d641
  10. 15 2月, 2007 2 次提交
    • L
      Make AutoCRLF ternary variable. · d7f46334
      Linus Torvalds 提交于
      This allows you to do:
      
      	[core]
      		AutoCRLF = input
      
      and it should do only the CRLF->LF translation (ie it simplifies CRLF only
      when reading working tree files, but when checking out files, it leaves
      the LF alone, and doesn't turn it into a CRLF).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d7f46334
    • L
      Lazy man's auto-CRLF · 6c510bee
      Linus Torvalds 提交于
      It currently does NOT know about file attributes, so it does its
      conversion purely based on content. Maybe that is more in the "git
      philosophy" anyway, since content is king, but I think we should try to do
      the file attributes to turn it off on demand.
      
      Anyway, BY DEFAULT it is off regardless, because it requires a
      
      	[core]
      		AutoCRLF = true
      
      in your config file to be enabled. We could make that the default for
      Windows, of course, the same way we do some other things (filemode etc).
      
      But you can actually enable it on UNIX, and it will cause:
      
       - "git update-index" will write blobs without CRLF
       - "git diff" will diff working tree files without CRLF
       - "git checkout" will write files to the working tree _with_ CRLF
      
      and things work fine.
      
      Funnily, it actually shows an odd file in git itself:
      
      	git clone -n git test-crlf
      	cd test-crlf
      	git config core.autocrlf true
      	git checkout
      	git diff
      
      shows a diff for "Documentation/docbook-xsl.css". Why? Because we have
      actually checked in that file *with* CRLF! So when "core.autocrlf" is
      true, we'll always generate a *different* hash for it in the index,
      because the index hash will be for the content _without_ CRLF.
      
      Is this complete? I dunno. It seems to work for me. It doesn't use the
      filename at all right now, and that's probably a deficiency (we could
      certainly make the "is_binary()" heuristics also take standard filename
      heuristics into account).
      
      I don't pass in the filename at all for the "index_fd()" case
      (git-update-index), so that would need to be passed around, but this
      actually works fine.
      
      NOTE NOTE NOTE! The "is_binary()" heuristics are totally made-up by yours
      truly. I will not guarantee that they work at all reasonable. Caveat
      emptor. But it _is_ simple, and it _is_ safe, since it's all off by
      default.
      
      The patch is pretty simple - the biggest part is the new "convert.c" file,
      but even that is really just basic stuff that anybody can write in
      "Teaching C 101" as a final project for their first class in programming.
      Not to say that it's bug-free, of course - but at least we're not talking
      about rocket surgery here.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6c510bee
  11. 08 1月, 2007 2 次提交
    • J
      Introduce is_bare_repository() and core.bare configuration variable · 7d1864ce
      Junio C Hamano 提交于
      This removes the old is_bare_git_dir(const char *) to ask if a
      directory, if it is a GIT_DIR, is a bare repository, and
      replaces it with is_bare_repository(void *).  The function looks
      at core.bare configuration variable if exists but uses the old
      heuristics: if it is ".git" or ends with "/.git", then it does
      not look like a bare repository, otherwise it does.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      7d1864ce
    • J
      Move initialization of log_all_ref_updates · 510c5a8e
      Junio C Hamano 提交于
      The patches to prevent Porcelainish that require working tree
      from doing any damage in a bare repository make a lot of sense,
      and I want to make the is_bare_git_dir() function more reliable.
      
      In order to allow the repository owner override the heuristic
      implemented in is_bare_git_dir() if/when it misidentifies a
      particular repository, it would make sense to introduce a new
      configuration variable "[core] bare = true/false", and make
      is_bare_git_dir() notice it.
      
      The scripts would do a 'repo-config --bool --get core.bare' and
      iff the command fails (i.e. there is no such variable in the
      configuration file), it would use the heuristic implemented at
      the script level [*1*].
      
      However, setup_git_env() which is called a lot earlier than we
      even read from the repository configuration currently makes a
      call to is_bare_git_dir(), in order to change the default
      setting for log_all_ref_updates.  It somehow feels that this is
      a hack.
      
      By the way, [*1*] is another thing I hate about the current
      config mechanism.  "git-repo-config --get" does not know what
      the possible configuration variables are, let alone what the
      default values for them are.  It allows us not to maintain a
      centralized configuration table, which makes it easy to
      introduce ad-hoc variables and gives a warm fuzzy feeling of
      being modular, but my feeling is that it is turning out to be a
      rather high price to pay for scripts.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      510c5a8e
  12. 30 12月, 2006 3 次提交
    • S
      Default core.packdGitWindowSize to 1 MiB if NO_MMAP. · 8c82534d
      Shawn O. Pearce 提交于
      If the compiler has asked us to disable use of mmap() on their
      platform then we are forced to use git_mmap and its emulation via
      pread.  In this case large (e.g. 32 MiB) windows for pack access
      are simply too big as a command will wind up reading a lot more
      data than it will ever need, significantly reducing response time.
      
      To prevent a high latency when NO_MMAP has been selected we now
      use a default of 1 MiB for core.packedGitWindowSize.  Credit goes
      to Linus and Junio for recommending this more reasonable setting.
      
      [jc: upcased the name of the symbolic constant, and made another
       hardcoded constant into a symbolic constant while at it. ]
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8c82534d
    • S
      Fully activate the sliding window pack access. · 60bb8b14
      Shawn O. Pearce 提交于
      This finally turns on the sliding window behavior for packfile data
      access by mapping limited size windows and chaining them under the
      packed_git->windows list.
      
      We consider a given byte offset to be within the window only if there
      would be at least 20 bytes (one hash worth of data) accessible after
      the requested offset.  This range selection relates to the contract
      that use_pack() makes with its callers, allowing them to access
      one hash or one object header without needing to call use_pack()
      for every byte of data obtained.
      
      In the worst case scenario we will map the same page of data twice
      into memory: once at the end of one window and once again at the
      start of the next window.  This duplicate page mapping will happen
      only when an object header or a delta base reference is spanned
      over the end of a window and is always limited to just one page of
      duplication, as no sane operating system will ever have a page size
      smaller than a hash.
      
      I am assuming that the possible wasted page of virtual address
      space is going to perform faster than the alternatives, which
      would be to copy the object header or ref delta into a temporary
      buffer prior to parsing, or to check the window range on every byte
      during header parsing.  We may decide to revisit this decision in
      the future since this is just a gut instinct decision and has not
      actually been proven out by experimental testing.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      60bb8b14
    • S
      Introduce new config option for mmap limit. · 77ccc5bb
      Shawn O. Pearce 提交于
      Rather than hardcoding the maximum number of bytes which can be
      mmapped from pack files we should make this value configurable,
      allowing the end user to increase or decrease this limit on a
      per-repository basis depending on the size of the repository
      and the capabilities of their operating system.
      
      In general users should not need to manually tune such a low-level
      setting within the core code, but being able to artifically limit
      the number of bytes which we can mmap at once from pack files will
      make it easier to craft test cases for the new mmap sliding window
      implementation.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      77ccc5bb
  13. 28 12月, 2006 1 次提交
    • J
      UTF-8: introduce i18n.logoutputencoding. · d2c11a38
      Junio C Hamano 提交于
      It is plausible for somebody to want to view the commit log in a
      different encoding from i18n.commitencoding -- the project's
      policy may be UTF-8 and the user may be using a commit message
      hook to run iconv to conform to that policy (and either not have
      i18n.commitencoding to default to UTF-8 or have it explicitly
      set to UTF-8).  Even then, Latin-1 may be more convenient for
      the usual pager and the terminal the user uses.
      
      The new variable i18n.logoutputencoding is used in preference to
      i18n.commitencoding to decide what encoding to recode the log
      output in when git-log and friends formats the commit log message.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d2c11a38
  14. 16 12月, 2006 1 次提交
    • S
      Enable reflogs by default in any repository with a working directory. · 0bee5918
      Shawn O. Pearce 提交于
      New and experienced Git users alike are finding out too late that
      they forgot to enable reflogs in the current repository, and cannot
      use the information stored within it to recover from an incorrectly
      entered command such as `git reset --hard HEAD^^^` when they really
      meant HEAD^^ (aka HEAD~2).
      
      So enable reflogs by default in all future versions of Git, unless
      the user specifically disables it with:
      
        [core]
          logAllRefUpdates = false
      
      in their .git/config or ~/.gitconfig.
      
      We only enable reflogs in repositories that have a working directory
      associated with them, as shared/bare repositories do not have
      an easy means to prune away old log entries, or may fail logging
      entirely if the user's gecos information is not valid during a push.
      This heuristic was suggested on the mailing list by Junio.
      
      Documentation was also updated to indicate the new default behavior.
      We probably should start to teach usuing the reflog to recover
      from mistakes in some of the tutorial material, as new users are
      likely to make a few along the way and will feel better knowing
      they can recover from them quickly and easily, without fsck-objects'
      lost+found features.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0bee5918
  15. 31 10月, 2006 1 次提交
  16. 21 9月, 2006 1 次提交
  17. 03 9月, 2006 1 次提交
  18. 02 9月, 2006 1 次提交
    • S
      Replace uses of strdup with xstrdup. · 9befac47
      Shawn Pearce 提交于
      Like xmalloc and xrealloc xstrdup dies with a useful message if
      the native strdup() implementation returns NULL rather than a
      valid pointer.
      
      I just tried to use xstrdup in new code and found it to be missing.
      However I expected it to be present as xmalloc and xrealloc are
      already commonly used throughout the code.
      
      [jc: removed the part that deals with last_XXX, which I am
       finding more and more dubious these days.]
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9befac47
  19. 24 8月, 2006 1 次提交
  20. 16 8月, 2006 1 次提交
  21. 01 8月, 2006 1 次提交
  22. 14 7月, 2006 1 次提交
    • L
      sha1_file: add the ability to parse objects in "pack file format" · 93821bd9
      Linus Torvalds 提交于
      The pack-file format is slightly different from the traditional git
      object format, in that it has a much denser binary header encoding.
      The traditional format uses an ASCII string with type and length
      information, which is somewhat wasteful.
      
      A new object format starts with uncompressed binary header
      followed by compressed payload -- this will allow us later to
      copy the payload straight to packfiles.
      
      Obviously they cannot be read by older versions of git, so for
      now new object files are created with the traditional format.
      core.legacyheaders configuration item, when set to false makes
      the code write in new format for people to experiment with.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      93821bd9
  23. 11 7月, 2006 1 次提交
  24. 09 7月, 2006 1 次提交
    • P
      Make it possible to set up libgit directly (instead of from the environment) · 0270083d
      Petr Baudis 提交于
      This introduces a setup_git() function which is essentialy a (public)
      backend for setup_git_env() which lets anyone specify custom sources
      for the various paths instead of environment variables. Since the repositories
      may get switched on the fly, this also updates code that caches paths to
      invalidate them properly; I hope neither of those is a sweet spot.
      
      It is used by Git.xs' xs__call_gate() to set up per-repository data
      for libgit's consumption. No code actually takes advantage of it yet
      but get_object() will in the next patches.
      Signed-off-by: NPetr Baudis <pasky@suse.cz>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0270083d
  25. 04 7月, 2006 1 次提交
    • J
      Make zlib compression level configurable, and change default. · 12f6c308
      Joachim B Haga 提交于
      With the change in default, "git add ." on kernel dir is about
      twice as fast as before, with only minimal (0.5%) change in
      object size. The speed difference is even more noticeable
      when committing large files, which is now up to 8 times faster.
      
      The configurability is through setting core.compression = [-1..9]
      which maps to the zlib constants; -1 is the default, 0 is no
      compression, and 1..9 are various speed/size tradeoffs, 9
      being slowest.
      
      Signed-off-by: Joachim B Haga (cjhaga@fys.uio.no)
      Acked-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      12f6c308
  26. 10 6月, 2006 1 次提交
    • J
      shared repository: optionally allow reading to "others". · 94df2506
      Junio C Hamano 提交于
      This enhances core.sharedrepository to have additionally
      specify that read and exec permissions to be given to others as
      well.  It is useful when serving a repository via gitweb and
      git-daemon that runs as a user outside the project group.
      
      The configuration item can take the following values:
      
          [core]
      	sharedrepository 	 ; the same as "group"
      	sharedrepository = true  ; ditto
      	sharedrepository = 1	 ; ditto
      	sharedrepository = group ; allow rwx to group
      	sharedrepository = all   ; allow rwx to group, allow rx to other
      	sharedrepository = umask ; not shared - use umask
      
      It also extends "git init-db" to take "--shared=all" and friends
      from the command line.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      94df2506
  27. 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
  28. 06 5月, 2006 1 次提交
  29. 03 5月, 2006 1 次提交
  30. 24 3月, 2006 1 次提交
  31. 21 3月, 2006 1 次提交
  32. 28 2月, 2006 2 次提交
    • J
      apply --whitespace: configuration option. · 383e20b6
      Junio C Hamano 提交于
      The new configuration option apply.whitespace can take one of
      "warn", "error", "error-all", or "strip".  When git-apply is run
      to apply the patch to the index, they are used as the default
      value if there is no command line --whitespace option.
      
      Andrew can now tell people who feed him git trees to update to
      this version and say:
      
      	git repo-config apply.whitespace error
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      383e20b6
    • J
      apply --whitespace: configuration option. · 2ae1c53b
      Junio C Hamano 提交于
      The new configuration option apply.whitespace can take one of
      "warn", "error", "error-all", or "strip".  When git-apply is run
      to apply the patch to the index, they are used as the default
      value if there is no command line --whitespace option.
      
      Andrew can now tell people who feed him git trees to update to
      this version and say:
      
      	git repo-config apply.whitespace error
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2ae1c53b
  33. 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
  34. 24 12月, 2005 1 次提交
    • J
      Introduce core.sharedrepository · 457f06d6
      Johannes Schindelin 提交于
      If the config variable 'core.sharedrepository' is set, the directories
      
      	$GIT_DIR/objects/
      	$GIT_DIR/objects/??
      	$GIT_DIR/objects/pack
      	$GIT_DIR/refs
      	$GIT_DIR/refs/heads
      	$GIT_DIR/refs/heads/tags
      
      are set group writable (and g+s, since the git group may be not the primary
      group of all users).
      
      Since all files are written as lock files first, and then moved to
      their destination, they do not have to be group writable.  Indeed, if
      this leads to problems you found a bug.
      
      Note that -- as in my first attempt -- the config variable is set in the
      function which checks the repository format. If this were done in
      git_default_config instead, a lot of programs would need to be modified
      to call git_config(git_default_config) first.
      
      [jc: git variables should be in environment.c unless there is a
       compelling reason to do otherwise.]
      Signed-off-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      457f06d6