1. 27 2月, 2008 1 次提交
  2. 24 2月, 2008 5 次提交
  3. 23 2月, 2008 7 次提交
    • J
      pull: pass --strategy along to to rebase · 0d2dd191
      Jay Soffian 提交于
      rebase supports --strategy, so pull should pass the option along to it.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0d2dd191
    • L
      Use helper function for copying index entry information · eb7a2f1d
      Linus Torvalds 提交于
      We used to just memcpy() the index entry when we copied the stat() and
      SHA1 hash information, which worked well enough back when the index
      entry was just an exact bit-for-bit representation of the information on
      disk.
      
      However, these days we actually have various management information in
      the cache entry too, and we should be careful to not overwrite it when
      we copy the stat information from another index entry.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      eb7a2f1d
    • L
      Name hash fixups: export (and rename) remove_hash_entry · d070e3a3
      Linus Torvalds 提交于
      This makes the name hash removal function (which really just sets the
      bit that disables lookups of it) available to external routines, and
      makes read_cache_unmerged() use it when it drops an unmerged entry from
      the index.
      
      It's renamed to remove_index_entry(), and we drop the (unused) 'istate'
      argument.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d070e3a3
    • L
      Fix name re-hashing semantics · a22c6371
      Linus Torvalds 提交于
      We handled the case of removing and re-inserting cache entries badly,
      which is something that merging commonly needs to do (removing the
      different stages, and then re-inserting one of them as the merged
      state).
      
      We even had a rather ugly special case for this failure case, where
      replace_index_entry() basically turned itself into a no-op if the new
      and the old entries were the same, exactly because the hash routines
      didn't handle it on their own.
      
      So what this patch does is to not just have the UNHASHED bit, but a
      HASHED bit too, and when you insert an entry into the name hash, that
      involves:
      
       - clear the UNHASHED bit, because now it's valid again for lookup
         (which is really all that UNHASHED meant)
      
       - if we're being lazy, we're done here (but we still want to clear the
         UNHASHED bit regardless of lazy mode, since we can become unlazy
         later, and so we need the UNHASHED bit to always be set correctly,
         even if we never actually insert the entry into the hash list)
      
       - if it was already hashed, we just leave it on the list
      
       - otherwise mark it HASHED and insert it into the list
      
      this all means that unhashing and rehashing a name all just works
      automatically.  Obviously, you cannot change the name of an entry (that
      would be a serious bug), but nothing can validly do that anyway (you'd
      have to allocate a new struct cache_entry anyway since the name length
      could change), so that's not a new limitation.
      
      The code actually gets simpler in many ways, although the lazy hashing
      does mean that there are a few odd cases (ie something can be marked
      unhashed even though it was never on the hash in the first place, and
      isn't actually marked hashed!).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a22c6371
    • J
      Merge branch 'maint' · 22c430ad
      Junio C Hamano 提交于
      * maint:
        hash: fix lookup_hash semantics
      22c430ad
    • J
      hash: fix lookup_hash semantics · 9ea0980a
      Jeff King 提交于
      We were returning the _address of_ the stored item (or NULL)
      instead of the item itself. While this sort of indirection
      is useful for insertion (since you can lookup and then
      modify), it is unnecessary for read-only lookup. Since the
      hash code splits these functions between the internal
      lookup_hash_entry function and the public lookup_hash
      function, it makes sense for the latter to provide what
      users of the library expect.
      
      The result of this was that the index caching returned bogus
      results on lookup. We unfortunately didn't catch this
      because we were returning a "struct cache_entry **" as a
      "void *", and accidentally assigning it to a "struct
      cache_entry *".
      
      As it happens, this actually _worked_ most of the time,
      because the entries were defined as:
      
        struct cache_entry {
      	  struct cache_entry *next;
      	  ...
        };
      
      meaning that interpreting a "struct cache_entry **" as a
      "struct cache_entry *" would yield an entry where all fields
      were totally bogus _except_ for the next pointer, which
      pointed to the actual cache entry. When walking the list, we
      would look at the bogus "name" field, which was unlikely to
      match our lookup, and then proceed to the "real" entry.
      
      The reading of bogus data was silently ignored most of the
      time, but could cause a segfault for some data (which seems
      to be more common on OS X).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9ea0980a
    • J
      gitweb: Better chopping in commit search results · be8b9063
      Junio C Hamano 提交于
      When searching commit messages (commit search), if matched string is
      too long, the generated HTML was munged leading to an ill-formed XHTML
      document.
      
      Now gitweb chop leading, trailing and matched parts, HTML escapes
      those parts, then composes and marks up match info.  HTML output is
      never chopped.  Limiting matched info to 80 columns (with slop) is now
      done by dividing remaining characters after chopping match equally to
      leading and trailing part, not by chopping composed and HTML marked
      output.
      Noticed-by: NJean-Baptiste Quenot <jbq@caraldi.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      be8b9063
  4. 22 2月, 2008 8 次提交
    • G
      builtin-tag.c: remove cruft · fd74cb08
      Gerrit Pape 提交于
      After changing builtin-tag.c to use strbuf in fd17f5b5 (Replace all
      read_fd use with strbuf_read, and get rid of it.), the last condition
      in do_sign() will always be false, as it's checked already right
      above.  So let's remove the cruft.
      Signed-off-by: NGerrit Pape <pape@smarden.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fd74cb08
    • G
      git-merge-index documentation: clarify synopsis · c7fae5fc
      Gerrit Pape 提交于
      The options following <merge-program> are not -a, --, or <file>...,
      but either -a, or -- <file>..., while -- is optional.
      Signed-off-by: NGerrit Pape <pape@smarden.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c7fae5fc
    • S
      git-gui: Focus insertion point at end of strings in repository chooser · 3baee1f3
      Shawn O. Pearce 提交于
      When selecting a local working directory for a new repository or a
      location to clone an existing repository into we now set the insert
      point at the end of the selected path, allowing the user to type in
      any additional parts of the path if they so desire.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      3baee1f3
    • S
      git-gui: Avoid hardcoded Windows paths in Cygwin package files · df4ec4cf
      Shawn O. Pearce 提交于
      When we are being built by the Cygwin package maintainers we need to
      embed the POSIX path to our library files and not the Windows path.
      Embedding the Windows path means all end-users who install our Cygwin
      package would be required to install Cygwin at the same Windows path
      as the package maintainer had Cygwin installed to.  This requirement
      is simply not user-friendly and may be infeasible for a large number
      of our users.
      
      We now try to auto-detect if the Tcl/Tk binary we will use at runtime
      is capable of translating POSIX paths into Windows paths the same way
      that cygpath does the translations.  If the Tcl/Tk binary gives us the
      same results then it understands the Cygwin path translation process
      and should be able to read our library files from a POSIX path name.
      
      If it does not give us the same answer as cygpath then the Tcl/Tk
      binary might actually be a native Win32 build (one that is not
      linked against Cygwin) and thus requires the native Windows path
      to our library files.  We can assume this is not a Cygwin package
      as the Cygwin maintainers do not currently ship a pure Win32 build
      of Tcl/Tk.
      
      Reported on the git mailing list by Jurko Gospodnetić.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      df4ec4cf
    • S
      git-gui: Default TCL_PATH to same location as TCLTK_PATH · 651fbba2
      Shawn O. Pearce 提交于
      Most users set TCLTK_PATH to tell git-gui where to find wish, but they
      fail to set TCL_PATH to the same Tcl installation.  We use the non-GUI
      tclsh during builds so headless systems are still able to create an
      index file and create message files without GNU msgfmt.  So it matters
      to us that we find a working TCL_PATH at build time.
      
      If TCL_PATH hasn't been set yet we can take a better guess about what
      tclsh executable to use by replacing 'wish' in the executable path with
      'tclsh'.  We only do this replacement on the filename part of the path,
      just in case the string "wish" appears in the directory paths.  Most of
      the time the tclsh will be installed alongside wish so this replacement
      is a sensible and safe default.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      651fbba2
    • S
      git-gui: Paper bag fix error dialogs opening over the main window · 85ec3e77
      Shawn O. Pearce 提交于
      If the main window is the only toplevel we have open then we
      don't have a valid grab right now, so we need to assume the
      best toplevel to use for the parent is ".".
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      85ec3e77
    • J
      send-email: fix In-Reply-To regression · 0fb7fc75
      Jay Soffian 提交于
      Fix a regression introduced by
      
      1ca3d6ed (send-email: squelch warning due to comparing undefined $_ to "")
      
      where if the user was prompted for an initial In-Reply-To and didn't
      provide one, messages would be sent out with an invalid In-Reply-To of
      "<>"
      
      Also add test cases for the regression and the fix. A small modification
      was needed to allow send-email to take its replies from stdin if the
      environment variable GIT_SEND_EMAIL_NOTTY is set.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0fb7fc75
    • J
      git-reset --hard and git-read-tree --reset: fix read_cache_unmerged() · f5ed3b30
      Junio C Hamano 提交于
      When invalidating unmerged entries in the index, we used to set
      their ce_mode to 0 to note the fact that they do not matter
      anymore which also made sure that later unpack_trees() call
      would not reuse them.  Instead just remove them from the index.
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f5ed3b30
  5. 21 2月, 2008 19 次提交