l10n: Initial Portuguese Portugal (pt_PT) language #9

Closed
wants to merge 273 commits into
from
This pull request is big! We’re only showing the most recent 250 commits.
Commits on Apr 26, 2009
  1. @apenwarr
  2. @apenwarr

    test.sh tweak

    apenwarr committed Apr 26, 2009
  3. @apenwarr

    Trim some extra merge commits that don't need to go into the split tree.

    apenwarr committed Apr 26, 2009
    ...and update test.sh to test for this.
  4. @apenwarr

    Only copy a commit if it has at least one nonidentical parent.

    apenwarr committed Apr 26, 2009
    This is a simplification of the previous logic.  I don't *think* it'll break
    anything.
    
    Results in far fewer useless merge commmits when playing with gitweb in the
    git project:
    
    git subtree split --prefix=gitweb --annotate='(split) ' 0a8f4f0^^..f2e7330
    	--onto=1130ef3
    
    ...and it doesn't *seem* to eliminate anything important.
  5. @apenwarr
  6. @apenwarr

    Simplify merges even more aggressively.

    apenwarr committed Apr 26, 2009
    If any one of the parents is the same as the current one, then clearly the
    other parent branch isn't important, so throw it away entirely.
    
    Can't remember why I didn't do this before, but if I rediscover it, it
    definitely needs a unit test.
  7. @apenwarr

    test.sh: oops, never intended to count the raw number of commits.

    apenwarr committed Apr 26, 2009
    Just needed to make sure the count was non-zero.
  8. @apenwarr

    debug messages are off by default; use -d to enable.

    apenwarr committed Apr 26, 2009
    Instead of debug messages, we print a progress counter to stderr.
Commits on May 1, 2009
  1. @apenwarr

    Abort if --rejoin fails.

    apenwarr committed May 1, 2009
    Thanks to Eduardo Kienetz for noticing this.
Commits on May 24, 2009
  1. @apenwarr
Commits on May 30, 2009
  1. @apenwarr

    typo in comment

    apenwarr committed May 30, 2009
  2. @apenwarr

    New --branch option to split command.

    apenwarr committed May 30, 2009
    This is just a handy way to create a new branch from the newly-split subtree.
  3. @apenwarr
  4. @apenwarr

    FIXME help for --squash option

    apenwarr committed May 30, 2009
  5. @apenwarr
  6. @apenwarr

    Basic "subtree merge --squash" support.

    apenwarr committed May 30, 2009
    Instead of merging in the history of the entire subproject, just squash it
    all into one commit, but try to at least track which commits we used so that
    we can do future merges correctly.
    
    Bonus feature: we can actually switch branches of the subproject this way,
    just by "squash merging" back and forth from one tag to another.
  7. @apenwarr
  8. @apenwarr
  9. @apenwarr
  10. @apenwarr
  11. @apenwarr
Commits on Jun 15, 2009
  1. @apenwarr

    update todo

    apenwarr committed Jun 15, 2009
Commits on Jul 2, 2009
  1. @apenwarr
Commits on Jul 7, 2009
  1. @apenwarr

    todo

    apenwarr committed Jul 7, 2009
Commits on Jul 9, 2009
  1. @apenwarr

    Docs: when pushing to github, the repo path needs to end in .git

    apenwarr committed Jul 9, 2009
    Reported by Thell Fowler.
Commits on Jul 10, 2009
  1. @apenwarr

    todo

    apenwarr committed Jul 10, 2009
Commits on Jul 16, 2009
  1. @apenwarr

    todo^

    apenwarr committed Jul 16, 2009
Commits on Aug 1, 2009
  1. @apenwarr

    todo

    apenwarr committed Aug 1, 2009
Commits on Aug 2, 2009
  1. @apenwarr
Commits on Aug 12, 2009
  1. @amiel

    fixed order of assertion in tests

    amiel committed Aug 12, 2009
  2. @amiel
Commits on Aug 20, 2009
  1. @gipi @apenwarr

    Add explicit path of git installation by 'git --exec-path'.

    gipi committed with apenwarr Aug 20, 2009
    As pointed out by documentation, the correct use of 'git-sh-setup' is
    using $(git --exec-path) to avoid problems with not standard
    installations.
    
    Signed-off-by: gianluca.pacchiella <pacchiel@studenti.ph.unito.it>
Commits on Aug 26, 2009
  1. @apenwarr

    Improve patch to use git --exec-path: add to PATH instead.

    apenwarr committed Aug 26, 2009
    If you (like me) are using a modified git straight out of its source
    directory (ie. without installing), then --exec-path isn't actually correct.
    Add it to the PATH instead, so if it is correct, it'll work, but if it's
    not, we fall back to the previous behaviour.
  2. @apenwarr

    Fix behaviour if you have a branch named the same as your --prefix

    apenwarr committed Aug 26, 2009
    We were trying to 'git checkout $prefix', which is ambiguous if $prefix
    names a directory *and* a branch.  Do 'git checkout -- $prefix' instead.
    
    The main place this appeared was in 'git subtree add'.
    
    Reported by several people.
Commits on Sep 30, 2009
  1. @voxpelli

    Check that the type of the tree really is a tree and not a commit as …

    voxpelli committed Sep 30, 2009
    …it seems to sometimes become when eg. a submodule has existed in the same position previously.
Commits on Oct 2, 2009
  1. @apenwarr

    Add a README that says to email me instead of using github mail.

    apenwarr committed Oct 2, 2009
    What's with this new generation who hates email so much?
  2. @apenwarr

    Merge branch 'master' of git://github.com/voxpelli/git-subtree

    apenwarr committed Oct 2, 2009
    * 'master' of git://github.com/voxpelli/git-subtree:
      Check that the type of the tree really is a tree and not a commit as it seems to sometimes become when eg. a submodule has existed in the same position previously.
  3. @apenwarr

    If someone provides a --prefix that ends with slash, strip the slash.

    apenwarr committed Oct 2, 2009
    Prefixes that differ only in the trailing slash should be considered
    identical.
    
    Also update the test to check that this works.
  4. @apenwarr

    Fix a minor problem in identifying squashes vs. normal splits.

    apenwarr committed Oct 2, 2009
    This didn't seem to have any noticeable side effects other than
    suspicious-looking log messages when you used -d.
  5. @apenwarr

    cmd_pull didn't support --squash correctly.

    apenwarr committed Oct 2, 2009
    We should implement it as
    	git fetch ...
    	git subtree merge ...
    
    But we were instead just calling
    	git pull -s subtree ...
    
    because 'git subtree merge' used to be just an alias for 'git merge -s
    subtree', but it no longer is.
Commits on Nov 4, 2009
  1. @apenwarr
Commits on Nov 15, 2009
  1. @apenwarr

    Oops, forgot a COPYING file. It's GPLv2.

    apenwarr committed Nov 15, 2009
    Thanks to Ben Walton for pointing this out.
  2. @apenwarr

    add installation support to Makefile

    Ben Walton committed with apenwarr Nov 14, 2009
    Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
  3. @apenwarr

    make git version dynamic when building documentation

    Ben Walton committed with apenwarr Nov 14, 2009
    Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Commits on Nov 21, 2009
  1. @apenwarr
Commits on Jan 6, 2010
  1. @mackuba

    added -p alias for --prefix

    mackuba committed Jan 6, 2010
Commits on Jan 10, 2010
  1. @mackuba
  2. @mackuba
  3. @mackuba
Commits on Jan 12, 2010
  1. @mackuba
  2. @mackuba
  3. @mackuba

    added tests for recent changes

    mackuba committed Jan 12, 2010
  4. @mackuba
  5. @mackuba
Commits on Feb 2, 2010
  1. @apenwarr

    Fix refspecs in given example for git subtree pull.

    Arlen Cuss committed with apenwarr Jan 19, 2010
    (Updated slightly by apenwarr)
  2. @apenwarr

    Merge branch 'master' of git://github.com/psionides/git-subtree

    apenwarr committed Feb 2, 2010
    * 'master' of git://github.com/psionides/git-subtree:
      improved rev_is_descendant_of_branch() function
      added temporary test dirs to gitignore
      added tests for recent changes
      fixed bug in commit message for split
      changed alias for --prefix from -p to -P
      fix for subtree split not finding proper base for new commits
      allow using --branch with existing branches if it makes sense
      added -m/--message option for setting merge commit message
      added -p alias for --prefix
  3. @apenwarr

    Jakub's changes broke the progress message slightly.

    apenwarr committed Feb 2, 2010
    We really need that ^M (\r), not a ^J (\n) if we want the status message to
    overwrite itself nicely.
Commits on Feb 6, 2010
  1. @treese @apenwarr
  2. @treese @apenwarr

    Make sure that <prefix> exists when splitting.

    treese committed with apenwarr Feb 6, 2010
    And test cases for that check, as well as for an error if no prefix is
    specified at all.
  3. @apenwarr

    Make tests pass with recent git (1.7.0 and up).

    apenwarr committed Feb 6, 2010
    It seems that in older versions, --message="" was interpreted as "use the
    default commit message" instead of "use an empty commit message", and
    git-subtree was depending on this behaviour.  Now we don't, so tests pass
    again.
Commits on Feb 8, 2010
  1. @apenwarr

    Improve checking for existence of the --prefix directory.

    apenwarr committed Feb 8, 2010
    For add, the prefix must *not* already exist.  For all the other commands,
    it *must* already exist.
Commits on Feb 9, 2010
  1. @apenwarr

    Oops. Apparently I didn't run 'make test' after most recent change.

    apenwarr committed Feb 9, 2010
    Thanks to Dan Sabath for pointing that out.
  2. @apenwarr

    Some recent tests accidentally depended on very new versions of git.

    apenwarr committed Feb 9, 2010
    The "--format" option is too new.  Use "--pretty=format:" (which means the
    same thing) instead.  Now it works again on git 1.6.0 (at least).
  3. @kiyose @apenwarr

    docs: add simple 'add' case to clarify setup.

    kiyose committed with apenwarr Feb 9, 2010
    This patch adds a simple use case for adding a library to an existing
    repository.
    
    Signed-off-by: Dan Sabath <dsabath@whitepages.com>
  4. @kiyose @apenwarr

    Docs: cleaning up example textual redundancy

    kiyose committed with apenwarr Feb 9, 2010
    Signed-off-by: Dan Sabath <dsabath@whitepages.com>
Commits on Feb 13, 2010
  1. @apenwarr

    Added new 'push' command and 2-parameter form of 'add'.

    Wayne Walter committed with apenwarr Feb 13, 2010
    Now you can do:
    
    	git subtree add --prefix=whatever git://wherever branchname
    
    to add a new branch, instead of rather weirdly having to do 'git fetch'
    first.  You can also split and push in one step:
    
    	git subtree push --prefix=whatever git://wherever newbranch
    
    (Somewhat cleaned up by apenwarr.)
Commits on May 7, 2010
  1. @voxpelli @apenwarr

    Use 'git merge -Xsubtree' when git version >= 1.7.0.

    voxpelli committed with apenwarr May 7, 2010
    It's possible to specify the subdir of a subtree since Git 1.7.0 - adding
    support for that functionality to make the merge more stable.
    
    Also checking for git version - now only uses the new subtree subdir option
    when on at least 1.7.
Commits on May 20, 2010
  1. @voxpelli

    Fixed regression with splitting out new subtree

    voxpelli committed May 20, 2010
    A folder in a repository that wasn't initially imported as a  subtree could no longer be splitted into an entirely new subtree with no parent.
    
    A fix and a new test to fix that regression is added here.
Commits on Jun 24, 2010
  1. @apenwarr

    (Hopefully) fix PATH setting for msysgit.

    apenwarr committed Jun 24, 2010
    Reported by Evan Shaw.  The problem is that $(git --exec-path) includes a
    'git' binary which is incompatible with the one in /usr/bin; if you run it,
    it gives you an error about libiconv2.dll.
    
    You might think we could just add $(git --exec-path) at the *end* of PATH,
    but then if there are multiple versions of git installed, we could end up
    with the wrong one; earlier versions used to put git-sh-setup in /usr/bin,
    so we'd pick up that one before the new one.
    
    So now we just set PATH back to its original value right after running
    git-sh-setup, and we should be okay.
  2. @apenwarr

    Merge remote branch 'origin/master'

    apenwarr committed Jun 24, 2010
    * origin/master:
      Fixed regression with splitting out new subtree
      Use 'git merge -Xsubtree' when git version >= 1.7.0.
  3. @apenwarr

    Another fix for PATH and msysgit.

    apenwarr committed Jun 24, 2010
    Evan Shaw tells me the previous fix didn't work.  Let's use this one
    instead, which he says does work.
    
    This fix is kind of wrong because it will run the "correct" git-sh-setup
    *after* the one in /usr/bin, if there is one, which could be weird if you
    have multiple versions of git installed.  But it works on my Linux and his
    msysgit, so it's obviously better than what we had before.
Commits on Jul 21, 2010
  1. @bryanlarsen @apenwarr

    docs: simplify example 1

    bryanlarsen committed with apenwarr Jul 21, 2010
    The documentation was written prior to Wayne Walter's 2-parameter add.
    Using 2-parameter add in example 1 makes the example much simpler.
