1. 27 1月, 2013 1 次提交
    • J
      commit: drop useless xstrdup of commit message · 200ebe36
      Jeff King 提交于
      When git-commit is asked to reuse a commit message via "-c",
      we call read_commit_message, which looks up the commit and
      hands back either the re-encoded result, or a copy of the
      original. We make a copy in the latter case so that the
      ownership semantics of the return value are clear (in either
      case, it can be freed).
      
      However, since we return a "const char *", and since the
      resulting buffer's lifetime is the same as that of the whole
      program, we never bother to free it at all.
      
      Let's just drop the copy. That saves us a copy in the common
      case. While it does mean we leak in the re-encode case, it
      doesn't matter, since we are relying on program exit to free
      the memory anyway.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      200ebe36
  2. 26 1月, 2013 5 次提交
  3. 24 1月, 2013 12 次提交
    • B
      git-svn: Simplify calculation of GIT_DIR · bc93ceb7
      Barry Wardell 提交于
      Since git-rev-parse already checks for the $GIT_DIR environment
      variable and that it returns an actual git repository, there is no
      need to repeat the checks again here.
      
      This also fixes a problem where git-svn did not work in cases where
      .git was a file with a gitdir: link.
      
      [ew: squashed test case,
       delay setting GIT_DIR until after `git rev-parse --cdup` to fix t9101,
       (thanks to Junio)]
      Signed-off-by: NBarry Wardell <barry.wardell@gmail.com>
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      bc93ceb7
    • E
      git-svn: cleanup sprintf usage for uppercasing hex · 1b67bef2
      Eric Wong 提交于
      We do not need to call uc() separately for sprintf("%x")
      as sprintf("%X") is available.
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      1b67bef2
    • J
      Merge branch 'as/pre-push-hook' · bb9a6969
      Junio C Hamano 提交于
      Add an extra hook so that "git push" that is run without making
      sure what is being pushed is sane can be checked and rejected (as
      opposed to the user deciding not pushing).
      
      * as/pre-push-hook:
        Add sample pre-push hook script
        push: Add support for pre-push hooks
        hooks: Add function to check if a hook exists
      bb9a6969
    • J
      Merge branch 'ch/add-auto-submitted-in-sample-post-receive-email' · 86db7464
      Junio C Hamano 提交于
      * ch/add-auto-submitted-in-sample-post-receive-email:
        Add Auto-Submitted header to post-receive-email
      86db7464
    • J
      Merge branch 'as/check-ignore' · a39b15b4
      Junio C Hamano 提交于
      Add a new command "git check-ignore" for debugging .gitignore
      files.
      
      The variable names may want to get cleaned up but that can be done
      in-tree.
      
      * as/check-ignore:
        clean.c, ls-files.c: respect encapsulation of exclude_list_groups
        t0008: avoid brace expansion
        add git-check-ignore sub-command
        setup.c: document get_pathspec()
        add.c: extract new die_if_path_beyond_symlink() for reuse
        add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse
        pathspec.c: rename newly public functions for clarity
        add.c: move pathspec matchers into new pathspec.c for reuse
        add.c: remove unused argument from validate_pathspec()
        dir.c: improve docs for match_pathspec() and match_pathspec_depth()
        dir.c: provide clear_directory() for reclaiming dir_struct memory
        dir.c: keep track of where patterns came from
        dir.c: use a single struct exclude_list per source of excludes
      
      Conflicts:
      	builtin/ls-files.c
      	dir.c
      a39b15b4
    • J
      Merge branch 'rs/clarify-entry-cmp-sslice' · f12e49ae
      Junio C Hamano 提交于
      * rs/clarify-entry-cmp-sslice:
        refs: use strncmp() instead of strlen() and memcmp()
      f12e49ae
    • J
      Merge branch 'jk/suppress-clang-warning' · fa2f83c6
      Junio C Hamano 提交于
      * jk/suppress-clang-warning:
        fix clang -Wunused-value warnings for error functions
      fa2f83c6
    • J
      Merge branch 'cr/push-force-tag-update' · d82dd269
      Junio C Hamano 提交于
      Regression fix to stop "git push" complaining "target ref already
      exists", when it is not the real reason the command rejected the
      request (e.g. non-fast-forward).
      
      * cr/push-force-tag-update:
        push: fix "refs/tags/ hierarchy cannot be updated without --force"
      d82dd269
    • J
      Merge branch 'mh/imap-send-shrinkage' · a29e7118
      Junio C Hamano 提交于
      Remove a lot of unused code from "git imap-send".
      
      * mh/imap-send-shrinkage:
        imap-send.c: simplify logic in lf_to_crlf()
        imap-send.c: fold struct store into struct imap_store
        imap-send.c: remove unused field imap_store::uidvalidity
        imap-send.c: use struct imap_store instead of struct store
        imap-send.c: remove unused field imap_store::trashnc
        imap-send.c: remove namespace fields from struct imap
        imap-send.c: remove struct imap argument to parse_imap_list_l()
        imap-send.c: inline parse_imap_list() in parse_list()
        imap-send.c: remove some unused fields from struct store
        imap-send.c: remove struct message
        imap-send.c: remove struct store_conf
        iamp-send.c: remove unused struct imap_store_conf
        imap-send.c: remove struct msg_data
        imap-send.c: remove msg_data::flags, which was always zero
      a29e7118
    • J
      Merge branch 'mo/cvs-server-updates' · 6a3d05da
      Junio C Hamano 提交于
      Various git-cvsserver updates.
      
      * mo/cvs-server-updates:
        t9402: Use TABs for indentation
        t9402: Rename check.cvsCount and check.list
        t9402: Simplify git ls-tree
        t9402: Add missing &&; Code style
        t9402: No space after IO-redirection
        t9402: Dont use test_must_fail cvs
        t9402: improve check_end_tree() and check_end_full_tree()
        t9402: sed -i is not portable
        cvsserver Documentation: new cvs ... -r support
        cvsserver: add t9402 to test branch and tag refs
        cvsserver: support -r and sticky tags for most operations
        cvsserver: Add version awareness to argsfromdir
        cvsserver: generalize getmeta() to recognize commit refs
        cvsserver: implement req_Sticky and related utilities
        cvsserver: add misc commit lookup, file meta data, and file listing functions
        cvsserver: define a tag name character escape mechanism
        cvsserver: cleanup extra slashes in filename arguments
        cvsserver: factor out git-log parsing logic
      6a3d05da
    • J
      Merge branch 'jc/makefile-perl-python-path-doc' · f55cb042
      Junio C Hamano 提交于
      * 'jc/makefile-perl-python-path-doc':
        Makefile: add description on PERL/PYTHON_PATH
      f55cb042
    • J
      Merge git://ozlabs.org/~paulus/gitk · ec3ae6ec
      Junio C Hamano 提交于
      * git://ozlabs.org/~paulus/gitk:
        gitk: Display important heads even when there are many
        gitk: Improve display of list of nearby tags and heads
        gitk: Fix display of branch names on some commits
        gitk: Update Swedish translation (296t)
        gitk: When searching, only highlight files when in Patch mode
        gitk: Fix error message when clicking on a connecting line
        gitk: Fix crash when not using themed widgets
        gitk: Use bindshiftfunctionkey to bind Shift-F5
        gitk: Refactor code for binding modified function keys
        gitk: Work around empty back and forward images when buttons are disabled
        gitk: Highlight first search result immediately on incremental search
        gitk: Highlight current search hit in orange
        gitk: Synchronize highlighting in file view when scrolling diff
      ec3ae6ec
  4. 23 1月, 2013 5 次提交
    • J
      Merge branch 'jc/merge-blobs' · 9591fcc6
      Junio C Hamano 提交于
      * jc/merge-blobs:
        Makefile: Replace merge-file.h with merge-blobs.h in LIB_H
      9591fcc6
    • R
      Makefile: Replace merge-file.h with merge-blobs.h in LIB_H · a60521bc
      Ramsay Jones 提交于
      Commit fa2364ec ("Which merge_file() function do you mean?", 06-12-2012)
      renamed the files merge-file.[ch] to merge-blobs.[ch], but forgot to
      rename the header file in the definition of the LIB_H macro.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a60521bc
    • J
      Update draft release notes to 1.8.2 · c4ada628
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c4ada628
    • J
      Merge branch 'mz/reset-misc' · 772f8113
      Junio C Hamano 提交于
      Various 'reset' optimizations and clean-ups, followed by a change
      to allow "git reset" to work even on an unborn branch.
      
      * mz/reset-misc:
        reset: update documentation to require only tree-ish with paths
        reset [--mixed]: use diff-based reset whether or not pathspec was given
        reset: allow reset on unborn branch
        reset $sha1 $pathspec: require $sha1 only to be treeish
        reset.c: inline update_index_refresh()
        reset.c: finish entire cmd_reset() whether or not pathspec is given
        reset [--mixed]: only write index file once
        reset.c: move lock, write and commit out of update_index_refresh()
        reset.c: move update_index_refresh() call out of read_from_tree()
        reset.c: replace switch by if-else
        reset: avoid redundant error message
        reset --keep: only write index file once
        reset.c: share call to die_if_unmerged_cache()
        reset.c: extract function for updating {ORIG_,}HEAD
        reset.c: remove unnecessary variable 'i'
        reset.c: extract function for parsing arguments
        reset: don't allow "git reset -- $pathspec" in bare repo
        reset.c: pass pathspec around instead of (prefix, argv) pair
        reset $pathspec: exit with code 0 if successful
        reset $pathspec: no need to discard index
      772f8113
    • J
      Merge branch 'nd/fix-directory-attrs-off-by-one' · 9a9f243f
      Junio C Hamano 提交于
      Fix performance regression introduced by an earlier change to let
      attributes apply to directories.
      
      Needs to be merged to maint, as 94bc671a was merged there already.
      
      * nd/fix-directory-attrs-off-by-one:
        attr: avoid calling find_basename() twice per path
        attr: fix off-by-one directory component length calculation
      9a9f243f
  5. 22 1月, 2013 8 次提交
    • J
      Merge branch 'pw/p4-branch-fixes' · 801cbd7c
      Junio C Hamano 提交于
      Fix "git p4" around branch handling.
      
      * pw/p4-branch-fixes:
        git p4: fix submit when no master branch
        git p4 test: keep P4CLIENT changes inside subshells
        git p4: fix sync --branch when no master branch
        git p4: fail gracefully on sync with no master branch
        git p4: rearrange self.initialParent use
        git p4: allow short ref names to --branch
        git p4 doc: fix branch detection example
        git p4: clone --branch should checkout master
        git p4: verify expected refs in clone --bare test
        git p4: create p4/HEAD on initial clone
        git p4: inline listExistingP4GitBranches
        git p4: add comments to p4BranchesInGit
        git p4: rearrange and simplify hasOrigin handling
        git p4: test sync/clone --branch behavior
      801cbd7c
    • J
      Merge branch 'mh/remote-hg-mode-bits-fix' · 864b5c41
      Junio C Hamano 提交于
      Update to the Hg remote helper (in contrib/).
      
      * mh/remote-hg-mode-bits-fix:
        remote-hg: fix handling of file perms when pushing
      864b5c41
    • J
      Merge branch 'fc/remote-hg-fixup-url' · 9a69ef1e
      Junio C Hamano 提交于
      Update to the Hg remote helper (in contrib/).
      
      * fc/remote-hg-fixup-url:
        remote-hg: store converted URL
      9a69ef1e
    • J
      Merge branch 'zk/clean-report-failure' · aa0ae510
      Junio C Hamano 提交于
      "git clean" states what it is going to remove and then goes on to
      remove it, but sometimes it only discovers things that cannot be
      removed after recursing into a directory, which makes the output
      confusing and even wrong.
      
      * zk/clean-report-failure:
        git-clean: Display more accurate delete messages
      aa0ae510
    • J
      Merge branch 'ph/rebase-preserve-all-merges' · 51c6de2b
      Junio C Hamano 提交于
      An earlier change to add --keep-empty option broke "git rebase
      --preserve-merges" and lost merge commits that end up being the
      same as its parent.
      
      * ph/rebase-preserve-all-merges:
        rebase --preserve-merges: keep all merge commits including empty ones
      51c6de2b
    • J
      Merge branch 'nd/clone-no-separate-git-dir-with-bare' · 68434e28
      Junio C Hamano 提交于
      Forbid a useless combination of options to "git clone".
      
      * nd/clone-no-separate-git-dir-with-bare:
        clone: forbid --bare --separate-git-dir <dir>
      68434e28
    • J
      Merge branch 'maint' · e9abef62
      Junio C Hamano 提交于
      * maint:
        git-for-each-ref.txt: 'raw' is a supported date format
      e9abef62
    • J
      git-for-each-ref.txt: 'raw' is a supported date format · b344bb19
      John Keeping 提交于
      Commit 7dff9b30 (Support 'raw' date format) added a raw date format.
      Update the git-for-each-ref documentation to include this.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b344bb19
  6. 21 1月, 2013 9 次提交