1. 18 4月, 2009 14 次提交
    • J
      Merge branch 'mm/add-p-quit' · 66aae6c1
      Junio C Hamano 提交于
      * mm/add-p-quit:
        Update git-add.txt according to the new possibilities of 'git add -p'.
        add-interactive: refactor mode hunk handling
        git add -p: new "quit" command at the prompt.
      66aae6c1
    • J
      Merge branch 'eb/upload-archive-from-git-shell' · ef5542ca
      Junio C Hamano 提交于
      * eb/upload-archive-from-git-shell:
        git-shell: Add 'git-upload-archive' to allowed commands.
      ef5542ca
    • J
      Merge branch 'jc/shared-literally' · 1dd9b638
      Junio C Hamano 提交于
      * jc/shared-literally:
        t1301-shared-repo: fix forced modes test
      1dd9b638
    • J
      Merge branch 'ns/am-to-empty' · 1ee28e58
      Junio C Hamano 提交于
      * ns/am-to-empty:
        git-am: teach git-am to apply a patch to an unborn branch
      1ee28e58
    • J
      Merge branch 'bw/short-ref-strict' · a9b772a0
      Junio C Hamano 提交于
      * bw/short-ref-strict:
        remote.c: use shorten_unambiguous_ref
        rev-parse: --abbrev-ref option to shorten ref name
        for-each-ref: utilize core.warnAmbiguousRefs for :short-format
        shorten_unambiguous_ref(): add strict mode
      a9b772a0
    • J
      Merge branch 'da/difftool' · bd15ef07
      Junio C Hamano 提交于
      * da/difftool:
        mergetool--lib: simplify API usage by removing more global variables
        Fix misspelled mergetool.keepBackup
        difftool/mergetool: refactor commands to use git-mergetool--lib
        mergetool: use $( ... ) instead of `backticks`
        bash completion: add git-difftool
        difftool: add support for a difftool.prompt config variable
        difftool: add various git-difftool tests
        difftool: move 'git-difftool' out of contrib
        difftool/mergetool: add diffuse as merge and diff tool
        difftool: add a -y shortcut for --no-prompt
        difftool: use perl built-ins when testing for msys
        difftool: remove the backup file feature
        difftool: remove merge options for opendiff, tkdiff, kdiff3 and xxdiff
        git-mergetool: add new merge tool TortoiseMerge
        git-mergetool/difftool: make (g)vimdiff workable under Windows
        doc/merge-config: list ecmerge as a built-in merge tool
      bd15ef07
    • J
      Merge branch 'maint' · 2d430c71
      Junio C Hamano 提交于
      * maint:
        doc/gitattributes: clarify location of config text
        Fix buffer overflow in config parser
        git-apply: fix option description
      2d430c71
    • J
      doc/gitattributes: clarify location of config text · c4c86d23
      Jeff King 提交于
      The gitattributes documentation has a section on the "diff"
      attribute, with subsections for each of the things you might
      want to configure in your diff config section (external
      diff, hunk headers, etc). The first such subsection
      specifically notes that the definition of the diff driver
      should go into $GIT_DIR/config, but subsequent sections do
      not.
      
      This location is implied if you are reading the
      documentation sequentially, but it is not uncommon for a new
      user to jump to (or be referred to) a specific section. For
      a new user who does not know git well enough to recognize
      the config syntax, it is not clear that those directives
      don't also go into the gitattributes file.
      
      This patch just mentions the config file in each subsection,
      similar to the way it is mentioned in the first.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c4c86d23
    • P
      hook/update: example of how to prevent branch creation · aed97c67
      Pierre Habouzit 提交于
      Since git doesn't provide a receive.denyBranchCreation or similar, here is
      an example of how to be sure users cannot create branches remotely by
      pushing a new reference.
      
      This setup has been proven useful to prevent creation of spurious branches
      because of users having their remote.origin.push set to HEAD, when they
      use `git push` while being on a local topic branch of theirs instead of
      the proper one.
      Signed-off-by: NPierre Habouzit <madcoder@debian.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      aed97c67
    • J
      Merge branch 'maint-1.6.1' into maint · f7446fc6
      Junio C Hamano 提交于
      * maint-1.6.1:
        Fix buffer overflow in config parser
      f7446fc6
    • J
      Merge branch 'maint-1.6.0' into maint-1.6.1 · 0fa0514b
      Junio C Hamano 提交于
      * maint-1.6.0:
        Fix buffer overflow in config parser
      0fa0514b
    • T
      Fix buffer overflow in config parser · e0b3cc0d
      Thomas Jarosch 提交于
      When interpreting a config value, the config parser reads in 1+ space
      character(s) and puts -one- space character in the buffer as soon as
      the first non-space character is encountered (if not inside quotes).
      
      Unfortunately the buffer size check lacks the extra space character
      which gets inserted at the next non-space character, resulting in
      a crash with a specially crafted config entry.
      
      The unit test now uses Java to compile a platform independent
      .NET framework to output the test string in C# :o)
      
          Read: Thanks to Johannes Sixt for the correct printf call
          which replaces the perl invocation.
      Signed-off-by: NThomas Jarosch <thomas.jarosch@intra2net.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e0b3cc0d
    • M
      remote.c: use shorten_unambiguous_ref · 45972ffb
      Michael J Gruber 提交于
      Use the new shorten_unambiguous_ref() for simplifying the output of
      upstream branch names. This affects status and checkout.
      Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      45972ffb
    • N
      get_local_heads(): do not return random pointer if there is no head · 55f0566f
      Nguyễn Thái Ngọc Duy 提交于
      it's silly to do this:
      
      mkdir foo && cd foo && git init && git push somewhere.git
      
      but segfault should not happen even in that case.
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      55f0566f
  2. 17 4月, 2009 2 次提交
  3. 16 4月, 2009 2 次提交
    • J
      add-interactive: refactor mode hunk handling · 0392513f
      Jeff King 提交于
      The original implementation considered the mode separately
      from the rest of the hunks, asking about it outside the main
      hunk-selection loop. This patch instead places a mode change
      as the first hunk in the loop. This has two advantages:
      
        1. less duplicated code (since we use the main selection
           loop). This also cleans up an inconsistency, which is
           that the main selection loop separates options with a
           comma, whereas the mode prompt used slashes.
      
        2. users can now skip the mode change and come back to it,
           search for it (via "/mode"), etc, as they can with other
           hunks.
      
      To facilitate this, each hunk is now marked with a "type".
      Mode hunks are not considered for splitting (which would
      make no sense, and also confuses the split_hunk function),
      nor are they editable. In theory, one could edit the mode
      lines and change to a new mode. In practice, there are only
      two modes that git cares about (0644 and 0755), so either
      you want to move from one to the other or not (and you can
      do that by staging or not staging).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0392513f
    • M
      git add -p: new "quit" command at the prompt. · 9a7a1e03
      Matthieu Moy 提交于
      There's already 'd' to stop staging hunks in a file, but no explicit
      command to stop the interactive staging (for the current files and the
      remaining ones).  Of course you can do 'd' and then ^C, but it would be
      more intuitive to allow 'quit' action.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9a7a1e03
  4. 14 4月, 2009 3 次提交
  5. 13 4月, 2009 19 次提交
    • J
      gitignore git-bisect--helper · f800b65b
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f800b65b
    • N
      git-am: teach git-am to apply a patch to an unborn branch · f79d4c8a
      Nanako Shiraishi 提交于
      People sometimes wonder why they cannot apply a patch that only
      creates new files to an unborn branch.
      Signed-off-by: NNanako Shiraishi <nanako3@lavabit.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f79d4c8a
    • J
      Mark t1301 permission test to depend on POSIXPERM · 7d5a1806
      Junio C Hamano 提交于
      This prepares the topic for inclusion to master.
      7d5a1806
    • J
      GIT 1.6.3-rc0 · c965c029
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c965c029
    • N
      Documentation/git.txt: GIT 1.6.2.2 has been out for a while · 54a47493
      Nanako Shiraishi 提交于
      These links inside "stalenotes" section need to be updated on the master
      branch every time a new stable or maintenance release is made.
      Signed-off-by: NNanako Shiraishi <nanako3@lavabit.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      54a47493
    • J
      Merge branch 'jk/no-perl' · 6f523f6d
      Junio C Hamano 提交于
      * jk/no-perl:
        tests: skip perl tests if NO_PERL is defined
        Makefile: allow building without perl
      6f523f6d
    • J
      Merge branch 'sb/doc-upstream-branch' · c736becc
      Junio C Hamano 提交于
      * sb/doc-upstream-branch:
        Documentation: Introduce "upstream branch"
      c736becc
    • J
      Merge branch 'jk/show-upstream' · 3e52effc
      Junio C Hamano 提交于
      * jk/show-upstream:
        branch: show upstream branch when double verbose
        make get_short_ref a public function
        for-each-ref: add "upstream" format field
        for-each-ref: refactor refname handling
        for-each-ref: refactor get_short_ref function
      3e52effc
    • J
      Merge branch 'fg/remote-prune' · c276857e
      Junio C Hamano 提交于
      * fg/remote-prune:
        add tests for remote groups
        git remote update: Fallback to remote if group does not exist
        remote: New function remote_is_configured()
        git remote update: Report error for non-existing groups
        git remote update: New option --prune
        builtin-remote.c: Split out prune_remote as a separate function.
      c276857e
    • J
      Merge branch 'cc/sha1-bsearch' · 07fb030e
      Junio C Hamano 提交于
      * cc/sha1-bsearch:
        sha1-lookup: fix up the assertion message
      07fb030e
    • J
      Merge branch 'cc/bisect-filter' · 6e353a5e
      Junio C Hamano 提交于
      * cc/bisect-filter: (21 commits)
        rev-list: add "int bisect_show_flags" in "struct rev_list_info"
        rev-list: remove last static vars used in "show_commit"
        list-objects: add "void *data" parameter to show functions
        bisect--helper: string output variables together with "&&"
        rev-list: pass "int flags" as last argument of "show_bisect_vars"
        t6030: test bisecting with paths
        bisect: use "bisect--helper" and remove "filter_skipped" function
        bisect: implement "read_bisect_paths" to read paths in "$GIT_DIR/BISECT_NAMES"
        bisect--helper: implement "git bisect--helper"
        bisect: use the new generic "sha1_pos" function to lookup sha1
        rev-list: call new "filter_skip" function
        patch-ids: use the new generic "sha1_pos" function to lookup sha1
        sha1-lookup: add new "sha1_pos" function to efficiently lookup sha1
        rev-list: pass "revs" to "show_bisect_vars"
        rev-list: make "show_bisect_vars" non static
        rev-list: move code to show bisect vars into its own function
        rev-list: move bisect related code into its own file
        rev-list: make "bisect_list" variable local to "cmd_rev_list"
        refs: add "for_each_ref_in" function to refactor "for_each_*_ref" functions
        quote: add "sq_dequote_to_argv" to put unwrapped args in an argv array
        ...
      6e353a5e
    • J
      Merge branch 'maint' · a54c4edc
      Junio C Hamano 提交于
      * maint:
        GIT 1.6.2.3
        State the effect of filter-branch on graft explicitly
        process_{tree,blob}: Remove useless xstrdup calls
      
      Conflicts:
      	GIT-VERSION-GEN
      a54c4edc
    • J
      GIT 1.6.2.3 · 3bd1bb32
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3bd1bb32
    • J
      Merge branch 'maint-1.6.1' into maint · 1966af81
      Junio C Hamano 提交于
      * maint-1.6.1:
        State the effect of filter-branch on graft explicitly
        process_{tree,blob}: Remove useless xstrdup calls
      1966af81
    • J
      Merge branch 'maint-1.6.0' into maint-1.6.1 · bc69776a
      Junio C Hamano 提交于
      * maint-1.6.0:
        State the effect of filter-branch on graft explicitly
        process_{tree,blob}: Remove useless xstrdup calls
      bc69776a
    • D
      mergetool--lib: simplify API usage by removing more global variables · 47d65924
      David Aguilar 提交于
      The mergetool--lib scriplet was tricky to use because it relied upon
      the existance of several global shell variables.  This removes more
      global variables so that things are simpler for callers.
      
      A side effect is that some variables are recomputed each time
      run_merge_tool() is called, but the overhead for recomputing
      them is justified by the simpler implementation.
      Signed-off-by: NDavid Aguilar <davvid@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47d65924
    • D
    • L
      process_{tree,blob}: Remove useless xstrdup calls · 21315268
      Linus Torvalds 提交于
      On Wed, 8 Apr 2009, Björn Steinbrink wrote:
      >
      > The name of the processed object was duplicated for passing it to
      > add_object(), but that already calls path_name, which allocates a new
      > string anyway. So the memory allocated by the xstrdup calls just went
      > nowhere, leaking memory.
      
      Ack, ack.
      
      There's another easy 5% or so for the built-in object walker: once we've
      created the hash from the name, the name isn't interesting any more, and
      so something trivial like this can help a bit.
      
      Does it matter? Probably not on its own. But a few more memory saving
      tricks and it might all make a difference.
      
      		Linus
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      21315268
    • J
      t1301-shared-repo: fix forced modes test · 07868821
      Johannes Sixt 提交于
      This test was added recently (5a688fe4, "core.sharedrepository = 0mode"
      should set, not loosen; 2009-03-28). It checked the result of a sed
      invocation for emptyness, but in some cases it forgot to print anything
      at all, so that those checks would never be false.
      
      Due to this mistake, it went unnoticed that the files in objects/info are
      not necessarily 0440, but can also be 0660.  Because the 0mode setting
      tries to guarantee that the files are accessible only to the people they
      are meant to be used by, we should only make sure that they are readable
      by the user and the group when the configuration is set to 0660.  It is a
      separate matter from the core.shredrepository settings that w-bit from
      immutable object files under objects/[0-9a-f][0-9a-f] directories should
      be dropped.
      
      COMMIT_EDITMSG is still world-readable, but it (and any transient files
      that are meant for repositories with a work tree) does not matter.  If you
      are working on a shared machine and on a sekrit stuff, the root of the
      work tree would be with mode 0700 (or 0750 to allow peeking by other
      people in the group), and that would mean that .git/COMMIT_EDITMSG in such
      a repository would not be readable by the strangers anyway.
      
      Also, in the real-world use case, .git/COMMIT_EDITMSG will be given to an
      arbitrary editor the user happens to use, and we have no guarantee what it
      does (e.g. it may create a new file with umask and replace, it may rewrite
      in place, it may leave an editor backup file but use umask to create it,
      etc.), and the protection of the file lies majorly on the protection of
      the root of the work tree.
      
      This test cannot be run on Windows; it requires POSIXPERM when merged to
      'master'.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      07868821