Permalink
Commits on Aug 24, 2008
  1. GIT 1.6.0.1

    gitster committed Aug 24, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Merge branch 'ag/maint-combine-diff-fix' into maint

    gitster committed Aug 24, 2008
    * ag/maint-combine-diff-fix:
      Respect core.autocrlf in combined diff
  3. Merge branch 'mv/maint-merge-fix' into maint

    gitster committed Aug 24, 2008
    * mv/maint-merge-fix:
      merge: fix numerus bugs around "trivial merge" area
  4. Documentation: clarify pager configuration

    Jonathan Nieder committed with gitster Aug 24, 2008
    The unwary user may not know how to disable the -FRSX options.
    
    Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. Documentation: clarify pager.<cmd> configuration

    Jonathan Nieder committed with gitster Aug 24, 2008
    It was not obvious from the text that pager.<cmd> is a boolean
    setting.
    
    While we're changing the description, make some other
    improvements: lest we forget and fret, clarify that -p and
    pager.<cmd> do not kick in when stdout is not a tty; point to
    related core.pager and GIT_PAGER settings; use renamed --paginate
    option.
    
    Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. Clean up the git-p4 documentation

    tronical committed with gitster Aug 24, 2008
    This patch massages the documentation a bit for improved readability and cleans
    it up from outdated options/commands.
    
    Signed-off-by: Simon Hausmann <simon@lst.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. Respect core.autocrlf in combined diff

    angavrilov committed with gitster Aug 23, 2008
    Fix git-diff to make it produce useful 3-way diffs for merge conflicts in
    repositories with autocrlf enabled. Otherwise it always reports that the
    whole file was changed, because it uses the contents from the working tree
    without necessary conversion.
    
    Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. Makefile: enable SNPRINTF_RETURNS_BOGUS for HP-UX

    Miklos Vajna committed with gitster Aug 23, 2008
    In 81cc66a, customization has been added to Makefile for supporting
    HP-UX, but git commit is still problematic. This should fix the issue.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Acked-by: Robert Schiele <rschiele@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. merge: fix numerus bugs around "trivial merge" area

    gitster committed Aug 23, 2008
    The "trivial merge" codepath wants to optimize itself by making an
    internal call to the read-tree machinery, but it does not read the index
    before doing so, and the codepath is never exercised.  Incidentally, this
    failure to read the index upfront means that the safety to refuse doing
    anything when the index is unmerged does not kick in, either.
    
    These two problem are fixed by using read_cache_unmerged() that does read
    the index before checking if it is unmerged at the beginning of
    cmd_merge().
    
    The primary logic of the merge, however, assumes that the process never
    reads the index in-core, and the call to write_cache_as_tree() it makes
    from write_tree_trivial() will always read from the on-disk index that is
    prepared the strategy back-ends.  This assumption is now broken by the
    above fix.  To fix this issue, we now call discard_cache() before calling
    write_tree_trivial() when it wants to write the on-disk index as a tree.
    
    When multiple strategies are tried, their results are evaluated by reading
    the resulting index and inspecting it.  The codepath needs to make a call
    to read_cache() for each successful strategy, and for that to work, they
    need to discard_cache() the one read by the previous round.
    
    Also the "trivial merge" forgot that the current commit is one of the
    parents of the resulting commit.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. unpack_trees(): protect the handcrafted in-core index from read_cache()

    gitster committed Aug 23, 2008
    unpack_trees() rebuilds the in-core index from scratch by allocating a new
    structure and finishing it off by copying the built one to the final
    index.
    
    The resulting in-core index is Ok for most use, but read_cache() does not
    recognize it as such.  The function is meant to be no-op if you already
    have loaded the index, until you call discard_cache().
    
    This change the way read_cache() detects an already initialized in-core
    index, by introducing an extra bit, and marks the handcrafted in-core
    index as initialized, to avoid this problem.
    
    A better fix in the longer term would be to change the read_cache() API so
    that it will always discard and re-read from the on-disk index to avoid
    confusion.  But there are higher level API that have relied on the current
    semantics, and they and their users all need to get converted, which is
    outside the scope of 'maint' track.
    
    An example of such a higher level API is write_cache_as_tree(), which is
    used by git-write-tree as well as later Porcelains like git-merge, revert
    and cherry-pick.  In the longer term, we should remove read_cache() from
    there and add one to cmd_write_tree(); other callers expect that the
    in-core index they prepared is what gets written as a tree so no other
    change is necessary for this particular codepath.
    
    The original version of this patch marked the index by pointing an
    otherwise wasted malloc'ed memory with o->result.alloc, but this version
    uses Linus's idea to use a new "initialized" bit, which is conceptually
    much cleaner.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 23, 2008
  1. git-p4: Fix one-liner in p4_write_pipe function.

    torarvid committed with gitster Aug 21, 2008
    The function built a p4 command string via the p4_build_cmd function, but
    ignored the result.
    
    Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 22, 2008
  1. Completion: add missing '=' for 'diff --diff-filter'

    Eric Raible committed with gitster Aug 22, 2008
    Signed-off-by: Eric Raible <raible@gmail.com>
    Acked-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Fix 'git help help'

    Miklos Vajna committed with gitster Aug 21, 2008
    git help foo invokes man git-foo if foo is a git command, otherwise it
    invokes man gitfoo. 'help' is not a git command, but the manual page is
    called git-help, so add this special exception.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Acked-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 21, 2008
  1. compat/snprintf.c: handle snprintf's that always return the # chars t…

    Brandon Casey committed with gitster Aug 21, 2008
    …ransmitted
    
    Some platforms provide a horribly broken snprintf. More broken than the
    platforms that return -1 when there is too little space in the target buffer
    for the formatted string. Some platforms provide an snprintf which _always_
    returns the number of characters transmitted to the buffer, regardless of
    whether there was enough space or not.
    
    IRIX 6.5 is such a platform. IRIX does have a working snprintf(), but it
    is only provided when _NO_XOPEN5 evaluates to zero, and this only happens
    if _XOPEN_SOURCE is defined, but definition of _XOPEN_SOURCE prevents
    inclusion of many other common functions and defines. So it must be avoided.
    
    Work around these horribly broken snprintf implementations by detecting an
    snprintf call which results in the number of transmitted characters exactly
    equal to the length of our buffer and retrying with a larger buffer just to
    be safe.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Acked-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. git-svn: fix dcommit to urls with embedded usernames

    Eric Wong committed with gitster Aug 20, 2008
    Don't rely on the extracted URL from working_head_info since that has the
    username removed.  Instead use the $gs->full_url method (as before with
    ba24e74 (git-svn: add ability to specify --commit-url for dcommit,
    2008-08-07)) to give us the URL to commit to if --commit-url is not
    specified.
    
    Aditionally, since we clean usernames from URLs, checking the URL after
    rebase can fail because it doesn't match the URL we used to commit; so
    unconditionally provide a username-free URL for checking the result of the
    refetch.
    
    Signed-off-by: Eric Wong <normalperson@yhbt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. revision.h: make show_early_output an extern which is defined in revi…

    Brandon Casey committed with gitster Aug 21, 2008
    …sion.c
    
    The variable show_early_output is defined in revision.c and should be
    declared extern in revision.h so that the linker does not complain
    about multiply defined variables.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 20, 2008
  1. Update draft release notes for 1.6.0.1

    gitster committed Aug 20, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Add hints to revert documentation about other ways to undo changes

    Tarmigan Casebolt committed with gitster Aug 19, 2008
    Based on its name, people may read the 'git revert' documentation when
    they want to undo local changes, especially people who have used other
    SCM's.  'git revert' may not be what they had in mind, but git
    provides several other ways to undo changes to files.  We can help
    them by pointing them towards the git commands that do what they might
    want to do.
    
    Cc: Daniel Barkalow <barkalow@iabervon.org>
    Cc: Lea Wiemann <lewiemann@gmail.com>
    Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. Install templates with the user and group of the installing personality

    Johannes Sixt committed with gitster Aug 20, 2008
    If 'make install' was run with sufficient privileges, then the installed
    templates, which are copied using 'tar', would receive the user and group
    of whoever built git. This instructs 'tar' to ignore the user and group
    that are recorded in the archive.
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. "git-merge": allow fast-forwarding in a stat-dirty tree

    gitster committed Aug 20, 2008
    We used to refresh the index to clear stat-dirtyness before a fast-forward
    merge.  Recent C rewrite forgot to do this.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. completion: find out supported merge strategies correctly

    gitster committed Aug 20, 2008
    "git-merge" is a binary executable these days, and looking for assignment
    to $all_strategies variable with grep/sed does not work well.
    
    When asked for an unknown strategy, pre-1.6.0 and post-1.6.0 "git merge"
    commands respectively say:
    
        $ $HOME/git-snap-v1.5.6.5/bin/git merge -s help
        available strategies are: recur recursive octopus resolve stupid ours subtree
        $ $HOME/git-snap-v1.6.0/bin/git merge -s help
        Could not find merge strategy 'help'.
        Available strategies are: recursive octopus resolve ours subtree.
    
    both on their standard error stream.  We can use this to learn what
    strategies are supported.
    
    The sed script is written in such a way that it catches both old and new
    message styles ("Available" vs "available", and the full stop at the end).
    It also allows future versions of "git merge" to line-wrap the list of
    strategies, and add extra comments, like this:
    
        $ $HOME/git-snap-v1.6.1/bin/git merge -s help
        Could not find merge strategy 'help'.
        Available strategies are: blame recursive octopus resolve ours
        subtree.
        Also you have custom strategies: theirs
    
        Make sure you spell strategy names correctly.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. decorate: allow const objects to be decorated

    peff committed with gitster Aug 20, 2008
    We don't actually modify the struct object, so there is no
    reason not to accept const versions (and this allows other
    callsites, like the next patch, to use the decoration
    machinery).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  7. for-each-ref: cope with tags with incomplete lines

    gitster committed Aug 20, 2008
    If you have a tag with a single, incomplete line as its payload, asking
    git-for-each-ref for its %(body) element accessed a NULL pointer.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  8. diff --check: do not get confused by new blank lines in the middle

    gitster committed Aug 20, 2008
    The code remembered that the last diff output it saw was an empty line,
    and tried to reset that state whenever it sees a context line, a non-blank
    new line, or a new hunk.  However, this codepath asks the underlying diff
    engine to feed diff without any context, and the "just saw an empty line"
    state was not reset if you added a new blank line in the last hunk of your
    patch, even if it is not the last line of the file.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  9. remote.c: remove useless if-before-free test

    Jim Meyering committed with gitster Aug 19, 2008
    We removed a handful of these useless if-before-free tests several months
    ago.  This change removes a new one that snuck back in.
    
    Signed-off-by: Jim Meyering <meyering@redhat.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  10. mailinfo: avoid violating strbuf assertion

    peff committed with gitster Aug 19, 2008
    In handle_from, we calculate the end boundary of a section
    to remove from a strbuf using strcspn like this:
    
      el = strcspn(buf, set_of_end_boundaries);
      strbuf_remove(&sb, start, el + 1);
    
    This works fine if "el" is the offset of the boundary
    character, meaning we remove up to and including that
    character. But if the end boundary didn't match (that is, we
    hit the end of the string as the boundary instead) then we
    want just "el". Asking for "el+1" caught an out-of-bounds
    assertion in the strbuf library.
    
    This manifested itself when we got a 'From' header that had
    just an email address with nothing else in it (the end of
    the string was the end of the address, rather than, e.g., a
    trailing '>' character), causing git-mailinfo to barf.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  11. git format-patch: avoid underrun when format.headers is empty or all NLs

    Jim Meyering committed with gitster Aug 19, 2008
    * builtin-log.c (add_header): Avoid a buffer underrun when
    format.headers is empty or all newlines.  Reproduce with this:
    git config format.headers '' && git format-patch -1
    
    Signed-off-by: Jim Meyering <meyering@redhat.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 19, 2008
  1. t1002-read-tree-m-u-2way.sh: use 'git diff -U0' rather than 'diff -U0'

    Brandon Casey committed with gitster Aug 18, 2008
    Some old platforms have an old diff which doesn't have the -U option.
    'git diff' can be used in its place. Adjust the comparison function to
    strip git's additional header lines to make this possible.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. adapt git-cvsserver manpage to dash-free syntax

    schiele committed with gitster Aug 18, 2008
    Signed-off-by: Robert Schiele <rschiele@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. mailinfo: re-fix MIME multipart boundary parsing

    dzickusrh committed with gitster Aug 14, 2008
    Recent changes to is_multipart_boundary() caused git-mailinfo to segfault.
    The reason was after handling the end of the boundary the code tried to look
    for another boundary.  Because the boundary list was empty, dereferencing
    the pointer to the top of the boundary caused the program to go boom.
    
    The fix is to check to see if the list is empty and if so go on its merry
    way instead of looking for another boundary.
    
    I also fixed a couple of increments and decrements that didn't look correct
    relating to content_top.
    
    The boundary test case was updated to catch future problems like this again.
    
    Signed-off-by: Don Zickus <dzickus@redhat.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 17, 2008
  1. Start 1.6.0.X maintenance series

    gitster committed Aug 17, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. GIT 1.6.0

    gitster committed Aug 17, 2008
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. Merge git-gui 0.11.0

    gitster committed Aug 17, 2008
  4. Merge branch 'ak/p4'

    gitster committed Aug 17, 2008
    * ak/p4:
      Utilise our new p4_read_pipe and p4_write_pipe wrappers
      Add p4 read_pipe and write_pipe wrappers
      Put in the two other configuration elements found in the source
      Put some documentation in about the parameters that have been added
      Move git-p4.syncFromOrigin into a configuration parameters section
      Consistently use 'git-p4' for the configuration entries
      If the user has configured various parameters, use them.
      Switch to using 'p4_build_cmd'
      If we are in verbose mode, output what we are about to run (or return)
      Add a single command that will be used to construct the 'p4' command
      Utilise the new 'p4_system' function.
      Have a command that specifically invokes 'p4' (via system)
      Utilise the new 'p4_read_pipe_lines' command
      Create a specific version of the read_pipe_lines command for p4 invocations
    
    Conflicts:
    	contrib/fast-import/git-p4
  5. git-p4: chdir now properly sets PWD environment variable in msysGit

    Robert Blum committed with gitster Aug 1, 2008
    P4 on Windows expects the PWD environment variable to be set to the
    current working dir, but os.chdir in python doesn't do so.
    
    Signed-off-by: Robert Blum <rob.blum@gmail.com>
    Acked-by: Simon Hausmann <simon@lst.de>
    Acked-by: Han-Wen Nienhuys <hanwen@xs4all.nl>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>