Commits on Aug 12, 2010
  1. @apenwarr

    Fix typo: an -> a

    apenwarr committed Aug 12, 2010
    Thanks to Vanuan on github.
Commits on Oct 21, 2010
  1. @cstanfield @apenwarr

    Fixing eval syntax error.

    cstanfield committed with apenwarr Sep 13, 2010
  2. @Vanuan @apenwarr

    docs: Description, synopsys, options and examples changes.

    Vanuan committed with apenwarr Aug 12, 2010
    Description: Made the difference from submodules and the subtree
    merge strategy clearer.
    
    Synopsys and options: Synchronize with 'git subtree -h' output.
    I hope, properly.
    
    Examples: Added example descriptions in captions. Small fixes.
    
    Signed-off-by: John Yani <vanuan@gmail.com>
  3. @apenwarr
Commits on Nov 10, 2010
  1. @jessegreenwald @apenwarr

    Split cmd now processes commits in topo order.

    jessegreenwald committed with apenwarr Nov 9, 2010
    Added the "--topo-order" option to git rev-list.  Without this, it seems that
    the revision list is coming back in reverse order but it is sorted
    chronologically.  This does not gurantee that parent commits are handled
    before child commits.
  2. @jessegreenwald @apenwarr

    Added check to order of processed commits.

    jessegreenwald committed with apenwarr Nov 10, 2010
    With debug messages enabled, "incorrect order" will be output whenever a
    commit is processed before its parents have been processed.  This can be
    determined by checking to see if a parent isn't mapped to a new commit, but
    it has been processed.
Commits on Mar 1, 2011
  1. @apenwarr

    It's also okay if an expected tree object is actually a commit.

    apenwarr committed Mar 1, 2011
    ...that happens with submodules sometimes, so don't panic.
    
    Reported by Sum-Wai Low.
  2. @apenwarr

    Skip commit objects that should be trees, rather than copying them.

    apenwarr committed Mar 1, 2011
    An improvement on the previous patch, based on more reports from Sum-Wai
    Low.
