1. 16 1月, 2006 1 次提交
  2. 08 1月, 2006 2 次提交
    • J
      describe: allow more than one revs to be named. · f8f9c73c
      Junio C Hamano 提交于
      The main loop was prepared to take more than one revs, but the actual
      naming logic wad not (it used pop_most_recent_commit while forgetting
      that the commit marks stay after it's done).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f8f9c73c
    • J
      [PATCH] Compilation: zero-length array declaration. · 8f1d2e6f
      Junio C Hamano 提交于
      ISO C99 (and GCC 3.x or later) lets you write a flexible array
      at the end of a structure, like this:
      
      	struct frotz {
      		int xyzzy;
      		char nitfol[]; /* more */
      	};
      
      GCC 2.95 and 2.96 let you to do this with "char nitfol[0]";
      unfortunately this is not allowed by ISO C90.
      
      This declares such construct like this:
      
      	struct frotz {
      		int xyzzy;
      		char nitfol[FLEX_ARRAY]; /* more */
      	};
      
      and git-compat-util.h defines FLEX_ARRAY to 0 for gcc 2.95 and
      empty for others.
      
      If you are using a C90 C compiler, you should be able
      to override this with CFLAGS=-DFLEX_ARRAY=1 from the
      command line of "make".
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8f1d2e6f
  3. 27 12月, 2005 1 次提交
  4. 17 11月, 2005 1 次提交
  5. 16 11月, 2005 1 次提交
    • S
      Rework object refs tracking to reduce memory usage · 4a4e6fd7
      Sergey Vlasov 提交于
      Store pointers to referenced objects in a variable sized array instead
      of linked list.  This cuts down memory usage of utilities which use
      object references; e.g., git-fsck-objects --full on the git.git
      repository consumes about 2 MB of memory tracked by Massif instead of
      7 MB before the change.  Object refs are still the biggest consumer of
      memory (57%), but the malloc overhead for a single block instead of a
      linked list is substantially smaller.
      Signed-off-by: NSergey Vlasov <vsu@altlinux.ru>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4a4e6fd7
  6. 15 11月, 2005 1 次提交
    • L
      Fix git-rev-list "date order" with --topo-order · 2ed02887
      Linus Torvalds 提交于
      This fixes git-rev-list so that when there are multiple branches, we still
      sort the heads in proper approximate date order even when sorting the
      output topologically.
      
      This makes things like
      
      	gitk --all -d
      
      work sanely and show the branches in date order (where "date order" is
      obviously modified by the paren-child dependency requirements of the
      topological sort).
      
      The trivial fix is to just build the "work" list in date order rather than
      inserting the new work entries at the beginning.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2ed02887
  7. 11 11月, 2005 1 次提交
    • J
      Add --pretty=fuller · ff56fe1c
      Junio C Hamano 提交于
      git log without --pretty showed author and author-date, while
      with --pretty=full showed author and committer but no dates.
      The new formatting option, --pretty=fuller, shows both name and
      timestamp for author and committer.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ff56fe1c
  8. 03 11月, 2005 1 次提交
    • J
      Be careful when dereferencing tags. · 9534f40b
      Junio C Hamano 提交于
      One caller of deref_tag() was not careful enough to make sure
      what deref_tag() returned was not NULL (i.e. we found a tag
      object that points at an object we do not have).  Fix it, and
      warn about refs that point at such an incomplete tag where
      needed.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9534f40b
  9. 15 10月, 2005 1 次提交
  10. 16 9月, 2005 1 次提交
    • L
      [PATCH] Avoid wasting memory in git-rev-list · 60ab26de
      Linus Torvalds 提交于
      As pointed out on the list, git-rev-list can use a lot of memory.
      
      One low-hanging fruit is to free the commit buffer for commits that we
      parse. By default, parse_commit() will save away the buffer, since a lot
      of cases do want it, and re-reading it continually would be unnecessary.
      However, in many cases the buffer isn't actually necessary and saving it
      just wastes memory.
      
      We could just free the buffer ourselves, but especially in git-rev-list,
      we actually end up using the helper functions that automatically add
      parent commits to the commit lists, so we don't actually control the
      commit parsing directly.
      
      Instead, just make this behaviour of "parse_commit()" a global flag.
      Maybe this is a bit tasteless, but it's very simple, and it makes a
      noticable difference in memory usage.
      
      Before the change:
      
      	[torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null
      	0.26user 0.02system 0:00.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
      	0inputs+0outputs (0major+3714minor)pagefaults 0swaps
      
      after the change:
      
      	[torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null
      	0.26user 0.00system 0:00.27elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
      	0inputs+0outputs (0major+2433minor)pagefaults 0swaps
      
      note how the minor faults have decreased from 3714 pages to 2433 pages.
      That's all due to the fewer anonymous pages allocated to hold the comment
      buffers and their metadata.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      60ab26de
  11. 30 8月, 2005 2 次提交
  12. 24 8月, 2005 1 次提交
  13. 23 8月, 2005 1 次提交
    • J
      [PATCH] Add 'git show-branch'. · f76412ed
      Junio C Hamano 提交于
      The 'git show-branches' command turns out to be reasonably useful,
      but painfully slow.  So rewrite it in C, using ideas from merge-base
      while enhancing it a bit more.
      
       - Unlike show-branches, it can take --heads (show me all my
         heads), --tags (show me all my tags), or --all (both).
      
       - It can take --more=<number> to show beyond the merge-base.
      
       - It shows the short name for each commit in the extended SHA1
         syntax.
      
       - It can find merge-base for more than two heads.
      
      Examples:
      
          $ git show-branch --more=6 HEAD
      
          is almost the same as "git log --pretty=oneline --max-count=6".
      
          $ git show-branch --merge-base master mhf misc
      
          finds the merge base of the three given heads.
      
          $ git show-branch master mhf misc
      
          shows logs from the top of these three branch heads, up to their
          common ancestor commit is shown.
      
          $ git show-branch --all --more=10
      
          is poor-man's gitk, showing all the tags and heads, and
          going back 10 commits beyond the merge base of those refs.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f76412ed
  14. 10 8月, 2005 1 次提交
  15. 05 8月, 2005 1 次提交
    • J
      Fix send-pack for non-commitish tags. · 37fde874
      Junio C Hamano 提交于
      Again I left the v2.6.11-tree tag behind.  My bad.
      
      This commit makes sure that we do not barf when pushing a ref
      that is a non-commitish tag.  You can update a remote ref under
      the following conditions:
      
       * You can always use --force.
       * Creating a brand new ref is OK.
       * If the remote ref is exactly the same as what you are
         pushing, it is OK (nothing is pushed).
       * You can replace a commitish with another commitish which is a
         descendant of it, if you can verify the ancestry between them;
         this and the above means you have to have what you are replacing.
       * Otherwise you cannot update; you need to use --force.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      37fde874
  16. 01 8月, 2005 1 次提交
    • J
      Teach parse_commit_buffer about grafting. · 5da5c8f4
      Junio C Hamano 提交于
      Introduce a new file $GIT_DIR/info/grafts (or $GIT_GRAFT_FILE)
      which is a list of "fake commit parent records".  Each line of
      this file is a commit ID, followed by parent commit IDs, all
      40-byte hex SHA1 separated by a single SP in between.  The
      records override the parent information we would normally read
      from the commit objects, allowing both adding "fake" parents
      (i.e. grafting), and pretending as if a commit is not a child of
      some of its real parents (i.e. cauterizing).
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5da5c8f4
  17. 28 7月, 2005 1 次提交
  18. 12 7月, 2005 1 次提交
    • J
      [PATCH] Dereference tag repeatedly until we get a non-tag. · 013aab82
      Junio C Hamano 提交于
      When we allow a tag object in place of a commit object, we only
      dereferenced the given tag once, which causes a tag that points at a tag
      that points at a commit to be rejected.  Instead, dereference tag
      repeatedly until we get a non-tag.
      
      This patch makes change to two functions:
      
       - commit.c::lookup_commit_reference() is used by merge-base,
         rev-tree and rev-parse to convert user supplied SHA1 to that of
         a commit.
       - rev-list uses its own get_commit_reference() to do the same.
      
      Dereferencing tags this way helps both of these uses.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      013aab82
  19. 07 7月, 2005 2 次提交
  20. 27 6月, 2005 1 次提交
  21. 21 6月, 2005 1 次提交
  22. 19 6月, 2005 1 次提交
  23. 09 6月, 2005 1 次提交
  24. 07 6月, 2005 1 次提交
    • J
      [PATCH] Modify git-rev-list to linearise the commit history in merge order. · a3437b8c
      jon@blackcubes.dyndns.org 提交于
      This patch linearises the GIT commit history graph into merge order
      which is defined by invariants specified in Documentation/git-rev-list.txt.
      
      The linearisation produced by this patch is superior in an objective sense
      to that produced by the existing git-rev-list implementation in that
      the linearisation produced is guaranteed to have the minimum number of
      discontinuities, where a discontinuity is defined as an adjacent pair of
      commits in the output list which are not related in a direct child-parent
      relationship.
      
      With this patch a graph like this:
      
      	a4 ---
      	| \   \
      	|  b4 |
      	|/ |  |
      	a3 |  |
      	|  |  |
      	a2 |  |
      	|  |  c3
      	|  |  |
      	|  |  c2
      	|  b3 |
      	|  | /|
      	|  b2 |
      	|  |  c1
      	|  | /
      	|  b1
      	a1 |
      	|  |
      	a0 |
      	| /
      	root
      
      Sorts like this:
      
      	= a4
      	| c3
      	| c2
      	| c1
      	^ b4
      	| b3
      	| b2
      	| b1
      	^ a3
      	| a2
      	| a1
      	| a0
      	= root
      
      Instead of this:
      
      	= a4
      	| c3
      	^ b4
      	| a3
      	^ c2
      	^ b3
      	^ a2
      	^ b2
      	^ c1
      	^ a1
      	^ b1
      	^ a0
      	= root
      
      A test script, t/t6000-rev-list.sh, includes a test which demonstrates
      that the linearisation produced by --merge-order has less discontinuities
      than the linearisation produced by git-rev-list without the --merge-order
      flag specified. To see this, do the following:
      
      	cd t
      	./t6000-rev-list.sh
      	cd trash
      	cat actual-default-order
      	cat actual-merge-order
      
      The existing behaviour of git-rev-list is preserved, by default. To obtain
      the modified behaviour, specify --merge-order or --merge-order --show-breaks
      on the command line.
      
      This version of the patch has been tested on the git repository and also on the linux-2.6
      repository and has reasonable performance on both - ~50-100% slower than the original algorithm.
      
      This version of the patch has incorporated a functional equivalent of the Linus' output limiting
      algorithm into the merge-order algorithm itself. This operates per the notes associated
      with Linus' commit 337cb3fb.
      
      This version has incorporated Linus' feedback regarding proposed changes to rev-list.c.
      (see: [PATCH] Factor out filtering in rev-list.c)
      
      This version has improved the way sort_first_epoch marks commits as uninteresting.
      
      For more details about this change, refer to Documentation/git-rev-list.txt
      and http://blackcubes.dyndns.org/epoch/.
      Signed-off-by: NJon Seymour <jon.seymour@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a3437b8c
  25. 06 6月, 2005 1 次提交
    • L
      pretty_print_commit: add different formats · 000182ea
      Linus Torvalds 提交于
      You can ask to print out "raw" format (full headers, full body),
      "medium" format (author and date, full body) or "short" format
      (author only, condensed body).
      
      Use "git-rev-list --pretty=short HEAD | less -S" for an example.
      000182ea
  26. 01 6月, 2005 1 次提交
  27. 31 5月, 2005 1 次提交
  28. 26 5月, 2005 1 次提交
    • L
      commit: save the commit buffer off when parsing a commit · 3ff1fbbb
      Linus Torvalds 提交于
      object.
      
      A fair number of the users potentially want to look at the
      commit objects more closely, and if you worry about memory
      leaking in certain applications, you can always do a
      
      	free(commit->buffer);
      	commit->buffer = NULL;
      
      by hand after parsing them.
      3ff1fbbb
  29. 23 5月, 2005 1 次提交
    • L
      Include file cleanups.. · 6b0c3121
      Linus Torvalds 提交于
      Add <limits.h> to the include files handled by "cache.h", and remove
      extraneous #include directives from various .c files. The rule is that
      "cache.h" gets all the basic stuff, so that we'll have as few system
      dependencies as possible.
      6b0c3121
  30. 21 5月, 2005 1 次提交
  31. 19 5月, 2005 1 次提交
  32. 07 5月, 2005 1 次提交
    • N
      [PATCH] don't load and decompress objects twice with parse_object() · bd2c39f5
      Nicolas Pitre 提交于
      It turns out that parse_object() is loading and decompressing given
      object to free it just before calling the specific object parsing
      function which does mmap and decompress the same object again. This
      patch introduces the ability to parse specific objects directly from a
      memory buffer.
      
      Without this patch, running git-fsck-cache on the kernel repositorytake:
      
      	real    0m13.006s
      	user    0m11.421s
      	sys     0m1.218s
      
      With this patch applied:
      
      	real    0m8.060s
      	user    0m7.071s
      	sys     0m0.710s
      
      The performance increase is significant, and this is kind of a
      prerequisite for sane delta object support with fsck.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bd2c39f5
  33. 05 5月, 2005 1 次提交
  34. 27 4月, 2005 1 次提交
  35. 25 4月, 2005 3 次提交