1. 27 6月, 2007 2 次提交
  2. 25 6月, 2007 2 次提交
  3. 24 6月, 2007 7 次提交
  4. 23 6月, 2007 12 次提交
    • L
      Fix up "git log --follow" a bit.. · 9f38e1ef
      Linus Torvalds 提交于
      This fixes "git log --follow" to hopefully not leak memory any more, and
      also cleans it up a bit to look more like some of the other functions that
      use "diff_queued_diff" (by *not* using it directly as a global in the
      code, but by instead just taking a pointer to the diff queue and using
      that).
      
      As to "diff_queued_diff", I think it would be better off not as a global
      at all, but as being just an entry in the "struct diff_options" structure,
      but that's a separate issue, and there may be some subtle reason for why
      it's currently a global.
      
      Anyway, no real changes. Instead of having a magical first entry in the
      diff-queue, we now end up just keeping the diff-queue clean, and keeping
      our "preferred" file pairing in an internal "choice" variable. That makes
      it easy to switch the choice around when we find a better one.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9f38e1ef
    • L
      Finally implement "git log --follow" · 750f7b66
      Linus Torvalds 提交于
      Ok, I've really held off doing this too damn long, because I'm lazy, and I
      was always hoping that somebody else would do it.
      
      But no, people keep asking for it, but nobody actually did anything, so I
      decided I might as well bite the bullet, and instead of telling people
      they could add a "--follow" flag to "git log" to do what they want to do,
      I decided that it looks like I just have to do it for them..
      
      The code wasn't actually that complicated, in that the diffstat for this
      patch literally says "70 insertions(+), 1 deletions(-)", but I will have
      to admit that in order to get to this fairly simple patch, you did have to
      know and understand the internal git diff generation machinery pretty
      well, and had to really be able to follow how commit generation interacts
      with generating patches and generating the log.
      
      So I suspect that while I was right that it wasn't that hard, I might have
      been expecting too much of random people - this patch does seem to be
      firmly in the core "Linus or Junio" territory.
      
      To make a long story short: I'm sorry for it taking so long until I just
      did it.
      
      I'm not going to guarantee that this works for everybody, but you really
      can just look at the patch, and after the appropriate appreciative noises
      ("Ooh, aah") over how clever I am, you can then just notice that the code
      itself isn't really that complicated.
      
      All the real new code is in the new "try_to_follow_renames()" function. It
      really isn't rocket science: we notice that the pathname we were looking
      at went away, so we start a full tree diff and try to see if we can
      instead make that pathname be a rename or a copy from some other previous
      pathname. And if we can, we just continue, except we show *that*
      particular diff, and ever after we use the _previous_ pathname.
      
      One thing to look out for: the "rename detection" is considered to be a
      singular event in the _linear_ "git log" output! That's what people want
      to do, but I just wanted to point out that this patch is *not* carrying
      around a "commit,pathname" kind of pair and it's *not* going to be able to
      notice the file coming from multiple *different* files in earlier history.
      
      IOW, if you use "git log --follow", then you get the stupid CVS/SVN kind
      of "files have single identities" kind of semantics, and git log will just
      pick the identity based on the normal move/copy heuristics _as_if_ the
      history could be linearized.
      
      Put another way: I think the model is broken, but given the broken model,
      I think this patch does just about as well as you can do. If you have
      merges with the same "file" having different filenames over the two
      branches, git will just end up picking _one_ of the pathnames at the point
      where the newer one goes away. It never looks at multiple pathnames in
      parallel.
      
      And if you understood all that, you probably didn't need it explained, and
      if you didn't understand the above blathering, it doesn't really mtter to
      you. What matters to you is that you can now do
      
      	git log -p --follow builtin-rev-list.c
      
      and it will find the point where the old "rev-list.c" got renamed to
      "builtin-rev-list.c" and show it as such.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      750f7b66
    • J
      Merge branch 'jc/oneline' · 4d9b5807
      Junio C Hamano 提交于
      * jc/oneline:
        pp_header(): work around possible memory corruption
      4d9b5807
    • J
      Merge branch 'ei/oneline+add-empty' · 9bee7aab
      Junio C Hamano 提交于
      * ei/oneline+add-empty:
        Fix ALLOC_GROW calls with obsolete semantics
        Fix ALLOC_GROW off-by-one
        builtin-add: simplify (and increase accuracy of) exclude handling
        dir_struct: add collect_ignored option
        Extend --pretty=oneline to cover the first paragraph,
        Lift 16kB limit of log message output
      9bee7aab
    • J
      filter-branch: add example to move everything into a subdirectory · 55f22ff2
      Johannes Schindelin 提交于
      This is based on Jeff King's example in
      
      	20070621130137.GB4487@coredump.intra.peff.net
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      55f22ff2
    • J
      Merge branch 'js/filter' · 0f2890ac
      Junio C Hamano 提交于
      * js/filter:
        filter-branch: subdirectory filter needs --full-history
        filter-branch: Simplify parent computation.
        Teach filter-branch about subdirectory filtering
        filter-branch: also don't fail in map() if a commit cannot be mapped
        filter-branch: Use rev-list arguments to specify revision ranges.
        filter-branch: fix behaviour of '-k'
        filter-branch: use $(($i+1)) instead of $((i+1))
        chmod +x git-filter-branch.sh
        filter-branch: prevent filters from reading from stdin
        t7003: make test repeatable
        Add git-filter-branch
      0f2890ac
    • J
      Two trivial -Wcast-qual fixes · 63daae47
      Junio C Hamano 提交于
      Luiz Fernando N. Capitulino noticed the one in tree-walk.h where
      we cast away constness while computing the legnth of a tree
      entry.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      63daae47
    • J
      diffcore-rename: favour identical basenames · 0ce39643
      Johannes Schindelin 提交于
      When there are several candidates for a rename source, and one of them
      has an identical basename to the rename target, take that one.
      
      Noticed by Govind Salinas, posted by Shawn O. Pearce, partial patch
      by Linus Torvalds.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0ce39643
    • S
      Document git-gui, git-citool as mainporcelain manual pages · 37cd4f7e
      Shawn O. Pearce 提交于
      Jakub Narebski pointed out that the git-gui blame viewer is not a
      widely known feature, but is incredibly useful.  Part of the issue
      is advertising.  Up until now we haven't even referenced git-gui from
      within the core Git manual pages, mostly because I just wasn't sure
      how I wanted to supply git-gui documentation to end-users, or how
      that documentation should integrate with the core Git documentation.
      
      Based upon Jakub's comment that many users may not even know that
      the gui is available in a stock Git distribution I'm offering up
      two basic manual pages: git-citool and git-gui.  These should offer
      enough of a starting point for users to identify that the gui exists,
      and how to start it.  Future releases of git-gui may contain their
      own documentation system available from within a running git-gui.
      But not today.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      37cd4f7e
    • D
      Generate tags with correct timestamp (git-svnimport) · 47ee8ed2
      Dave O'Neill 提交于
      Now uses git-tag instead of manually constructing the tag.  This gives us a
      correct timestamp, removes some crufty code, and makes it work the same as
      git-cvsimport.
      
      The generated tags are now lightweight tags instead of tag objects, which may
      or may not be the behaviour we want.
      
      Also, remove two unused variables from git-cvsimport.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47ee8ed2
    • S
      Import branch 'git-p4' of git://repo.or.cz/fast-export · 610f043b
      Shawn O. Pearce 提交于
      Simon has asked that the git.git project include the git-p4 project
      as at least a contrib/fast-import within git.git.  I think it makes
      a lot of sense, as git-p4 nicely complements the only other in-tree
      fast-import user: import-tars.perl.
      
      git-p4 is offered under the MIT license by its authors.
      610f043b
    • S
      Avoid src:dst syntax as default bash completion for git push · 92d7c8e3
      Shawn O. Pearce 提交于
      Raimund Bauer just discovered that the default bash completion for
      a local branch name in a git-push line is not the best choice when
      the branch does not exist on the remote system.
      
      In the past we have always completed the local name 'test' as
      "test:test", indicating that the destination name is the same as
      the local name.  But this fails when "test" does not yet exist on
      the remote system, as there is no "test" branch for it to match
      the name against.
      
      Fortunately git-push does the right thing when given just the
      local branch, as it assumes you want to use the same name in the
      destination repository.  So we now offer "test" as the completion
      in a git-push line, and let git-push assume that is also the remote
      branch name.
      
      We also still support the remote branch completion after the :,
      but only if the user manually adds the colon before trying to get
      a completion.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      92d7c8e3
  5. 22 6月, 2007 1 次提交
  6. 21 6月, 2007 5 次提交
  7. 17 6月, 2007 11 次提交