Commits on Jan 3, 2012
  1. @gitster

    perl/Git.pm: "prompt" helper to honor GIT_ASKPASS and SSH_ASKPASS

    Sven Strickroth committed with gitster Dec 28, 2011
    git-svn reads passwords from an interactive terminal or by using
    GIT_ASKPASS helper tool. But if GIT_ASKPASS environment variable is not
    set, git-svn does not try to use SSH_ASKPASS as git-core does. This
    cause GUIs (w/o STDIN connected) to hang waiting forever for git-svn to
    complete (http://code.google.com/p/tortoisegit/issues/detail?id=967).
    
    Earlier, 56a853b (git-svn: Support retrieving passwords with GIT_ASKPASS,
    2010-03-02) tried to solve this issue, but was incomplete as described
    above.
    
    Instead of using hand-rolled prompt-response code that only works with the
    interactive terminal and uses GIT_ASKPASS, introduce prompt() helper
    function in Git.pm library that also pays attention to SSH_ASKPASS as a
    fallback, and use it in git-svn. The result mimics the behaviour of the
    core git better.
    
    Signed-off-by: Sven Strickroth <email@cs-ware.de>
    Helped-by: Ævar Arnfjörð Bjarmason
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    git-svn, perl/Git.pm: extend Git::prompt helper for querying users

    Sven Strickroth committed with gitster Jan 3, 2012
    git-svn reads usernames and other user queries from an interactive
    terminal. This cause GUIs to hang waiting forever for git-svn to complete
    (http://code.google.com/p/tortoisegit/issues/detail?id=967) if they are
    not connected to the terminal. Give *_ASKPASS helpers preference over
    terminal when asking for usernames in git-svn to work around this issue.
    
    This change is technically a small regression for users who have *_ASKPASS
    environment defined and expect the username to be read from the terminal;
    they now have to type their username to GUI helpers that are likely to be
    designed to read passwords without echoing. We may want to swap the
    precedence so that we try terminal first when we can to fix this, but that
    is outside the scope of this patch.
    
    Signed-off-by: Sven Strickroth <email@cs-ware.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 4, 2012
  1. @gitster

    fixup! 15eaaf4

    gitster committed Jan 4, 2012
Commits on Feb 11, 2012
  1. @greened

    Move Tests Into Subdirectory

    greened committed Jan 29, 2012
    Move the git-subtree tests into a "t" subdir to reflect how
    testing works at the top level.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
  2. @greened

    Rename Test

    greened committed Jan 29, 2012
    Rename the subtree test file to conform with git project conventions.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
  3. @greened

    Use Test Harness

    greened committed Jan 29, 2012
    Clean up the git-subtree tests to conform the git project conventions
    and use the existing test harness.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
Commits on Feb 19, 2012
  1. @gitster

    xdiff: remove XDL_PATCH_* macros

    gitster committed Feb 19, 2012
    These are not used anywhere in our codebase, and the bit assignment
    definition is merely confusing.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    xdiff: PATIENCE/HISTOGRAM are not independent option bits

    gitster committed Feb 19, 2012
    Because the default Myers, patience and histogram algorithms cannot be in
    effect at the same time, XDL_PATIENCE_DIFF and XDL_HISTOGRAM_DIFF are not
    independent bits.  Instead of wasting one bit per algorithm, define a few
    macros to access the few bits they occupy and update the code that access
    them.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 28, 2012
  1. @pclouds @gitster

    index-pack: split second pass obj handling into own function

    pclouds committed with gitster Feb 28, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 6, 2012
  1. @gitster

    unpack-trees: plug minor memory leak

    René Scharfe committed with gitster Mar 6, 2012
    The allocations made by unpack_nondirectories() using create_ce_entry()
    are never freed.
    
    In the non-merge case, we duplicate them using add_entry() and later
    only look at the first allocated element (src[0]), perhaps even only
    by mistake.  Split out the actual addition from add_entry() into the
    new helper do_add_entry() and call this non-duplicating function
    instead of add_entry() to avoid the leak.
    
    Valgrind reports this for the command "git archive v1.7.9" without
    the patch:
    
      ==13372== LEAK SUMMARY:
      ==13372==    definitely lost: 230,986 bytes in 2,325 blocks
      ==13372==    indirectly lost: 0 bytes in 0 blocks
      ==13372==      possibly lost: 98 bytes in 1 blocks
      ==13372==    still reachable: 2,259,198 bytes in 3,243 blocks
      ==13372==         suppressed: 0 bytes in 0 blocks
    
    And with the patch applied:
    
      ==13375== LEAK SUMMARY:
      ==13375==    definitely lost: 65 bytes in 1 blocks
      ==13375==    indirectly lost: 0 bytes in 0 blocks
      ==13375==      possibly lost: 0 bytes in 0 blocks
      ==13375==    still reachable: 2,364,417 bytes in 3,245 blocks
      ==13375==         suppressed: 0 bytes in 0 blocks
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 7, 2012
  1. @gitster

    streaming: make streaming-write-entry to be more reusable

    gitster committed Mar 7, 2012
    The static function in entry.c takes a cache entry and streams its blob
    contents to a file in the working tree.  Refactor the logic to a new API
    function stream_blob_to_fd() that takes an object name and an open file
    descriptor, so that it can be reused by other callers.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @pclouds @gitster

    Add more large blob test cases

    pclouds committed with gitster Mar 7, 2012
    New test cases list commands that should work when memory is
    limited. All memory allocation functions (*) learn to reject any
    allocation larger than $GIT_ALLOC_LIMIT if set.
    
    (*) Not exactly all. Some places do not use x* functions, but
    malloc/calloc directly, notably diff-delta. These code path should
    never be run on large blobs.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @pclouds @gitster

    cat-file: use streaming API to print blobs

    pclouds committed with gitster Mar 7, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @pclouds @gitster

    parse_object: avoid putting whole blob in core

    pclouds committed with gitster Mar 7, 2012
    Traditionally, all the callers of check_sha1_signature() first
    called read_sha1_file() to prepare the whole object data in core,
    and called this function.  The function is used to revalidate what
    we read from the object database actually matches the object name we
    used to ask for the data from the object database.
    
    Update the API to allow callers to pass NULL as the object data, and
    have the function read and hash the object data using streaming API
    to recompute the object name, without having to hold everything in
    core at the same time.  This is most useful in parse_object() that
    parses a blob object, because this caller does not have to keep the
    actual blob data around in memory after a "struct blob" is returned.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @pclouds @gitster

    show: use streaming API for showing blobs

    pclouds committed with gitster Mar 7, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @pclouds @gitster

    fsck: use streaming API for writing lost-found blobs

    pclouds committed with gitster Mar 7, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @pclouds @gitster

    update-server-info: respect core.bigfilethreshold

    pclouds committed with gitster Mar 7, 2012
    This command indirectly calls check_sha1_signature() (add_info_ref ->
    deref_tag -> parse_object -> ..) , which may put whole blob in memory
    if the blob's size is under core.bigfilethreshold. As config is not
    read, the threshold is always 512MB. Respect user settings here.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. @jhance @gitster

    apply: do not leak patches and fragments

    jhance committed with gitster Mar 7, 2012
    In the while loop inside apply_patch, patch and fragments are
    dynamically allocated with a calloc. However, only unused patches
    are actually freed and the rest are left to leak. Since a list is
    actively built up consisting of the used patches, they can simply be
    iterated and freed at the end of the function.
    
    In addition, the text in fragments were not freed, primarily because
    they mostly point into a patch text that is freed as a whole. But
    there are some cases where new piece of memory is allocated and
    pointed by a fragment (namely, when handling a binary patch).
    
    Introduce a free_patch bitfield to mark each fragment if its text
    needs to be freed, and free patches, fragments and fragment text
    that need to be freed when we are done with the input.
    
    Signed-off-by: Jared Hance <jaredhance@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 10, 2012
  1. @moy @gitster

    push: start warning upcoming default change for push.default

    moy committed with gitster Mar 9, 2012
    In preparation for flipping the default to the "upstream" mode from
    the "matching" mode that is the historical default, start warning
    users when they rely on unconfigured "git push" to default to the
    "matching" mode.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 11, 2012
  1. @gitster

    ident.c: add split_ident_line() to parse formatted ident line

    gitster committed Mar 11, 2012
    The commit formatting logic format_person_part() in pretty.c
    implements the logic to split an author/committer ident line into
    its parts, intermixed with logic to compute its output using these
    piece it computes.
    
    Separate the former out to a helper function split_ident_line() so
    that other codepath can use the same logic, and rewrite the function
    using the helper function.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    t7503: does pre-commit-hook learn authorship?

    gitster committed Mar 11, 2012
    When "--author" option is used to lie the authorship to "git commit"
    command, hooks should learn the author name and email just like when
    GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables are used
    to lie the authorship.  Test this.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    commit: pass author/committer info to hooks

    gitster committed Mar 11, 2012
    When lying the author name via GIT_AUTHOR_NAME environment variable
    to "git commit", the hooks run by the command saw it and could act
    on the name that will be recorded in the final commit. When the user
    uses the "--author" option from the command line, the command should
    give the same information to the hook, and back when "git command"
    was a scripted Porcelain, it did set the environment variable and
    hooks can learn the author name from it.
    
    However, when the command was reimplemented in C, the rewritten code
    was not very faithful to the original, and hooks stopped getting the
    authorship information given with "--author".  Fix this by exporting
    the necessary environment variables.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    run_hook(): enhance the interface to pass arbitrary environment

    gitster committed Mar 11, 2012
    Originally "run_hook()" that used to live in builtin/commit.c had a
    perfectly appropriate API and name for a private function to spawn a
    hook from "git commit" command. The only necessary tweak in the
    context was to optionally specify which file to use as the index
    file.
    
    But then we stupidly moved this private API to run-command.c without
    making the interface suitable for general consumption, and there is
    no way to tweak environment variables other than GIT_INDEX_FILE when
    running a hook.
    
    Correct this mistake by adding run_hook_e() that takes an array of
    environment variables.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 12, 2012
  1. @pclouds @gitster

    index-pack: support multithreaded delta resolving

    pclouds committed with gitster Mar 12, 2012
    This puts delta resolving on each base on a separate thread, one base
    cache per thread. Per-thread data is grouped in struct thread_local.
    When running with nr_threads == 1, no pthreads calls are made. The
    system essentially runs in non-thread mode.
    
    An experiment on a Xeon 24 core machine with linux-2.6.git shows that
    performance does not increase proportional to the number of cores. So
    by default, we use maximum 3 cores. Some numbers with --threads from 1
    to 16:
    
    1..4
    real    1m16.310s  0m48.183s  0m37.866s  0m32.834s
    user    1m13.773s  1m15.537s  1m15.781s  1m16.233s
    sys     0m2.480s   0m3.936s   0m4.448s   0m4.852s
    
    5..8
    real    0m33.170s  0m30.369s  0m28.406s  0m26.968s
    user    1m31.474s  1m30.322s  1m29.562s  1m28.694s
    sys     0m6.096s   0m6.268s   0m6.684s   0m7.172s
    
    9..12
    real    0m26.288s  0m26.207s  0m26.239s  0m24.945s
    user    1m29.530s  1m36.146s  1m43.134s  1m34.182s
    sys     0m8.129s   0m8.437s   0m9.697s   0m10.201s
    
    13..16
    real    0m25.110s  0m25.043s  0m23.955s  0m25.746s
    user    1m39.262s  1m43.598s  1m38.350s  1m59.775s
    sys     0m10.997s  0m11.553s  0m11.949s  0m13.689s
    
    Thanks to Ramsay Jones for troubleshooting on MinGW platform.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 13, 2012
  1. @jrn @gitster

    test: use test_i18ncmp when checking --stat output

    jrn committed with gitster Mar 13, 2012
    Ever since v1.7.9.2~13 (2012-02-01), git's diffstat-style summary line
    produced by "git apply --stat", "git diff --stat", and "git commit"
    varies by locale, producing test failures when GETTEXT_POISON is set.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @jrn @gitster

    test: use numstat instead of diffstat in funny-names test

    jrn committed with gitster Mar 13, 2012
    This test script checks that git's plumbing commands quote filenames
    with special characters like space, tab, and double-quote
    appropriately in their input and output.
    
    Since commit v1.7.9.2~13 (Use correct grammar in diffstat summary
    line, 2012-02-01), the final "1 file changed, 1 insertion(+)" line
    from diffstats is translatable, meaning tests that rely on exact "git
    apply --stat" output have to be skipped when git is not configured to
    produce output in the C locale (for example, when GETTEXT_POISON is
    enabled).  So:
    
     - Tweak the three "git apply --stat" tests that check "git apply"'s
       input parsing to use --numstat instead.
    
       --numstat output is more reliable, does not vary with locale, and
       is itself easier to parse.  These tests are mainly about how "git
       apply" parses its input so this should not result in much loss of
       coverage.
    
     - Add a new "apply --stat" test to check the quoting in --stat output
       format.
    
    This wins back a little of the test coverage lost with the patch
    "test: use test_i18ncmp to check --stat output" when GETTEXT_POISON is
    enabled.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @jrn @gitster

    test: modernize funny-names test style

    jrn committed with gitster Mar 13, 2012
    This is one of the early tests, so it uses a style that by modern
    standards can be hard to read.  Tweak it to:
    
     - clearly declare what assertion each test is designed to check
    
     - mark tests that create state later tests will depend on with the
       word "setup" so people writing or running tests know the others
       can be skipped or reordered safely
    
     - put commands that populate a file with expected output inside
       the corresponding test stanza, so it is easier to see by eye
       where each test begins and ends
    
     - instead of pipelines, use commands that read and write a
       temporary file, so bugs causing commands to segfault or produce
       the wrong exit status can be caught.
    
    More cosmetic changes:
    
     - put the opening quote starting each test on the same line as the
       test_expect_* invocation, and indent the commands in each test
       with a single tab
    
     - end the test early if the underlying filesystem cannot
       accomodate the filenames we use, instead of marking all tests
       with the same TABS_IN_FILENAMES prerequisite.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @jrn @gitster

    test: test cherry-pick functionality and output separately

    jrn committed with gitster Mar 13, 2012
    Since v1.7.3-rc0~26^2~9 (revert: report success when using option
    --strategy, 2010-07-14), the cherry-pick-many-commits test checks the
    format of output written to the terminal during a cherry-pick sequence
    in addition to the functionality.  There is no reason those have to
    be checked in the same test, though, and it has some downsides:
    
     - when progress output is broken, the test result does not convey
       whether the functionality was also broken or not
    
     - it is not immediately obvious when reading that these checks are
       meant to prevent regressions in details of the output format and
       are not just a roundabout way to check functional details like the
       number of commits produced
    
     - there is a temptation to include the same kind of output checking
       for every new cherry-pick test, which would make future changes
       to the output unnecessarily difficult
    
    Put the tests from v1.7.3-rc0~26^2~9 in separate assertions, following
    the principle "test one feature at a time".
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @jrn @gitster

    test: use --numstat instead of --stat in "git stash show" tests

    jrn committed with gitster Mar 13, 2012
    git's diff --stat output is intended for human consumption and
    since v1.7.9.2~13 (2012-02-01) varies by locale.  Add a test checking
    that git stash show defaults to --stat and tweak the rest of the
    "stash show" tests that showed a diffstat to use numstat.
    
    This way, there are fewer tests to tweak if the diffstat format
    changes again.  This also improves test coverage when running tests
    with git configured not to write its output in the C locale (e.g.,
    via GETTEXT_POISON=Yes).
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @jrn @gitster

    test: use numstat instead of diffstat in binary-diff test

    jrn committed with gitster Mar 13, 2012
    git's --stat output is intended for humans and since v1.7.9.2~13
    (2012-02-01) varies by locale.  The tests in this script using "apply
    --stat" are meant to check two things:
    
     - how binary file changes are accounted for and printed in
       git's diffstat format
    
     - that "git apply" can parse the various forms of binary diff
    
    Split these two kinds of check into separate tests, and use --numstat
    instead of --stat in the latter.  This way, we lose less test coverage
    when git is being run without writing its output in the C locale (for
    example because GETTEXT_POISON is enabled) and there are fewer tests
    to change if the --stat output needs to be tweaked again.
    
    While at it, use commands separated by && that read and write to
    temporary files in place of pipelines so segfaults and other failures
    in the upstream of the processing pipeline don't get hidden.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @jrn @gitster

    diffstat summary line varies by locale: miscellany

    jrn committed with gitster Mar 13, 2012
    These changes are in the same spirit as the six patches that
    precede them, but they haven't been split into individually
    justifiable patches yet.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. @pclouds @gitster

    Add column layout skeleton and git-column

    pclouds committed with gitster Mar 13, 2012
    A column option string consists of many token separated by either
    a space or a  comma. A token belongs to one of three groups:
    
     - enabling: always, never and auto
     - layout mode: currently plain (which does not layout at all)
     - other future tuning flags
    
    git-column can be used to pipe output to from a command that wants
    column layout, but not to mess with its own output code. Simpler output
    code can be changed to use column layout code directly.
    
    Thanks-to: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. @pclouds @gitster

    Stop starting pager recursively

    pclouds committed with gitster Mar 13, 2012
    git-column can be used as a pager for other git commands, something
    like this:
    
        GIT_PAGER="git -p column --mode='dense color'" git -p branch
    
    The problem with this is that "git -p column" also has $GIT_PAGER set so
    the pager runs itself again as another pager. The end result is an
    infinite loop of forking. Other git commands have the same problem if
    being abused this way.
    
    Check if $GIT_PAGER is already set and stop launching another pager.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. @pclouds @gitster

    column: add columnar layout

    pclouds committed with gitster Mar 13, 2012
    COL_COLUMN and COL_ROW fill column by column (or row by row
    respectively), given the terminal width and how many space between
    columns. All cells have equal width.
    
    Strings are supposed to be in UTF-8. Valid ANSI escape strings are OK.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  11. @pclouds @gitster

    column: add dense layout support

    pclouds committed with gitster Mar 13, 2012
    Normally all cells (and in turn columns) share the same width. This
    layout mode can waste space because one long item can stretch our all
    columns.
    
    With COL_DENSE enabled, column width is calculated indepdendently. All
    columns are shrunk to minimum, then it attempts to push cells of the
    last row over to the next column with hope that everything still fits
    even there's one row less. The process is repeated until the new layout
    cannot fit in given width any more, or there's only one row left
    (perfect!).
    
    Apparently, this mode consumes more cpu than the old one, but it makes
    better use of terminal space. For layouting one or two screens, cpu
    usage should not be detectable.
    
    This patch introduces option handling code besides layout modes and
    enable/disable to expose this feature as "dense". The feature can be
    turned off by specifying "nodense".
    
    Thanks-to: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  12. @pclouds @gitster

    help: reuse print_columns() for help -a

    pclouds committed with gitster Mar 13, 2012
    "help -a" also respects column.ui (and column.help if presents)
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  13. @pclouds @gitster

    branch: add --column

    pclouds committed with gitster Mar 13, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  14. @pclouds @gitster

    status: add --column

    pclouds committed with gitster Mar 13, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  15. @pclouds @gitster

    column: support piping stdout to external git-column process

    pclouds committed with gitster Mar 13, 2012
    For too complicated output handling, it'd be easier to just spawn
    git-column and redirect stdout to it. This patch provides helpers
    to do that.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  16. @pclouds @gitster

    tag: add --column

    pclouds committed with gitster Mar 13, 2012
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  17. @pclouds @gitster

    ls-files: support --column

    pclouds committed with gitster Mar 13, 2012
    .. because ls-files is a good show case to the next patches..
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  18. @pclouds @gitster

    column: support "denser" mode

    pclouds committed with gitster Mar 13, 2012
    Sometimes a few long entries in the listing would stretch out columns,
    wasting space. If these entries are cut out, the columns could become
    smaller, hence more columns.
    
    This new mode does that by looking for the longest entry, if cutting the
    list before that entry results in much denser layout, then the entry
    will be cut out and printed in a separate line. The remaining will put
    in a new layout.
    
    Multiple tables with different column width might be unpleasant to
    look at, especially if the tables are really short. But on the other
    hand it could be quite handy. For example,
    "COLUMNS=80 ./git ls-files --column=dense -- '*.[ch]'" takes 415
    lines, while "denser" only takes 223 because it break the layout at
    contrib/credential/osxkeychain/git-credential-osxkeychain.c
    and relayout again:
    
    abspath.c                  builtin/rm.c
    advice.c                   builtin/send-pack.c
    <snip>
    builtin/rev-parse.c        connected.h
    builtin/revert.c           contrib/convert-objects/convert-objects.c
    
    contrib/credential/osxkeychain/git-credential-osxkeychain.c
    
    contrib/examples/builtin-fetch--tool.c refs.c                   xdiff/xutils.c
    contrib/svn-fe/svn-fe.c                refs.h                   xdiff/xutils.h
    convert.c                              remote-curl.c            zlib.c
    convert.h                              remote.c
    <snip>
    reflog-walk.c                          xdiff/xprepare.h
    reflog-walk.h                          xdiff/xtypes.h
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  19. @pclouds @gitster

    column: support grouping entries

    pclouds committed with gitster Mar 13, 2012
    If many entries share the same prefix (e.g. "git ls-files Documentation/"),
    cutting out the prefix helps put more information on the same space.
    
    If "group" is specified, the list of entries will be searched for
    largest non-overlapping rectangles of text. Estimation is done on each
    rectangle to see if there are any savings in rows if we group them.
    Groups are printed first, then the remaining as the last group.
    
    Handling the remaining part this way may not be ideal but I don't want
    to split all directories like "ls -R". That takes too many lines.
    Maybe I should prepend ".../" to all grouped items to make it clear
    they are grouped.  There's also problem with ansi escape codes that
    I'll need to handle if this sounds like a good way to go.
    
    This code may be used for diffstat too (e.g. when most of the diff is
    in Documentation/).
    
    For demonstration, this is what
    "COLUMNS=80 git ls-files --column=group -- '*.[ch]'" looks like
    
    builtin/:
    add.c                gc.c                 read-tree.c
    annotate.c           grep.c               receive-pack.c
    <snip>
    for-each-ref.c       prune.c              verify-tag.c
    fsck.c               push.c               write-tree.c
    
    compat/:
    basename.c                  regex/regexec.c
    bswap.h                     setenv.c
    <snip>
    regex/regex_internal.c      win32mmap.c
    regex/regex_internal.h      winansi.c
    
    contrib/:
    convert-objects/convert-objects.c
    credential/osxkeychain/git-credential-osxkeychain.c
    examples/builtin-fetch--tool.c
    svn-fe/svn-fe.c
    
    vcs-svn/:
    fast_export.c    line_buffer.h    sliding_window.c svndiff.h
    fast_export.h    repo_tree.c      sliding_window.h svndump.c
    line_buffer.c    repo_tree.h      svndiff.c        svndump.h
    
    xdiff/:
    xdiff.h      xemit.c      xinclude.h   xpatience.c  xtypes.h
    xdiffi.c     xemit.h      xmacros.h    xprepare.c   xutils.c
    xdiffi.h     xhistogram.c xmerge.c     xprepare.h   xutils.h
    
    ...:
    abspath.c                  pack-check.c
    advice.c                   pack-refs.c
    <snip>
    object.c                   xdiff-interface.h
    object.h                   zlib.c
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 14, 2012
  1. @gitster

    fmt-merge-msg: show those involved in a merged series

    gitster committed Mar 13, 2012
    As we already walk the history of the branch that gets merged to
    come up with a short log, let's label it with names of the primary
    authors, so that the user who summarizes the merge can easily give
    credit to them in the log message.
    
    Also infer the names of "lieutents" to help integrators at higher
    level of the food-chain to give credit to them, by counting:
    
     * The committer of the 'tip' commit that is merged
     * The committer of merge commits that are merged
    
    Often the first one gives the owner of the history being pulled, but
    his last pull from his sublieutenants may have been a fast-forward,
    in which case the first one would not be.  The latter rule will
    count the integrator of the history, so together it might be a
    reasonable heuristics.
    
    There are two special cases:
    
     - The "author" credit is omitted when the series is written solely
       by the same author who is making the merge. The name can be seen
       on the "Author" line of the "git log" output to view the log
       message anyway.
    
     - The "lieutenant" credit is omitted when there is only one key
       committer in the merged branch and it is the committer who is
       making the merge. Typically this applies to the case where the
       developer merges his own branch.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @j6t @gitster

    t4034: diff.*.wordregex should not be "sticky" in --word-diff

    j6t committed with gitster Mar 14, 2012
    The test case applies a custom wordRegex to one file in a diff, and expects
    that the default word splitting applies to the second file in the diff.
    But the custom wordRegex is also incorrectly used for the second file.
    
    Helped-by: Thomas Rast <trast@student.ethz.ch>
    Signed-off-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @trast @gitster

    diff: refactor the word-diff setup from builtin_diff_cmd

    trast committed with gitster Mar 14, 2012
    Quite a chunk of builtin_diff_cmd deals with word-diff setup, defaults
    and such.  This makes the function a bit hard to read, but is also
    asymmetric because the corresponding teardown lives in free_diff_words_data
    already.
    
    Refactor into a new function init_diff_words_data.  For simplicity,
    also shuffle around some functions it depends on.
    
    Signed-off-by: Thomas Rast <trast@student.ethz.ch>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @trast @gitster

    diff: tweak a _copy_ of diff_options with word-diff

    trast committed with gitster Mar 14, 2012
    When using word diff, the code sets the word_regex from various
    defaults if it was not set already.  The problem is that it does this
    on the original diff_options, which will also be used in subsequent
    diffs.
    
    This means that when the word_regex is not given on the command line,
    only the first diff for which a setting for word_regex (either from
    attributes or diff.wordRegex) ever takes effect.  This value then
    propagates to the rest of the diff runs and in particular prevents
    further attribute lookups.
    
    Fix the problem of changing diff state once and for all, by working
    with a _copy_ of the diff_options.
    
    Noticed-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Thomas Rast <trast@student.ethz.ch>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 15, 2012
  1. @keszybz @gitster

    t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPER

    keszybz committed with gitster Mar 15, 2012
    t0300-credential-helpers.sh requires GIT_TEST_CREDENTIAL_HELPER to be
    configured to do something sensible. If it is not set, prove will say:
      ./t0303-credential-external.sh .. skipped: (no reason given)
    which isn't very nice.
    
    Use skip_all="..." && test_done to bail out immediately and provide a
    nicer message. In case GIT_TEST_CREDENTIAL_HELPER is set, but the
    timeout tests are skipped, mention GIT_TEST_CREDENTIAL_HELPER_TIMEOUT.
    
    Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @keszybz @gitster

    t0303: resurrect commit message as test documentation

    keszybz committed with gitster Mar 15, 2012
    The commit message which added those tests (861444f 't: add test
    harness for external credential helpers' 2011-12-10) provided nice
    documentation in the commit message. Let's make it more visible
    by putting it in the test description.
    
    The documentation is updated to reflect the fact that
    GIT_TEST_CREDENTIAL_HELPER must be set for
    GIT_TEST_CREDENTIAL_HELPER_TIMEOUT to be used
    and GIT_TEST_CREDENTIAL_HELPER_SETUP can be used.
    
    Based-on-commit-message-by: Jeff King <peff@peff.net>
    Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    remove_dir_recursively(): Add flag for skipping removal of toplevel dir

    gitster committed Mar 15, 2012
    Add the REMOVE_DIR_KEEP_TOPLEVEL flag to remove_dir_recursively() for
    deleting everything inside the given directory, but _not_ the given
    directory itself.
    
    Note that this does not pass the REMOVE_DIR_KEEP_NESTED_GIT flag, if set,
    to the recursive invocations of remove_dir_recursively().  It is likely to
    be a a bug that has been present since REMOVE_DIR_KEEP_NESTED_GIT was
    introduced (a0f4afb), but this commit keeps the same behaviour for now.
    
    Signed-off-by: Johan Herland <johan@herland.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @jherland @gitster

    t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/

    jherland committed with gitster Mar 12, 2012
    The 'git notes merge' command expected to be run from the working
    tree of the project being annotated, and did not anticipate getting
    run inside $GIT_DIR/.
    
    However, because we use $GIT_DIR/NOTES_MERGE_WORKTREE as a temporary
    working space for the user to work on resolving conflicts, it is not
    unreasonable for a user to run "git notes merge --commit" there. But
    the command fails to do so.
    
    Found-by: David Bremner <david@tethera.net>
    Signed-off-by: Johan Herland <johan@herland.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @jherland @gitster

    notes-merge: use opendir/readdir instead of using read_directory()

    jherland committed with gitster Mar 12, 2012
    notes_merge_commit() only needs to list all entries (non-recursively)
    under a directory, which can be easily accomplished with
    opendir/readdir and would be more lightweight than read_directory().
    
    read_directory() is designed to list paths inside a working
    directory. Using it outside of its scope may lead to undesired effects.
    
    Apparently, one of the undesired effects of read_directory() is that it
    doesn't deal with being given absolute paths. This creates problems for
    notes_merge_commit() when git_path() returns an absolute path, which
    happens when the current working directory is in a subdirectory of the
    .git directory.
    
    Originally-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Updated-by:  Johan Herland <johan@herland.net>
    Signed-off-by: Johan Herland <johan@herland.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @jherland @gitster

    notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the us…

    jherland committed with gitster Mar 15, 2012
    …er's cwd
    
    When a manual notes merge is committed or aborted, we need to remove the
    temporary worktree at .git/NOTES_MERGE_WORKTREE. However, removing the
    entire directory is not good if the user ran the 'git notes merge
    --commit/--abort' from within that directory. On Windows, the directory
    removal would simply fail, while on POSIX systems, users would suddenly
    find themselves in an invalid current directory.
    
    Therefore, instead of deleting the entire directory, we delete everything
    _within_ the directory, and leave the (empty) directory in place.
    
    This would cause a subsequent notes merge to abort, complaining about a
    previous - unfinished - notes merge (due to the presence of
    .git/NOTES_MERGE_WORKTREE), so we also need to adjust this check to only
    trigger when .git/NOTES_MERGE_WORKTREE is non-empty.
    
    Finally, adjust the t3310 manual notes merge testcases to correctly handle
    the existence of an empty .git/NOTES_MERGE_WORKTREE directory.
    
    Inspired-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Johan Herland <johan@herland.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @gitster

    clean: preserve nested git worktree in subdirectories

    gitster committed Mar 15, 2012
    remove_dir_recursively() has a check to avoid removing the directory it
    was asked to remove without recursing into it and report success when the
    directory is the top level of a working tree of a nested git repository,
    to protect such a repository from "clean -f" (without double -f). If a
    working tree of a nested git repository is in a subdirectory of a toplevel
    project, however, this protection did not apply by mistake; we forgot to
    pass the REMOVE_DIR_KEEP_NESTED_GIT down to the recursive removal
    codepath.
    
    This requires us to also teach the higher level not to remove the
    directory it is asked to remove, when the recursed invocation did not
    remove the directory it was asked to remove due to a nested git
    repository, as it is not an error to leave the parent directories of such
    a nested repository.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. @gitster

    http: try http_proxy env var when http.proxy config option is not set

    Nelson Benitez Leon committed with gitster Mar 15, 2012
    cURL already reads it, but if $http_proxy has username but no password
    cURL will not ask you for the password and so failed to authenticate
    returning a 407 error code. So we read it ourselves to detect that and
    ask for the password. Also we read it prior to connection to be able to
    make a proactive authentication in case the flag http_proactive_auth is
    set.
    
    We also take care to read env proxy var according to protocol being
    used in the destination url, e.g.  when the url to retrieve is a https
    one, then the proxy env var we look at is https_proxy. To make this
    possible we now passed destination url parameter to get_active_slot()
    and get_curl_handle() functions.
    
    We also read no_proxy env var so to ignore aforementioned proxy env var
    if no_proxy contains an asterisk ('*') or contains the host used in url
    destination.
    
    Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. @gitster

    http: handle proxy proactive authentication

    Nelson Benitez Leon committed with gitster Mar 13, 2012
    If http_proactive_auth flag is set and there is a username
    but no password in the proxy url, then interactively ask for
    the password.
    
    This makes possible to not have the password written down in
    http_proxy env var or in http.proxy config option.
    
    Also take care that CURLOPT_PROXY don't include username or
    password, as we now set them in the new set_proxy_auth() function
    where we use their specific cURL options.
    
    Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. @gitster

    http: handle proxy authentication failure (error 407)

    Nelson Benitez Leon committed with gitster Mar 13, 2012
    Handle http 407 error code by asking for credentials and
    retrying request in case credentials were not present, or
    marking credentials as rejected if they were already provided.
    
    Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  11. @gitster

    http: Avoid limit of retrying request only twice

    Nelson Benitez Leon committed with gitster Mar 13, 2012
    Current code, after receiving HTTP_REAUTH, only retried
    once, so couldn't do step 3 of the following sequence:
    
      1. We make a request; proxy returns 407, because we didn't give it a
         password. We ask for the password and return HTTP_REAUTH.
    
      2. We make another request; the proxy passes it to the actual server,
         who returns 401, because we didn't give an http password. We ask
         for the password and return HTTP_REAUTH.
    
      3. We make a third request, but this time everybody is happy.
    
    Now we retry as long as we keep receiving HTTP_REAUTH, so the previous
    sequence correctly completes.
    
    Patch by Jeff King <peff@peff.net>
    
    Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  12. @gitster

    http: rename HTTP_REAUTH to HTTP_AUTH_RETRY

    Nelson Benitez Leon committed with gitster Mar 14, 2012
    After adding the proxy authentication support in http, the semantics
    of HTTP_REAUTH changed more to a retry rather than a re-authentication,
    so we rename it to HTTP_AUTH_RETRY.
    
    Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 16, 2012
  1. @gitster

    bulk-checkin: allow the same data to be multiply hashed

    gitster committed Dec 1, 2011
    This updates stream_to_pack() machinery to feed the data it is writing out
    to multiple hash contexts at the same time. Right now we only use a single
    git_SHA_CTX, so there is no change in functionality.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    new representation types in the packstream

    gitster committed Dec 1, 2011
    In addition to the four basic types (commit, tree, blob and tag), the pack
    stream can encode a few other "representation" types, such as REF_DELTA
    and OFS_DELTA.  As we allocate 3 bits in the first byte for this purpose,
    we do not have much room to add new representation types in place, but we
    do have one value reserved for future expansion.
    
    When encoding a new representation type, the early part of the in-pack
    object header is encoded as if its type is OBJ_EXT (= 5).  The lower 4-bit
    of the first byte is used for the lowest 4-bit of the size information,
    the next 3-bit has the type information, and the MSB says if the
    subsequent bytes need to be read to decode higher bits for the size
    information.
    
    An in-pack object header that records OBJ_EXT as its type is followed by
    an integer in the same variable-length encoding as OFS_DELTA offset is
    encoded in.  This value is the real type of the representation minus 8 (as
    we do not need to use OBJ_EXT to encode types smaller than 8).  Because we
    do not foresee very many representation types, in practice we would have a
    single byte with its MSB clear, to represent types 8-135.
    
    The code does not add nor use type=8 and upwards for anything yet.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    varint-in-pack: refactor varint encoding/decoding

    gitster committed Dec 1, 2011
    Refactor encode/decode_in_pack_varint() functions from OFS_DELTA codepaths
    to read and write variable-length integers in the pack stream.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    bulk-checkin: support chunked-object encoding

    gitster committed Dec 1, 2011
    Instead of recording a huge object as a single entry in the packfile,
    record it as a concatenation of smaller blob objects. This is primarily to
    make it possible to repack repositories with huge objects and transfer
    them out of such repositories.
    
    This is the first step of a long and painful journey. We would still need
    to teach many codepaths about the new encoding:
    
     * The streaming checkout codepath must learn how to read these from the
       object store and write a concatenation of component blob contents to
       the working tree. Note that after a repack, a component blob object
       could be represented as a delta to another blob object.
    
     * The in-core object reading codepath must learn to notice and at least
       reject reading such objects entirely in-core. It is expected that
       nobody is interested in producing a patch out of these huge objects, at
       least initially.
    
     * The object connectivity machinery must learn that component blob
       objects are reachable from an object that uses them, so that "gc"
       will not lose them, and "fsck" will not complain about them.
    
     * The pack-object machinery must learn to copy an object that is encoded
       in chunked-object encoding as-is to the destination, while perhaps
       validating the object name, without having to first come up with a huge
       concatenated blob and then split it again into smaller pieces. It also
       must learn that the component blobs need to be packed when it does so.
    
     * The index-pack and verify-pack machineries need to be told about the
       objects in the chunked encoding.
    
    The split-chunk logic used here is kept deliberately useless in order to
    avoid distracting the reviewers.  We will want to replace it with a better
    heuristics---the rest of the system is designed not to care, so that the
    heuristics can be improved without any compatibility issues.
    
    One possibility is to use the heuristics "bup" uses, which is based on a
    self-synchronizing rolling checksum logic; if it works as advertised, we
    should be able to obtain a good reuse of component blobs when only small
    parts of a large blob in chunked encoding are updated.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @gitster

    chunked-object: fallback checkout codepaths

    gitster committed Dec 1, 2011
    This prepares the default codepaths based on the traditional "slurping
    everything in-core" model around read_sha1_file() API for objects that use
    chunked encoding. Needless to say, these codepaths are unsuitable for the
    kind of objects that use chunked encoding and are intended to only serve
    as the fallback where specialized "large object API" support is still
    lacking.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @gitster

    chunked-object: streaming checkout

    gitster committed Dec 2, 2011
    Define a new streaming decoder to handle blobs stored in chunked encoding,
    so that we do not have to slurp the data for the whole object to check it
    out to the working tree.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 19, 2012
  1. @davvid @gitster

    t7800: Test difftool passing arguments to diff

    davvid committed with gitster Mar 17, 2012
    git-difftool relies on the ability to forward unknown arguments
    to the git-diff command.  Add a test to ensure that this works
    as advertised.
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 20, 2012
  1. @ctiwald @gitster

    push: Provide situational hints for non-fast-forward errors

    ctiwald committed with gitster Mar 20, 2012
    Pushing a non-fast-forward update to a remote repository will result in
    an error, but the hint text doesn't provide the correct resolution in
    every case. Give better resolution advice in three push scenarios:
    
    1) If you push your current branch and it triggers a non-fast-forward
    error, you should merge remote changes with 'git pull' before pushing
    again.
    
    2) If you push to a shared repository others push to, and your local
    tracking branches are not kept up to date, the 'matching refs' default
    will generate non-fast-forward errors on outdated branches. If this is
    your workflow, the 'matching refs' default is not for you. Consider
    setting the 'push.default' configuration variable to 'current' or
    'upstream' to ensure only your current branch is pushed.
    
    3) If you explicitly specify a ref that is not your current branch or
    push matching branches with ':', you will generate a non-fast-forward
    error if any pushed branch tip is out of date. You should checkout the
    offending branch and merge remote changes before pushing again.
    
    Teach transport.c to recognize these scenarios and configure push.c
    to hint for them. If 'git push's default behavior changes or we
    discover more scenarios, extension is easy. Standardize on the
    advice API and add three new advice variables, 'pushNonFFCurrent',
    'pushNonFFDefault', and 'pushNonFFMatching'. Setting any of these
    to 'false' will disable their affiliated advice. Setting
    'pushNonFastForward' to false will disable all three, thus preserving the
    config option for users who already set it, but guaranteeing new
    users won't disable push advice accidentally.
    
    Based-on-patch-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Christopher Tiwald <christiwald@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @lucianposton @gitster

    log --graph --stat: three-dash separator should come after graph lines

    lucianposton committed with gitster Mar 20, 2012
    Output from "git log --graph --stat -p" emits the three-dash separator
    line before the graph that shows ancestry lines.  The separator should
    come after the ancestry lines just like all the other output.
    
    Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @lucianposton @gitster

    log --graph: fix break in graph lines

    lucianposton committed with gitster Mar 20, 2012
    Output from "git log --graph --stat -p" broke the ancestry graph lines
    with a single empty line between the diffstat and the patch.
    
    Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @lucianposton @gitster

    t4202: add test for "log --graph --stat -p" separator lines

    lucianposton committed with gitster Mar 20, 2012
    Add tests to make sure that the three-dash separator lines appear
    after the graph ancestry lines, and also the graph ancestry lines
    are not broken between the diffstat and the patch.
    
    Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @gitster

    rebase -i: remind that the lines are top-to-bottom

    gitster committed Mar 16, 2012
    Nelson Benitez Leon opened a discussion with a patch with this in the
    note:
    
        Hi, I was using git rebase -i for some time now and never occured to
        me I could reorder the commit lines to affect the order the commits
        are applied, learnt that recently from a git tutorial.
    
    Nelson's patch was to stress the fact that the lines in the insn sheet can
    be re-ordered in a much more verbose way.  Let's add a one-liner reminder
    and also remind that the lines in the insn sheet is read from top to
    bottom, unlike the "git log" output.
    
    Discussion-triggered-by: Nelson Benitez Leon
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @gitster

    merge: backport GIT_MERGE_AUTOEDIT support

    gitster committed Mar 20, 2012
    Even though 1.7.9.x series does not open the editor by default
    when merging in general, it does do so in one occassion: when
    merging an annotated tag. And worse yet, there is no good way
    for older scripts to decline this.
    
    Backport the support for GIT_MERGE_AUTOEDIT environment variable
    from 1.7.10 track to help those stuck on 1.7.9.x maintenance
    track.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @greened

    Set TEST_DIRECTORY

    greened committed Mar 20, 2012
    Set TEST_DIRECTORY to the main git test area.  This allows the
    git-subtree out-of-tree tests to run correctly.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
  8. @greened

    Remove Unneeded Files

    greened committed Jan 29, 2012
    Remove redundant or otherwise unnecessary files.  Most of these
    exist in the git project repository.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
  9. @greened

    Use Project Config Files

    greened committed Jan 29, 2012
    Use project-wide files to process documentation for git-subtree.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
  10. @greened

    Build Subtree

    greened committed Feb 5, 2012
    Put subtree in the main git command area so it will be installed
    along with everything else.  This only happens if the user explicitly
    builds in contrib/subtree.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
  11. @greened

    Add Subtree Test Makefile

    greened committed Feb 5, 2012
    Add a Makefile to run subtree tests.  This is largely copied
    from the standard test suite with irrelevant targets removed
    and some paths altered to account for where subtree tests live.
    
    Signed-off-by: David A. Greene <greened@obbligato.org>
