1. 07 8月, 2010 1 次提交
  2. 15 7月, 2010 2 次提交
    • J
      MERGE_RR is in .git, not .git/rr-cache · 3ca399d4
      Jay Soffian 提交于
      0af0ac7e (Move MERGE_RR from .git/rr-cache/ into .git/) moved the
      location of MERGE_RR but I found a few references to the old
      location.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3ca399d4
    • S
      rerere: fix overeager gc · 7d7ff15b
      SZEDER Gábor 提交于
      'rerere gc' prunes resolutions of conflicted merges that occurred long
      time ago, and when doing so it takes the creation time of the
      conflicted automerge results into account.  This can cause the loss of
      frequently used conflict resolutions (e.g. long-living topic branches
      are merged into a regularly rebuilt integration branch (think of git's
      pu)) when they become old enough to exceed 'rerere gc's threshold.
      
      To prevent the loss of valuable merge resolutions 'rerere' will (1)
      update the timestamp of the recorded conflict resolution (i.e.
      'postimage') each time when encountering and resolving the same merge
      conflict, and (2) take this timestamp, i.e. the time of the last usage
      into account when gc'ing.
      Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7d7ff15b
  3. 06 7月, 2010 1 次提交
  4. 28 6月, 2010 1 次提交
  5. 23 2月, 2010 1 次提交
    • L
      Move 'builtin-*' into a 'builtin/' subdirectory · 81b50f3c
      Linus Torvalds 提交于
      This shrinks the top-level directory a bit, and makes it much more
      pleasant to use auto-completion on the thing. Instead of
      
      	[torvalds@nehalem git]$ em buil<tab>
      	Display all 180 possibilities? (y or n)
      	[torvalds@nehalem git]$ em builtin-sh
      	builtin-shortlog.c     builtin-show-branch.c  builtin-show-ref.c
      	builtin-shortlog.o     builtin-show-branch.o  builtin-show-ref.o
      	[torvalds@nehalem git]$ em builtin-shor<tab>
      	builtin-shortlog.c  builtin-shortlog.o
      	[torvalds@nehalem git]$ em builtin-shortlog.c
      
      you get
      
      	[torvalds@nehalem git]$ em buil<tab>		[type]
      	builtin/   builtin.h
      	[torvalds@nehalem git]$ em builtin		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/sh<tab>	[type]
      	shortlog.c     shortlog.o     show-branch.c  show-branch.o  show-ref.c     show-ref.o
      	[torvalds@nehalem git]$ em builtin/sho		[auto-completes to]
      	[torvalds@nehalem git]$ em builtin/shor<tab>	[type]
      	shortlog.c  shortlog.o
      	[torvalds@nehalem git]$ em builtin/shortlog.c
      
      which doesn't seem all that different, but not having that annoying
      break in "Display all 180 possibilities?" is quite a relief.
      
      NOTE! If you do this in a clean tree (no object files etc), or using an
      editor that has auto-completion rules that ignores '*.o' files, you
      won't see that annoying 'Display all 180 possibilities?' message - it
      will just show the choices instead.  I think bash has some cut-off
      around 100 choices or something.
      
      So the reason I see this is that I'm using an odd editory, and thus
      don't have the rules to cut down on auto-completion.  But you can
      simulate that by using 'ls' instead, or something similar.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      81b50f3c
  6. 21 1月, 2010 1 次提交
  7. 11 1月, 2010 1 次提交
  8. 05 12月, 2009 1 次提交
  9. 04 12月, 2009 1 次提交
  10. 11 11月, 2009 1 次提交
  11. 30 4月, 2009 1 次提交
    • A
      replace direct calls to unlink(2) with unlink_or_warn · 691f1a28
      Alex Riesen 提交于
      This helps to notice when something's going wrong, especially on
      systems which lock open files.
      
      I used the following criteria when selecting the code for replacement:
      - it was already printing a warning for the unlink failures
      - it is in a function which already printing something or is
        called from such a function
      - it is in a static function, returning void and the function is only
        called from a builtin main function (cmd_)
      - it is in a function which handles emergency exit (signal handlers)
      - it is in a function which is obvously cleaning up the lockfiles
      Signed-off-by: NAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      691f1a28
  12. 15 2月, 2009 1 次提交
    • S
      rerere: remove duplicated functions · 90056966
      SZEDER Gábor 提交于
      Both rerere.c and builtin-rerere.c define the static functions
      rr_path() and has_resolution() the exact same way.  To eliminate this
      code duplication this patch turns the functions in rerere.c
      non-static, and makes builtin-rerere.c use them.  Also, since this
      puts these two functions into the global namespace, rename them to
      rerere_path() and has_rerere_resolution(), respectively, and rename
      their "name" parameter to "hex", because it better reflects what that
      parameter actually is.
      Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      90056966
  13. 12 1月, 2009 1 次提交
  14. 26 10月, 2008 1 次提交
  15. 22 7月, 2008 1 次提交
    • J
      Rename path_list to string_list · c455c87c
      Johannes Schindelin 提交于
      The name path_list was correct for the first usage of that data structure,
      but it really is a general-purpose string list.
      
      $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list)
      $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list)
      $ git mv path-list.h string-list.h
      $ git mv path-list.c string-list.c
      $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path)
      $ perl -i -pe 's/path/string/g' string-list.[ch]
      $ git mv Documentation/technical/api-path-list.txt \
      	Documentation/technical/api-string-list.txt
      $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths)
      
      ... and then fix all users of string-list to access the member "string"
      instead of "path".
      
      Documentation/technical/api-string-list.txt needed some rewrapping, too.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c455c87c
  16. 14 7月, 2008 1 次提交
    • S
      Make usage strings dash-less · 1b1dd23f
      Stephan Beyer 提交于
      When you misuse a git command, you are shown the usage string.
      But this is currently shown in the dashed form.  So if you just
      copy what you see, it will not work, when the dashed form
      is no longer supported.
      
      This patch makes git commands show the dash-less version.
      
      For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh
      generates a dash-less usage string now.
      Signed-off-by: NStephan Beyer <s-beyer@gmx.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b1dd23f
  17. 13 7月, 2008 1 次提交
    • J
      Move MERGE_RR from .git/rr-cache/ into .git/ · 0af0ac7e
      Johannes Schindelin 提交于
      If you want to reuse the rerere cache in another repository, and set
      a symbolic link to it, you do not want to have the two repositories
      interfer with each other by accessing the _same_ MERGE_RR.
      
      For example, if you use contrib/git-new-workdir to set up a second
      working directory, and you have a conflict in one working directory,
      but commit in the other working directory first, the wrong "resolution"
      will be recorded.
      
      The easy solution is to move MERGE_RR out of the rr-cache/ directory,
      which also corresponds with the notion that rr-cache/ contains cached
      resolutions, not some intermediate temporary states.
      
      Noticed by Kalle Olavi Niemitalo.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0af0ac7e
  18. 10 7月, 2008 2 次提交
    • S
      rerere: Separate libgit and builtin functions · 5b2fd956
      Stephan Beyer 提交于
      This patch moves rerere()-related functions into a newly created
      rerere.c file.
      The setup_rerere() function is needed by both rerere() and cmd_rerere(),
      so this function is moved to rerere.c and declared non-static (and "extern")
      in newly created rerere.h file.
      Signed-off-by: NStephan Beyer <s-beyer@gmx.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5b2fd956
    • O
      builtin-rerere: more carefully find conflict markers · 99d698f1
      Olivier Marin 提交于
      When a conflicting file contains a line that begin with "=======", rerere
      failed to parse conflict markers. This result to a wrong preimage file and
      an unexpected error for the user.  The boundary between ours and theirs
      not just begin with 7 equals, but is followed by either a SP or a LF.
      
      This patch enforces parsing rules so that markers match in the right order,
      and when ambiguous, the command does not autoresolve the conflicted file.
      
      Especially because we are introducing rerere.autoupdate configuration
      (which is off by default for safety) that automatically stages the
      resolution made by rerere, it is necessary to make sure that we do not
      autoresolve when there is any ambiguity.
      Signed-off-by: NOlivier Marin <dkr@freesurf.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      99d698f1
  19. 22 6月, 2008 4 次提交
    • J
      rerere.autoupdate · 121c813f
      Junio C Hamano 提交于
      When this configuration is set, paths that are autoresolved by git-rerere
      are updated in the index as well.
      121c813f
    • J
      rerere: remove dubious "tail_optimization" · 51e0d0a6
      Junio C Hamano 提交于
      It is dubious if it is cheaper to shift entries repeatedly using memmove()
      to collect entries that needs to be written out in front of an array than
      simply marking the entries to be skipped.  In addition, the label called this
      "tail optimization", but this obviously is not what people usually call
      with that name.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      51e0d0a6
    • J
      git-rerere: detect unparsable conflicts · a1b32fdc
      Junio C Hamano 提交于
      rerere did not detect the case where <<< === >>> markers did not match.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a1b32fdc
    • J
      rerere: rerere_created_at() and has_resolution() abstraction · 9022a495
      Junio C Hamano 提交于
      There were too many places in the code how an entry in the rerere database
      looks like, and the garbage_collect() function that iterates over
      subdirectories of the rr-cache directory was the worse offender.
      
      Introduce two helper functions, rerere_created_at() and has_resolution(),
      to abstract out the logic a bit better.
      
      Incidentally this fixes a small memory leak in garbage_collect()
      function.  The path list to collect the entries to be pruned were defined
      to strdup the paths but the caller was feeding a path after doing an extra
      copy.  Because the list does not have to be sorted by conflict signature
      hash, we use path_list_append() instead of path_list_insert().
      
      While we are at it, make a conflicted hunk comparision in handle_file() a
      bit easier to read.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9022a495
  20. 18 6月, 2008 1 次提交
  21. 15 5月, 2008 1 次提交
  22. 26 2月, 2008 1 次提交
  23. 22 1月, 2008 1 次提交
    • L
      Make on-disk index representation separate from in-core one · 7a51ed66
      Linus Torvalds 提交于
      This converts the index explicitly on read and write to its on-disk
      format, allowing the in-core format to contain more flags, and be
      simpler.
      
      In particular, the in-core format is now host-endian (as opposed to the
      on-disk one that is network endian in order to be able to be shared
      across machines) and as a result we can dispense with all the
      htonl/ntohl on accesses to the cache_entry fields.
      
      This will make it easier to make use of various temporary flags that do
      not exist in the on-disk format.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7a51ed66
  24. 17 1月, 2008 1 次提交
  25. 14 12月, 2007 1 次提交
  26. 27 9月, 2007 2 次提交
  27. 26 9月, 2007 1 次提交
  28. 17 9月, 2007 1 次提交
  29. 11 9月, 2007 1 次提交
    • P
      Strbuf API extensions and fixes. · f1696ee3
      Pierre Habouzit 提交于
        * Add strbuf_rtrim to remove trailing spaces.
        * Add strbuf_insert to insert data at a given position.
        * Off-by one fix in strbuf_addf: strbuf_avail() does not counts the final
          \0 so the overflow test for snprintf is the strict comparison. This is
          not critical as the growth mechanism chosen will always allocate _more_
          memory than asked, so the second test will not fail. It's some kind of
          miracle though.
        * Add size extension hints for strbuf_init and strbuf_read. If 0, default
          applies, else:
            + initial buffer has the given size for strbuf_init.
            + first growth checks it has at least this size rather than the
              default 8192.
      Signed-off-by: NPierre Habouzit <madcoder@debian.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f1696ee3
  30. 07 9月, 2007 1 次提交
  31. 15 7月, 2007 1 次提交
  32. 10 7月, 2007 1 次提交
  33. 07 7月, 2007 1 次提交
  34. 06 7月, 2007 1 次提交