Commits on Mar 23, 2012
  1. @thenigan @gitster

    difftool: parse options using Getopt::Long

    thenigan committed with gitster Mar 22, 2012
    Replace custom option/argument parser with standard Getopt::Long
    module.  This shortens the code and makes it easier to understand.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @thenigan @gitster

    difftool: add '--no-gui' option

    thenigan committed with gitster Mar 22, 2012
    This commit teaches difftool to handle the '--no-gui' option. This option
    negates the existing '--gui' option. The last setting given on the command
    line wins.
    
    This allows a user to configure "[alias] mdt = difftool --gui", but still
    have the ability to override the setting without error:
    
    $ git mdt --no-gui
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @thenigan @gitster

    difftool: exit(0) when usage is printed

    thenigan committed with gitster Mar 22, 2012
    Prior to this commit, the script exited with an error whenever the
    usage string was printed, regardless of the reason it was done. In
    cases where usage was printed due to a user request (e.g. '-h'
    option), the script should exit without error (exit 0).
    
    This commit adds an argument to the usage function that allows the
    exit code to be specified when the function is called.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @thenigan @gitster

    difftool: remove explicit change of PATH

    thenigan committed with gitster Mar 22, 2012
    Adding the script directory to PATH is not needed. The script is
    located at '$(git --exec-path)', which is already on the PATH.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @thenigan @gitster

    difftool: stop appending '.exe' to git

    thenigan committed with gitster Mar 22, 2012
    The system call to Git works the same whether or not ".exe" is
    appended to "git". The extra code is not necessary.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @thenigan @gitster

    difftool: eliminate setup_environment function

    thenigan committed with gitster Mar 22, 2012
    Removing this function shortens the code and makes it easier to read.
    Now all environment variables are set as part of procedural operation.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @thenigan @gitster

    difftool: replace system call with Git::command_noisy

    thenigan committed with gitster Mar 22, 2012
    The Git.pm module includes functions intended to standardize working
    with Git repositories in Perl scripts. This commit teaches difftool
    to use Git::command_noisy rather than a system call to run the diff
    command.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. @thenigan @gitster

    difftool: teach difftool to handle directory diffs

    thenigan committed with gitster Mar 22, 2012
    Prior to this commit, the difftool utility could only open files one
    at a time.  The new '--dir-diff' option copies all the modified files
    to a temporary location and runs a directory diff on them.
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. @peff @gitster

    drop casts from users EMPTY_TREE_SHA1_BIN

    peff committed with gitster Mar 22, 2012
    This macro already evaluates to the correct type, as it
    casts the string literal to "unsigned char *" itself
    (and callers who want the literal can use the _LITERAL
    form).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. @peff @gitster

    make is_empty_blob_sha1 available everywhere

    peff committed with gitster Mar 22, 2012
    The read-cache implementation defines this static function,
    but it is a generally useful concept in git. Let's give
    the empty blob the same treatment as the empty tree,
    providing both hex and binary forms of the sha1.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  11. @peff @gitster

    teach diffcore-rename to optionally ignore empty content

    peff committed with gitster Mar 22, 2012
    Our rename detection is a heuristic, matching pairs of
    removed and added files with similar or identical content.
    It's unlikely to be wrong when there is actual content to
    compare, and we already take care not to do inexact rename
    detection when there is not enough content to produce good
    results.
    
    However, we always do exact rename detection, even when the
    blob is tiny or empty. It's easy to get false positives with
    an empty blob, simply because it is an obvious content to
    use as a boilerplate (e.g., when telling git that an empty
    directory is worth tracking via an empty .gitignore).
    
    This patch lets callers specify whether or not they are
    interested in using empty files as rename sources and
    destinations. The default is "yes", keeping the original
    behavior. It works by detecting the empty-blob sha1 for
    rename sources and destinations.
    
    One more flexible alternative would be to allow the caller
    to specify a minimum size for a blob to be "interesting" for
    rename detection. But that would catch small boilerplate
    files, not large ones (e.g., if you had the GPL COPYING file
    in many directories).
    
    A better alternative would be to allow a "-rename"
    gitattribute to allow boilerplate files to be marked as
    such. I'll leave the complexity of that solution until such
    time as somebody actually wants it. The complaints we've
    seen so far revolve around empty files, so let's start with
    the simple thing.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  12. @peff @gitster

    merge-recursive: don't detect renames of empty files

    peff committed with gitster Mar 22, 2012
    Merge-recursive detects renames so that if one side modifies
    "foo" and the other side moves it to "bar", the modification
    is applied to "bar". However, our rename detection is based
    on content analysis, it can be wrong (i.e., two files were
    not intended as a rename, but just happen to have the same
    or similar content).
    
    This is quite rare if the files actually contain content,
    since two unrelated files are unlikely to have exactly the
    same content.  However, empty files present a problem, in
    that there is nothing to analyze. An uninteresting
    placeholder file with zero bytes may or may not be related
    to a placeholder file with another name.
    
    The result is that adding content to an empty file may cause
    confusion if the other side of a merge removed it; your
    content may end up in another random placeholder file that
    was added.
    
    Let's err on the side of caution and not consider empty
    files as renames. This will cause a modify/delete conflict
    on the merge, which will let the user sort it out
    themselves.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 25, 2012
  1. @greened

    Add 'contrib/subtree/' from commit '2e63f75b8f49abe220ef55ec4e978e7a3…

    greened committed Mar 25, 2012
    …b8dc351'
    
    git-subtree-dir: contrib/subtree
    git-subtree-mainline: c16df57
    git-subtree-split: 2e63f75
Commits on Mar 26, 2012
  1. @gitster

    combine-diff: fix loop index underflow

    René Scharfe committed with gitster Mar 24, 2012
    If both la and context are zero at the start of the loop, la wraps around
    and we end up reading from memory far away.  Skip the loop in that case
    instead.
    
    Reported-by: Julia Lawall <julia.lawall@lip6.fr>
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @slattarini @gitster

    configure: move definitions of private m4 macros before AC_INIT invoc…

    slattarini committed with gitster Mar 26, 2012
    …ation
    
    This way, no spurious comments nor whitespace will be propagated in the
    generated configure script.
    
    This change is a pure code movement (plus addition of a comment line).
    
    Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @slattarini @gitster

    configure: avoid some code repetitions thanks to m4_{push,pop}def

    slattarini committed with gitster Mar 26, 2012
    This change is just cosmetic, and should cause no semantic change, nor
    any change in the generated configure script.
    
    Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @slattarini @gitster

    configure: be more idiomatic

    slattarini committed with gitster Mar 26, 2012
    Lots of code in Git's configure.ac doesn't follow the typical formatting,
    idioms and best practices for Autoconf input files.  Improve the situation.
    
    There are probably many more similar improvements to be done, but trying
    to clump all of them in a single change would make it unreviewable, so we
    content ourselves with a partial improvement.
    
    This change is just cosmetic, and should cause no semantic change.
    
    The most relevant of the changes introduced by this patch are:
    
     - Do not add trailing '\' characters for line continuation where they
       are not truly needed.
    
     - In several (but not all) macro calls, properly quote the arguments.
    
     - Few cosmetic changes in spacing and comments.
    
    Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @peff @gitster

    clean up struct ref's nonfastforward field

    peff committed with gitster Mar 26, 2012
    Each ref structure contains a "nonfastforward" field which
    is set during push to show whether the ref rewound history.
    Originally this was a single bit, but it was changed in
    f25950f (push: Provide situational hints for non-fast-forward
    errors) to an enum differentiating a non-ff of the current
    branch versus another branch.
    
    However, we never actually set the member according to the
    enum values, nor did we ever read it expecting anything but
    a boolean value. But we did use the side effect of declaring
    the enum constants to store those values in a totally
    different integer variable. The code as-is isn't buggy, but
    the enum declaration inside "struct ref" is somewhat
    misleading.
    
    Let's convert nonfastforward back into a single bit, and
    then define the NON_FF_* constants closer to where they
    would be used (they are returned via the "int *nonfastforward"
    parameter to transport_push, so we can define them there).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 27, 2012
  1. @peff @gitster

    checkout: suppress tracking message with "-q"

    peff committed with gitster Mar 26, 2012
    Like the "switched to..." message (which is already
    suppressed by "-q"), this message is purely informational.
    Let's silence it if the user asked us to be quiet.
    
    This patch is slightly more than a one-liner, because we
    have to teach create_branch to propagate the flag all the
    way down to install_branch_config.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @peff @gitster

    teach "git branch" a --quiet option

    peff committed with gitster Mar 26, 2012
    There's currently no way to suppress the informational
    "deleted branch..." or "set up tracking..." messages.  This
    patch provides a "-q" option to do so.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    apply: rename free_patch() to free_patch_list()

    gitster committed Mar 27, 2012
    As that is the only logical name for a function that walks a list
    and frees each element on it.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    apply: free patch->{def,old,new}_name fields

    gitster committed Mar 21, 2012
    These were all allocated in the heap by parsing the header parts of the
    patch, but we did not bother to free them.  Some used to share the memory
    (e.g. copying def_name to old_name) so this is not just the matter of
    adding three calls to free().
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @gitster

    apply: release memory for fn_table

    gitster committed Mar 27, 2012
    The fn_table is used to record the result of earlier patch application in
    case a hand-crafted input file contains multiple patches to the same file.
    Both its string key (filename) and the contents are borrowed from "struct
    patch" that represents the previous application in the same apply_patch()
    call, and they do not leak, but the table itself was not freed properly.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @gitster

    apply: free patch->result

    gitster committed Mar 21, 2012
    This is by far the largest piece of data, much larger than the patch and
    fragment structures or the three name fields in the patch structure.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 28, 2012
  1. @gitster

    am -3: list the paths that needed 3-way fallback

    gitster committed Mar 28, 2012
    When applying a patch that was based on an older release with "am -3", I
    often wonder changes to which files need to be reviewed with extra care to
    spot mismerges, but there is no good indication.
    
    The paths that needed 3-way fallback can easily be obtained by comparing
    the synthesized (partial) base tree and the current HEAD and noticing only
    additions and modifications (removals only show the sparseness of the fake
    ancestor tree, which is not useful information at all).  List them in the
    usual --name-status format.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @jmberg @gitster

    am: support --include option

    jmberg committed with gitster Mar 28, 2012
    am supports a number of pass-through options
    to apply, like --exclude and --directory. Add
    --include to this list.
    
    Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    config: remove useless assignment

    René Scharfe committed with gitster Mar 28, 2012
    v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced
    config_exclusive_filename with given_config_file.  In one case this
    resulted in a self-assignment, which is reported by clang as a warning.
    Remove the useless code.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 29, 2012
  1. @gitster

    apply: free unused fragments for submodule patch

    gitster committed Mar 29, 2012
    We simply discarded the fragments that we are not going to use upon seeing
    a patch to update the submodule commit bound at path that we have not
    checked out.
    
    Free these fragments, not to leak them.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    apply.c: WIP ownership audit

    gitster committed Mar 21, 2012
    Add a few comments on ownership, and tighten constness of a few line
    buffer variables.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @mkiedrowicz @jnareb

    gitweb: esc_html_hl_regions(): Don't create empty <span> elements

    mkiedrowicz committed with jnareb Mar 23, 2012
    if $s->[1] is equal to or less than $s->[0], esc_html_hl_regions()
    generates an empty <span> element.  It normally shouldn't be visible in
    the web broweser, but it doesn't look good when looking at page source.
    It also minimally increases generated page size for no special reason.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
  4. @mkiedrowicz @jnareb

    gitweb: Pass esc_html_hl_regions() options to esc_html()

    mkiedrowicz committed with jnareb Mar 23, 2012
    With this change, esc_html_hl_regions() accepts options and passes them
    down to esc_html().  This may be needed if a caller wants to pass
    -nbsp=>1 to esc_html().
    
    The idea and implementation example of this change was described in
    337da8d (gitweb: Introduce esc_html_match_hl and esc_html_hl_regions,
    2012-02-27).  While other suggestions may be more useful in some cases,
    there is no need to implement them at the moment.  The
    esc_html_hl_regions() interface may be changed later if it's needed.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
  5. @mkiedrowicz @jnareb

    gitweb: Extract print_sidebyside_diff_lines()

    mkiedrowicz committed with jnareb Mar 23, 2012
    Currently, print_sidebyside_diff_chunk() does two things: it
    accumulates diff lines and prints them.  Accumulation may be used to
    perform additional operations on diff lines,  so it makes sense to split
    these two things.  Thus, the code that prints diff lines in a side-by-side
    manner is moved out of print_sidebyside_diff_chunk() to a separate
    subroutine.
    
    The outcome of this patch is that print_sidebyside_diff_chunk() is now
    much shorter and easier to read.
    
    This is a preparation patch for diff refinement highlightning.  It should
    not change the gitweb output, but it slightly changes its behavior.
    Before this commit, context is printed on the class change. Now, it'it
    printed just before printing added and removed lines.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
  6. @mkiedrowicz @jnareb

    gitweb: Use print_diff_chunk() for both side-by-side and inline diffs

    mkiedrowicz committed with jnareb Mar 23, 2012
    This renames print_sidebyside_diff_chunk() to print_diff_chunk() and
    makes use of it for both side-by-side and inline diffs.  Now diff lines
    are always accumulated before they are printed.  This opens the
    possibility to preprocess diff output before it's printed, which is
    needed for diff refinement highlightning (implemented in incoming
    patches).
    
    If left as is, the new function print_inline_diff_lines() could reorder
    diff lines.  It first prints all context lines, then all removed lines
    and finally all added lines.  If the diff output consisted of mixed added
    and removed lines, gitweb would reorder these lines.  This is true for
    combined diff output, for example:
    
    	 - removed line for first parent
    	 + added line for first parent
    	  -removed line for second parent
    	 ++added line for both parents
    
    would be rendered as:
    
    	- removed line for first parent
    	 -removed line for second parent
    	+ added line for first parent
    	++added line for both parents
    
    To prevent gitweb from reordering lines, print_diff_chunk() calls
    print_diff_lines() as soon as it detects that both added and removed
    lines are present and there was a class change.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
  7. @mkiedrowicz @jnareb

    gitweb: Move HTML-formatting diff line back to process_diff_line()

    mkiedrowicz committed with jnareb Mar 23, 2012
    Commit 6ba1eb5 (gitweb: Add a feature to show side-by-side diff,
    2011-10-31) for no special reason moved wrapping diff line in <div> out
    of format_diff_line(). Bring back old behavior.
    
    This simplifies code in git_patchset_body() and keeps formatting of a
    diff line in one place.
    
    The more long-term purpose of this patch is to move formatting diff
    lines down to print_diff_chunk(), to allow processing lines without
    HTML-formatting.
    
    This is just a refactoring patch. It's not meant to change gitweb
    output.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
    Acked-by: Jakub Narębski <jnareb@gmail.com>
  8. @mkiedrowicz @jnareb

    gitweb: Push formatting diff lines to print_diff_chunk()

    mkiedrowicz committed with jnareb Mar 23, 2012
    Now git_patchset_body() only calls diff_line_class(), which is removed
    from process_diff_line(). The latter function is renamed to
    format_diff_line() and its output is changed to return only
    HTML-formatted line, which brings it in line with outher format_*
    subroutined.
    
    This slightly changes the order of operations performed on diff lines.
    Before this commit, each read line was formatted and then put to the
    @chunk accumulator. Now, lines are formatted inside print_diff_chunk(),
    
    This is a preparation patch for diff refinement highlightning. It's not
    meant to change gitweb output.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
    Acked-by: Jakub Narębski <jnareb@gmail.com>
  9. @mkiedrowicz @jnareb

    gitweb: Highlight interesting parts of diff

    mkiedrowicz committed with jnareb Mar 23, 2012
    Reading diff output is sometimes very hard, even if it's colored,
    especially if lines differ only in few characters.  This is often true
    when a commit fixes a typo or renames some variables or functions.
    
    This commit teaches gitweb to highlight characters that are different
    between old and new line with a light green/red background.  This should
    work in the similar manner as in Trac or GitHub.
    
    The algorithm that compares lines is based on contrib/diff-highlight.
    Basically, it works by determining common prefix/suffix of corresponding
    lines and highlightning only the middle part of lines.  For more
    information, see contrib/diff-highlight/README.
    
    Combined diffs are not supported but a following commit will change it.
    
    Two changes in format_diff_line() were needed to allow diff refinement
    highlightning to work.  Firstly, format_diff_line() was taught to not
    esc_html() line that was passed as a reference.  This was needed because
    refining the highlight must be performed on unescaped lines and it uses
    a <span> element to mark interesting parts of the line.  Secondly, the
    lines are untabified before comparing because calling untabify()
    after inserting <span>'s could improperly convert tabs to spaces.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
  10. @mkiedrowicz @jnareb

    gitweb: Refinement highlightning in combined diffs

    mkiedrowicz committed with jnareb Mar 23, 2012
    The highlightning of combined diffs is currently disabled.  This is
    because output from a combined diff is much harder to highlight because
    it's not obvious which removed and added lines should be compared.
    
    Moreover, code that compares added and removed lines doesn't care about
    combined diffs. It only skips first +/- character, treating second +/-
    as a line content.
    
    Let's start with a simple case: only highlight changes that come from
    one parent, i.e. when every removed line has a corresponding added line
    for the same parent.  This way the highlightning cannot get wrong. For
    example, following diffs would be highlighted:
    
    	- removed line for first parent
    	+ added line for first parent
    	  context line
    	 -removed line for second parent
    	 +added line for second parent
    
    or
    
    	- removed line for first parent
    	 -removed line for second parent
    	+ added line for first parent
    	 +added line for second parent
    
    but following output will not:
    
    	- removed line for first parent
    	 -removed line for second parent
    	 +added line for second parent
    	++added line for both parents
    
    Further changes may introduce more intelligent approach that better
    handles combined diffs.
    
    Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
  11. @thenigan @gitster

    difftool: print list of valid tools with '--tool-help'

    thenigan committed with gitster Mar 29, 2012
    Since bc7a96a (mergetool--lib: Refactor tools into separate files,
    2011-08-18), it is possible to add a new diff tool by creating a simple
    script in the '$(git --exec-path)/mergetools' directory.  Updating the
    difftool help text is still a manual process, and the documentation can
    easily go out of sync.
    
    This commit teaches difftool the '--tool-help' option, which:
      - Reads the list of valid tools from 'mergetools/*'
      - Determines which of them are actually installed
      - Determines which are capable of diffing (i.e. not just a merge tool)
      - Prints the resulting list for the user
    
    Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 30, 2012
  1. @gitster

    Teach revision walking machinery to walk multiple times sequencially

    Heiko Voigt committed with gitster Mar 29, 2012
    Previously it was not possible to iterate revisions twice using the
    revision walking api. We add a reset_revision_walk() which clears the
    used flags. This allows us to do multiple sequencial revision walks.
    
    We add the appropriate calls to the existing submodule machinery doing
    revision walks. This is done to avoid surprises if future code wants to
    call these functions more than once during the processes lifetime.
    
    Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    Refactor submodule push check to use string list instead of integer

    Heiko Voigt committed with gitster Mar 29, 2012
    This allows us to tell the user which submodules have not been pushed.
    Additionally this is helpful when we want to automatically try to push
    submodules that have not been pushed.
    
    Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @gitster

    push: teach --recurse-submodules the on-demand option

    Heiko Voigt committed with gitster Mar 29, 2012
    When using this option git will search for all submodules that
    have changed in the revisions to be send. It will then try to
    push the currently checked out branch of each submodule.
    
    This helps when a user has finished working on a change which
    involves submodules and just wants to push everything in one go.
    
    Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
    Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
    Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @gitster

    string-list: document that string_list_insert() inserts unique strings

    Heiko Voigt committed with gitster Mar 29, 2012
    Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. @gitster

    gitweb: add `status` headers to git_feed() responses.

    W. Trevor King committed with gitster Mar 29, 2012
    The git_feed() method was not setting a `Status` header unless it was
    responding to an If-Modified-Since request with `304 Not Modified`.
    Now, when it is serving successful responses, it sets status to `200
    OK`.
    
    Signed-off-by: W Trevor King <wking@drexel.edu>
    Acked-by: Jakub Narebski <jnareb@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. @gitster

    gitweb: refactor If-Modified-Since handling

    W. Trevor King committed with gitster Mar 29, 2012
    The current gitweb only generates Last-Modified and handles
    If-Modified-Since headers for the git_feed action.  This patch breaks
    the Last-Modified and If-Modified-Since handling code out from
    git_feed into a new function exit_if_unmodified_since.  This makes the
    code easy to reuse for other actions.
    
    Only gitweb actions which can easily calculate a modification time
    should use exit_if_unmodified_since, as the goal is to balance local
    processing time vs. upload bandwidth.
    
    Signed-off-by: W Trevor King <wking@drexel.edu>
    Acked-by: Jakub Narebski <jnareb@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. @gitster

    gitweb: add If-Modified-Since handling to git_snapshot().

    W. Trevor King committed with gitster Mar 29, 2012
    Because snapshots can be large, you can save some bandwidth by
    supporting caching via If-Modified-Since.  This patch adds support for
    the i-m-s request to git_snapshot() if the request is a commit.
    Requests for snapshots of trees, which lack well defined timestamps,
    are still handled as they were before.
    
    Signed-off-by: W Trevor King <wking@drexel.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. @peff @gitster

    http-backend: respect existing GIT_COMMITTER_* variables

    peff committed with gitster Mar 30, 2012
    The http-backend program sets default GIT_COMMITTER_NAME and
    GIT_COMMITTER_EMAIL variables based on the REMOTE_USER and
    REMOTE_ADDR variables provided by the webserver. However, it
    unconditionally overwrites any existing GIT_COMMITTER
    variables, which may have been customized by site-specific
    code in the webserver (or in a script wrapping http-backend).
    
    Let's leave those variables intact if they already exist,
    assuming that any such configuration was intentional. There
    is a slight chance of a regression if somebody has set
    GIT_COMMITTER_* for the entire webserver, not intending it
    to leak through http-backend. We could protect against this
    by passing the information in alternate variables.  However,
    it seems unlikely that anyone will care about that
    regression, and there is value in the simplicity of using
    the common variable names that are used elsewhere in git.
    
    While we're tweaking the environment-handling in
    http-backend, let's switch it to use argv_array to handle
    the list of variables. That makes the memory management much
    simpler.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. @peff @gitster

    run-command: treat inaccessible directories as ENOENT

    peff committed with gitster Mar 30, 2012
    When execvp reports EACCES, it can be one of two things:
    
      1. We found a file to execute, but did not have
         permissions to do so.
    
      2. We did not have permissions to look in some directory
         in the $PATH.
    
    In the former case, we want to consider this a
    permissions problem and report it to the user as such (since
    getting this for something like "git foo" is likely a
    configuration error).
    
    In the latter case, there is a good chance that the
    inaccessible directory does not contain anything of
    interest. Reporting "permission denied" is confusing to the
    user (and prevents our usual "did you mean...?" lookup). It
    also prevents git from trying alias lookup, since we do so
    only when an external command does not exist (not when it
    exists but has an error).
    
    This patch detects EACCES from execvp, checks whether we are
    in case (2), and if so converts errno to ENOENT. This
    behavior matches that of "bash" (but not of simpler shells
    that use execvp more directly, like "dash").
    
    Test stolen from Junio.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. @gitster

    t7501: test the right kind of breakage

    gitster committed Mar 30, 2012
    These tests try to run "git commit" with various "forbidden" combinations
    of options and expect the command to fail, but they do so without having
    any change added to the index.  We wouldn't be able to catch breakages
    that would allow these combinations by mistake with them because the
    command will fail with "nothing to commit" anyway.
    
    Make sure we have something added to the index before running the command.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  11. @gitster

    commit: do not trigger bogus "has templated message edited" check

    gitster committed Mar 30, 2012
    When "-t template" and "-F msg" options are both given (or worse yet,
    there is "commit.template" configuration but a message is given in some
    other way), the documentation says that template is ignored.  However,
    the "has the user edited the message?" check still used the contents of
    the template file as the basis of the emptyness check.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  12. @gitster

    commit: rephrase the error when user did not touch templated log message

    gitster committed Mar 30, 2012
    When the user exited editor without editing the commit log template given
    by "git commit -t <template>", the commit was aborted (correct) with an
    error message that said "due to empty commit message" (incorrect).
    
    This was because the original template support was done by piggybacking on
    the check to detect an empty log message.  Split the codepaths into two
    independent checks to clarify the error.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  13. @gitster

    push: detect nonsense "upstream" check more carefully

    gitster committed Mar 30, 2012
    The user can say "git push" without specifying any refspec.  When using
    "upstream" semantics via the push.default configuration, the user wants to
    update the "upstream" branch, which is the branch at a remote repository
    the current branch is set to integrate with, with this command.
    
    There are cases that "git push" do not make sense when push.default is set
    to "upstream":
    
     - The current branch does not have branch.$name.remote configured.  By
       definition, "git push" that does not name where to push to will not
       know where to push to.  The user may explicitly say "git push $there",
       but again, by definition, no branch at repository $there is set to
       integrate with the current branch in this case and we wouldn't know
       which remote branch to update.
    
     - The current branch does have branch.$name.remote configured, but it
       does not specify branch.$name.merge that names what branch at the
       remote this branch integrates with. "git push" knows where to push in
       this case (or the user may explicitly say "git push $remote" to tell us
       where to push), but we do not know which remote branch to update.
    
     - The current branch does have both branch.$name.remote and
       branch.$name.merge configured, but the user said "git push $there",
       where $there does not match what "branch.$name.remote" is configured
       to.  By definition, no branch at repository $there is set to integrate
       with the current branch in this case and we wouldn't know which remote
       branch to update.
    
    The first two cases were already checked correctly, but the third case was
    not checked and we ended up updating the branch named branch.$name.merge
    at repository $there, which was totally bogus.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 31, 2012
  1. @gitster

    Merge branch 'maint'

    gitster committed Mar 31, 2012
    * maint:
      string-list: document that string_list_insert() inserts unique strings
  2. @gitster

    Merge branch 'da/difftool-test' into jch

    gitster committed Mar 31, 2012
    Makes sure "difftool" options can be given in any order.
    
    * da/difftool-test:
      t7800: Test difftool passing arguments to diff
  3. @gitster

    Merge branch 'jn/diffstat-tests' into jch

    gitster committed Mar 31, 2012
    Some tests checked the "diff --stat" output when they do not have to,
    which unnecessarily made things harder to verify under GETTEXT_POISON.
    
    Not urgent.
    
    * jn/diffstat-tests:
      diffstat summary line varies by locale: miscellany
      test: use numstat instead of diffstat in binary-diff test
      test: use --numstat instead of --stat in "git stash show" tests
      test: test cherry-pick functionality and output separately
      test: modernize funny-names test style
      test: use numstat instead of diffstat in funny-names test
      test: use test_i18ncmp when checking --stat output
  4. @gitster

    Merge branch 'jc/commit-hook-authorship' into jch

    gitster committed Mar 31, 2012
    "git commit --author=$name" did not tell the name that was being
    recorded in the resulting commit to hooks, even though it does do so
    when the end user overrode the authorship via the "GIT_AUTHOR_NAME"
    environment variable.  This is a simpler of the two approaches.
    
    Will defer til 1.7.10.
    
    * jc/commit-hook-authorship:
      commit: pass author/committer info to hooks
      t7503: does pre-commit-hook learn authorship?
      ident.c: add split_ident_line() to parse formatted ident line
  5. @gitster

    Merge branch 'tr/maint-word-diff-regex-sticky' into jch

    gitster committed Mar 31, 2012
    The regexp configured with wordregex was incorrectly reused across
    files.
    Not urgent.
    
    * tr/maint-word-diff-regex-sticky:
      diff: tweak a _copy_ of diff_options with word-diff
      diff: refactor the word-diff setup from builtin_diff_cmd
      t4034: diff.*.wordregex should not be "sticky" in --word-diff
  6. @gitster

    Merge branch 'jh/notes-merge-in-git-dir-worktree' into jch

    gitster committed Mar 31, 2012
    Running "notes merge --commit" failed to perform correctly when run
    from any directory inside $GIT_DIR/.  When "notes merge" stops with
    conflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits
    to resolve it.
    
    Not urgent.
    
    * jh/notes-merge-in-git-dir-worktree:
      notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd
      notes-merge: use opendir/readdir instead of using read_directory()
      t3310: illustrate failure to "notes merge --commit" inside $GIT_DIR/
      remove_dir_recursively(): Add flag for skipping removal of toplevel dir
  7. @gitster

    Merge branch 'jc/maint-clean-nested-worktree-in-subdir' into jch

    gitster committed Mar 31, 2012
    "git clean -d -f" (not "-d -f -f") is supposed to protect nested working
    trees of independent git repositories that exist in the current project
    working tree from getting removed, but the protection applied only to such
    working trees that are at the top-level of the current project by mistake.
    
    Not urgent.
    
    * jc/maint-clean-nested-worktree-in-subdir:
      clean: preserve nested git worktree in subdirectories
  8. @gitster

    Merge branch 'rs/unpack-trees-leakfix' into jch

    gitster committed Mar 31, 2012
    Will defer til 1.7.10.
    
    * rs/unpack-trees-leakfix:
      unpack-trees: plug minor memory leak
  9. @gitster

    Merge branch 'jc/diff-algo-cleanup' into jch

    gitster committed Mar 31, 2012
    Resurrects the preparatory clean-up patches from another topic that was
    discarded, as this would give a saner foundation to build on diff.algo
    configuration option series.
    
    Not urgent.
    
    * jc/diff-algo-cleanup:
      xdiff: PATIENCE/HISTOGRAM are not independent option bits
      xdiff: remove XDL_PATCH_* macros
  10. @gitster

    Merge branch 'nd/stream-more' into jch

    gitster committed Mar 31, 2012
    Use API to read blob data in smaller chunks in more places to
    reduce the memory footprint.  In general, looked fairly good.
    
    Will defer til 1.7.10.
    
    * nd/stream-more:
      update-server-info: respect core.bigfilethreshold
      fsck: use streaming API for writing lost-found blobs
      show: use streaming API for showing blobs
      parse_object: avoid putting whole blob in core
      cat-file: use streaming API to print blobs
      Add more large blob test cases
      streaming: make streaming-write-entry to be more reusable
  11. @gitster

    Merge branch 'zj/test-cred-helper-nicer-prove' into jch

    gitster committed Mar 31, 2012
    Minor improvement to t0303.
    Not urgent.
    
    * zj/test-cred-helper-nicer-prove:
      t0303: resurrect commit message as test documentation
      t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPER
  12. @gitster

    Merge branch 'nl/rebase-i-cheat-sheet' into jch

    gitster committed Mar 31, 2012
    Not urgent.
    
    * nl/rebase-i-cheat-sheet:
      rebase -i: remind that the lines are top-to-bottom
  13. @gitster

    Merge branch 'nl/http-proxy-more' into jch

    gitster committed Mar 31, 2012
    The code to talk to http proxies learn to use the same credential
    API used to talk to the final http destinations.
    
    Will defer til 1.7.10.
    
    * nl/http-proxy-more:
      http: rename HTTP_REAUTH to HTTP_AUTH_RETRY
      http: Avoid limit of retrying request only twice
      http: handle proxy authentication failure (error 407)
      http: handle proxy proactive authentication
      http: try http_proxy env var when http.proxy config option is not set
  14. @gitster

    Merge branch 'ct/advise-push-default' into jch

    gitster committed Mar 31, 2012
    Breaks down the cases in which "git push" fails due to non-ff into three
    categories, and gives separate advise messages.  This should be a good
    change regardless of mm/push-default-switch-warning topic.
    
    * ct/advise-push-default:
      clean up struct ref's nonfastforward field
      push: Provide situational hints for non-fast-forward errors
  15. @gitster

    Merge branch 'mm/push-default-switch-warning' into jch

    gitster committed Mar 31, 2012
    Not urgent.
    
    This resurrects an ancient patch I wrote during a discussion we had in the
    1.6.3-1.6.4 era.  This should probably come after ct/advise-push-default
    topic and at that point the advise messages need to be rephrased, taking
    the future default change into account.
    
    * mm/push-default-switch-warning:
      push: start warning upcoming default change for push.default
    
    Conflicts:
    	builtin/push.c
  16. @gitster

    Merge branch 'jk/diff-no-rename-empty' into pu

    gitster committed Mar 31, 2012
    Forbids rename detection logic from matching two empty files as renames
    during merge-recursive to prevent mismerges.
    
    * jk/diff-no-rename-empty:
      merge-recursive: don't detect renames of empty files
      teach diffcore-rename to optionally ignore empty content
      make is_empty_blob_sha1 available everywhere
      drop casts from users EMPTY_TREE_SHA1_BIN
  17. @gitster

    Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into pu

    gitster committed Mar 31, 2012
    Fixes an age old corner case bug in combine diff (only triggered with -U0
    and the hunk at the beginning of the file needs to be shown).
    
    * rs/combine-diff-zero-context-at-the-beginning:
      combine-diff: fix loop index underflow
  18. @gitster

    Merge branch 'jc/commit-unedited-template' into pu

    gitster committed Mar 31, 2012
    * jc/commit-unedited-template:
      commit: rephrase the error when user did not touch templated log message
      commit: do not trigger bogus "has templated message edited" check
      t7501: test the right kind of breakage
  19. @gitster

    Merge branch 'jk/http-backend-keep-committer-ident-env' into pu

    gitster committed Mar 31, 2012
    * jk/http-backend-keep-committer-ident-env:
      http-backend: respect existing GIT_COMMITTER_* variables
  20. @gitster

    Merge branch 'jc/push-upstream-sanity' into pu

    gitster committed Mar 31, 2012
    * jc/push-upstream-sanity:
      push: detect nonsense "upstream" check more carefully
  21. @gitster

    Merge branch 'jk/branch-quiet' into pu

    gitster committed Mar 31, 2012
    Even with "-q"uiet option, "checkout" used to report setting up tracking.
    Also "branch" learns "-q"uiet option to squelch informational message.
    
    * jk/branch-quiet:
      teach "git branch" a --quiet option
      checkout: suppress tracking message with "-q"
  22. @gitster

    Merge branch 'jc/run-hook-env-1' into pu

    gitster committed Mar 31, 2012
    Not urgent.
    
    Updates run_hook() API to be much less specific to "commit".  It would
    only be useful if people start doing more interesting things with hooks.
    
    * jc/run-hook-env-1:
      run_hook(): enhance the interface to pass arbitrary environment
  23. @gitster

    Merge branch 'sl/autoconf' into pu

    gitster committed Mar 31, 2012
    Updates our configure.ac to follow a better "autoconf" style.
    
    * sl/autoconf:
      configure: be more idiomatic
      configure: avoid some code repetitions thanks to m4_{push,pop}def
      configure: move definitions of private m4 macros before AC_INIT invocation
  24. @gitster

    Merge branch 'th/difftool-diffall' into pu

    gitster committed Mar 31, 2012
    Rolls the two-directory-diff logic from diffall script (in contrib/) into
    "git difftool" framework.
    
    * th/difftool-diffall:
      difftool: print list of valid tools with '--tool-help'
      difftool: teach difftool to handle directory diffs
      difftool: replace system call with Git::command_noisy
      difftool: eliminate setup_environment function
      difftool: stop appending '.exe' to git
      difftool: remove explicit change of PATH
      difftool: exit(0) when usage is printed
      difftool: add '--no-gui' option
      difftool: parse options using Getopt::Long
  25. @gitster

    Merge branch 'jb/am-include' into pu

    gitster committed Mar 31, 2012
    * jb/am-include:
      am: support --include option
  26. @gitster

    Merge branch 'jc/am-report-3way' into pu

    gitster committed Mar 31, 2012
    * jc/am-report-3way:
      am -3: list the paths that needed 3-way fallback
  27. @gitster

    Merge branch 'jc/fmt-merge-msg-people' into pu

    gitster committed Mar 31, 2012
    The "fmt-merge-msg" command learns to list the primary contributors
    involved in the side topic you are merging.
    
    Will defer til 1.7.10.
    
    * jc/fmt-merge-msg-people:
      fmt-merge-msg: show those involved in a merged series
  28. @gitster

    Merge branch 'jk/run-command-eacces' into pu

    gitster committed Mar 31, 2012
    When PATH contains an unreadable directory, alias expansion code did not
    kick in, and failed with an error that said "git-subcmd" was not found.
    
    * jk/run-command-eacces:
      run-command: treat inaccessible directories as ENOENT
  29. @gitster

    Merge branch 'jh/apply-free-patch' into pu

    gitster committed Mar 31, 2012
    Valgrind reports quite a lot of discarded memory inside apply.  I started
    auditing the memory ownership rules in the command, and am almost done.
    
    Will defer til 1.7.10.
    
    * jh/apply-free-patch:
      apply.c: WIP ownership audit
      apply: free unused fragments for submodule patch
      apply: free patch->result
      apply: release memory for fn_table
      apply: free patch->{def,old,new}_name fields
      apply: rename free_patch() to free_patch_list()
      apply: do not leak patches and fragments
  30. @gitster

    Merge branch 'jc/maint-merge-autoedit' into pu

    gitster committed Mar 31, 2012
    In 1.7.10, we added GIT_MERGE_AUTOEDIT=no environment variable to help
    older scripts to let them refuse giving users a chance to explain the
    merge, but forgot that 1.7.9 automatically opens an editor when merging an
    annotated tag, and there is no equivalent escape hatch.  A merge of this
    topic to 1.7.10 track becomes a no-op, but we may want to apply this to
    the 1.7.9.x series.
    
    * jc/maint-merge-autoedit:
      merge: backport GIT_MERGE_AUTOEDIT support
    
    Conflicts:
    	Documentation/merge-options.txt
  31. @gitster

    Merge branch 'ss/git-svn-prompt-sans-terminal' into pu

    gitster committed Mar 31, 2012
    The bottom one has been replaced with a rewrite based on comments
    from Ævar. The second one needs more work, both in perl/Git.pm and
    prompt.c, to give precedence to tty over SSH_ASKPASS when terminal
    is available.
    
    * ss/git-svn-prompt-sans-terminal:
      fixup! 15eaaf4
      git-svn, perl/Git.pm: extend Git::prompt helper for querying users
      perl/Git.pm: "prompt" helper to honor GIT_ASKPASS and SSH_ASKPASS
  32. @gitster

    Merge branch 'hv/submodule-recurse-push' into pu

    gitster committed Mar 31, 2012
    The bottom one was not clearly explained and needs a reroll.
    
    * hv/submodule-recurse-push:
      push: teach --recurse-submodules the on-demand option
      Refactor submodule push check to use string list instead of integer
      Teach revision walking machinery to walk multiple times sequencially
    
    Conflicts:
    	transport.h
  33. @gitster

    Merge branch 'nd/columns' into pu

    gitster committed Mar 31, 2012
    Rerolled again.  Modulo minor nits, looked nicer than the previous round.
    
    * nd/columns:
      column: support grouping entries
      column: support "denser" mode
      ls-files: support --column
      tag: add --column
      column: support piping stdout to external git-column process
      status: add --column
      branch: add --column
      help: reuse print_columns() for help -a
      column: add dense layout support
      column: add columnar layout
      Stop starting pager recursively
      Add column layout skeleton and git-column
    
    Conflicts:
    	builtin/branch.c
  34. @gitster

    Merge branch 'lp/maint-diff-three-dash-with-graph' into pu

    gitster committed Mar 31, 2012
    The combination of two options "log --graph --stat" was an obscure corner
    case nobody cared about, and did not correctly show the ancestry graph
    lines.
    
    I've split the original patch into three pieces, one for fixes to two
    different issues and a test.  Also the test is adjusted so that the series
    can be back-merged to older codebase that did not have 7f81463 (Use
    correct grammar in diffstat summary line, 2012-02-01) that first appeared
    in v1.7.9.2
    
    With a review from Zbigniew, I would expect that this would be rerolled
    again.
    
    * lp/maint-diff-three-dash-with-graph:
      t4202: add test for "log --graph --stat -p" separator lines
      log --graph: fix break in graph lines
      log --graph --stat: three-dash separator should come after graph lines
  35. @gitster

    Merge branch 'nd/threaded-index-pack' into pu

    gitster committed Mar 31, 2012
    Another reroll after a bugreport on pthread usage discovered by Ramsey,
    but it seems the topic is cooking between Ramsay and Duy out of tree.
    Waiting for resolution.
    
    * nd/threaded-index-pack:
      index-pack: support multithreaded delta resolving
      index-pack: split second pass obj handling into own function
  36. @gitster

    Merge branch 'wk/gitweb-snapshot-use-if-modified-since' into pu

    gitster committed Mar 31, 2012
    Makes 'snapshot' request to "gitweb" honor If-Modified-Since: header,
    based on the commit date.
    
    * wk/gitweb-snapshot-use-if-modified-since:
      gitweb: add If-Modified-Since handling to git_snapshot().
      gitweb: refactor If-Modified-Since handling
      gitweb: add `status` headers to git_feed() responses.
  37. @gitster

    Merge branch 'jc/split-blob' into pu

    gitster committed Mar 31, 2012
    Not ready.
    
    I finished the streaming checkout codepath, but as explained in
    127b177 (bulk-checkin: support chunked-object encoding, 2011-11-30),
    these are still early steps of a long and painful journey. At least
    pack-objects and fsck need to learn the new encoding for the series
    to be usable locally, and then index-pack/unpack-objects needs to
    learn it to be used remotely.
    
    Given that I heard a lot of noise that people want large files, and
    that I was asked by somebody at GitTogether'11 privately for an
    advice on how to pay developers (not me) to help adding necessary
    support, I am somewhat dissapointed that the original patch series
    that was sent almost two months ago still remains here without much
    comments and updates from the developer community. I even made the
    interface to the logic that decides where to split chunks easily
    replaceable, and I deliberately made the logic in the original patch
    extremely stupid to entice others, especially the "bup" fanboys, to
    come up with a better logic, thinking that giving people an easy
    target to shoot for, they may be encouraged to help out. The plan is
    not working :-(.
    
    * jc/split-blob:
      chunked-object: streaming checkout
      chunked-object: fallback checkout codepaths
      bulk-checkin: support chunked-object encoding
      bulk-checkin: allow the same data to be multiply hashed
      new representation types in the packstream
      varint-in-pack: refactor varint encoding/decoding
    
    Conflicts:
    	t/t1050-large.sh
  38. @gitster

    Merge branch 'dg/subtree' into pu

    gitster committed Mar 31, 2012
    A test merge of the 'subtree'.
    
    * dg/subtree: (108 commits)
      Add Subtree Test Makefile
      Build Subtree
      Use Project Config Files
      Remove Unneeded Files
      Set TEST_DIRECTORY
      Use Test Harness
      Rename Test
      Move Tests Into Subdirectory
      Skip commit objects that should be trees, rather than copying them.
      It's also okay if an expected tree object is actually a commit.
      Added check to order of processed commits.
      Split cmd now processes commits in topo order.
      Fix a few typos/grammar-o's in the preceding commit.
      docs: Description, synopsys, options and examples changes.
      Fixing eval syntax error.
      Fix typo: an -> a
      docs: simplify example 1
      Another fix for PATH and msysgit.
      (Hopefully) fix PATH setting for msysgit.
      Fixed regression with splitting out new subtree
      ...
  39. @gitster

    Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd

    Ben Walton committed with gitster Mar 31, 2012
    During the testing of the 1.7.10 rc series on Solaris for OpenCSW, it
    was discovered that t7006-pager was failing due to finding a bad "sh"
    in PATH after a call to execvp("sh", ...).  This call was setup by
    run_command.c:prepare_shell_cmd.
    
    The PATH in use at the time saw /opt/csw/bin given precedence to
    traditional Solaris paths such as /usr/bin and /usr/xpg4/bin.  A
    package named schilyutils (Joerg Schilling's utilities) was installed
    on the build system and it delivered a modified version of the
    traditional Solaris /usr/bin/sh as /opt/csw/bin/sh.  This version of
    sh suffers from many of the same problems as /usr/bin/sh.
    
    The command-specific pager test failed due to the broken "sh" handling
    ^ as a pipe character.  It tried to fork two processes when it
    encountered "sed s/^/foo:/" as the pager command.  This problem was
    entirely dependent on the PATH of the user at runtime.
    
    Possible fixes for this issue are:
    
    1. Use the standard system() or popen() which both launch a POSIX
       shell on Solaris as long as _POSIX_SOURCE is defined.
    
    2. The git wrapper could prepend SANE_TOOL_PATH to PATH thus forcing
       all unqualified commands run to use the known good tools on the
       system.
    
    3. The run_command.c:prepare_shell_command() could use the same
       SHELL_PATH that is in the #! line of all all scripts and not rely
       on PATH to find the sh to run.
    
    Option 1 would preclude opening a bidirectional pipe to a filter
    script and would also break git for Windows as cmd.exe is spawned from
    system() (cf. v1.7.5-rc0~144^2, "alias: use run_command api to execute
    aliases, 2011-01-07).
    
    Option 2 is not friendly to users as it would negate their ability to
    use tools of their choice in many cases.  Alternately, injecting
    SANE_TOOL_PATH such that it takes precedence over /bin and /usr/bin
    (and anything with lower precedence than those paths) as
    git-sh-setup.sh does would not solve the problem either as the user
    environment could still allow a bad sh to be found.  (Many OpenCSW
    users will have /opt/csw/bin leading their PATH and some subset would
    have schilyutils installed.)
    
    Option 3 allows us to use a known good shell while still honouring the
    users' PATH for the utilities being run.  Thus, it solves the problem
    while not negatively impacting either users or git's ability to run
    external commands in convenient ways.  Essentially, the shell is a
    special case of tool that should not rely on SANE_TOOL_PATH and must
    be called explicitly.
    
    With this patch applied, any code path leading to
    run_command.c:prepare_shell_cmd can count on using the same sane shell
    that all shell scripts in the git suite use.  Both the build system
    and run_command.c will default this shell to /bin/sh unless
    overridden.
    
    Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
    Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  40. @gitster

    Merge branch 'bw/spawn-via-shell-path' into pu

    gitster committed Mar 31, 2012
    "sh" on the user's PATH may be utterly broken on some systems;
    consistently use SHELL_PATH even from inside run-command API.
    
    * bw/spawn-via-shell-path:
      Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd
  41. @gitster

    Merge branch 'mk/gitweb-diff-hl' into pu

    gitster committed Mar 31, 2012
    * mk/gitweb-diff-hl:
      gitweb: Refinement highlightning in combined diffs
      gitweb: Highlight interesting parts of diff
      gitweb: Push formatting diff lines to print_diff_chunk()
      gitweb: Move HTML-formatting diff line back to process_diff_line()
      gitweb: Use print_diff_chunk() for both side-by-side and inline diffs
      gitweb: Extract print_sidebyside_diff_lines()
      gitweb: Pass esc_html_hl_regions() options to esc_html()
      gitweb: esc_html_hl_regions(): Don't create empty <span> elements
Commits on Apr 1, 2012
  1. @marcomsousa

    l10n: Inital Portuguese Portugal language (pt_PT)

    marcomsousa committed Mar 31, 2012
    Signed-off-by: Marco Sousa <marcomsousa@gmail.com>