Permalink
Commits on Feb 11, 2011
  1. Git 1.7.4.1

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Feb 11, 2011
  2. Merge branch 'jc/fsck-fixes' into maint

    * jc/fsck-fixes:
      fsck: do not give up too early in fsck_dir()
      fsck: drop unused parameter from traverse_one_object()
    gitster committed Feb 11, 2011
  3. clone: fixup recurse_submodules option

    The recurse_submodules option was added in ccdd3da to bring 'git clone'
    into line with 'git fetch' and future commands. The correct option should
    have been "recurse-submodules".
    
    Signed-off-by: Chris Packham <judge.packham@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    cpackham committed with gitster Feb 10, 2011
  4. svn-fe: warn about experimental status

    svn-fe is young and some coming cleanups might involve backward
    incompatible UI changes.  Add some words of warning to the manual so
    early adopters that are not following the project closely don't get
    burned.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Feb 11, 2011
Commits on Feb 10, 2011
  1. compat: helper for detecting unsigned overflow

    The idiom (a + b < a) works fine for detecting that an unsigned
    integer has overflowed, but a more explicit
    
    	unsigned_add_overflows(a, b)
    
    might be easier to read.
    
    Define such a macro, expanding roughly to ((a) < UINT_MAX - (b)).
    Because the expansion uses each argument only once outside of sizeof()
    expressions, it is safe to use with arguments that have side effects.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Oct 11, 2010
  2. Merge branch 'maint-1.7.0' into maint

    * maint-1.7.0:
      fast-import: introduce "feature notes" command
      fast-import: clarify documentation of "feature" command
    
    Conflicts:
    	Documentation/git-fast-import.txt
    gitster committed Feb 10, 2011
  3. fast-import: introduce "feature notes" command

    Here is a 'feature' command for streams to use to require support for
    the notemodify (N) command.
    
    When the 'feature' facility was introduced (v1.7.0-rc0~95^2~4,
    2009-12-04), the notes import feature was old news (v1.6.6-rc0~21^2~8,
    2009-10-09) and it was not obvious it deserved to be a named feature.
    But now that is clear, since all major non-git fast-import backends
    lack support for it.
    
    Details: on git version with this patch applied, any "feature notes"
    command in the features/options section at the beginning of a stream
    will be treated as a no-op.  On fast-import implementations without
    the feature (and older git versions), the command instead errors out
    with a message like
    
    	This version of fast-import does not support feature notes.
    
    So by declaring use of notes at the beginning of a stream, frontends
    can avoid wasting time and other resources when the backend does not
    support notes.  (This would be especially important for backends that
    do not support rewinding history after a botched import.)
    
    Improved-by: Thomas Rast <trast@student.ethz.ch>
    Improved-by: Sverre Rabbelier <srabbelier@gmail.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Feb 9, 2011
  4. fast-import: clarify documentation of "feature" command

    The "feature" command allows streams to specify options for the import
    that must not be ignored.  Logically, they are part of the stream,
    even though technically most supported features are synonyms to
    command-line options.
    
    Make this more obvious by being more explicit about how the analogy
    between most "feature" commands and command-line options works.  Treat
    the feature (import-marks) that does not fit this analogy separately.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Nov 28, 2010
Commits on Feb 9, 2011
  1. Documentation/merge subtree How-To: fix typo

    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Uwe Kleine-König committed with gitster Feb 9, 2011
Commits on Feb 7, 2011
  1. pull: Document the "--[no-]recurse-submodules" options

    In commits be254a0 and 7dce19d the handling of the new fetch options
    "--[no-]recurse-submodules" had been added to git-pull.sh. But they were
    not documented as the pull options they now are, so let's fix that.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jlehmann committed with gitster Feb 7, 2011
  2. quote.h: simplify the inclusion

    Attempting to include quote.h without first including strbuf.h results
    in warnings:
    
     ./quote.h:33:33: warning: ‘struct strbuf’ declared inside parameter list
     ./quote.h:33:33: warning: its scope is only this definition or declaration, which is probably not what you want
     ./quote.h:34:34: warning: ‘struct strbuf’ declared inside parameter list
     ...
    
    Add a toplevel declaration for struct strbuf to avoid this.
    
    While at it, stop including system headers from quote.h.  git source
    files already need to include git-compat-util.h sooner to ensure the
    appropriate feature test macros are defined.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Jan 5, 2011
  3. sha1_object_info: examine cached_object store too

    Cached object store was added in d66b37b (Add pretend_sha1_file()
    interface. - 2007-02-04) as a way to temporarily inject some objects
    to object store.
    
    But only read_sha1_file() knows about this store. While it will return
    an object from this store, sha1_object_info() will happily say
    "object not found".
    
    Teach sha1_object_info() about the cached store for consistency.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pclouds committed with gitster Feb 5, 2011
  4. sha1_file.c: move find_cached_object up so sha1_object_info can use it

    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pclouds committed with gitster Feb 5, 2011
  5. Add const to parse_{commit,tag}_buffer()

    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pclouds committed with gitster Feb 5, 2011
  6. diff: support --cached on unborn branches

    "git diff --cached" (without revision) used to mean "git diff --cached
    HEAD" (i.e. the user was too lazy to type HEAD). This "correctly"
    failed when there was no commit yet. But was that correctness useful?
    
    This patch changes the definition of what particular command means.
    It is a request to show what _would_ be committed without further "git
    add". The internal implementation is the same "git diff --cached HEAD"
    when HEAD exists, but when there is no commit yet, it compares the index
    with an empty tree object to achieve the desired result.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    pclouds committed with gitster Feb 3, 2011
  7. gitweb: Mention optional Perl modules in INSTALL

    Some optional additional Perl modules are required for some of extra
    features.  Mention those in gitweb/INSTALL.
    
    Signed-off-by: Jakub Narebski <jnareb@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jnareb committed with gitster Feb 3, 2011
  8. post-receive-email: suppress error if description file missing

    Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    sitaramc committed with gitster Feb 3, 2011
  9. t7407: fix line endings for mingw build

    Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    patthoyts committed with gitster Feb 3, 2011
  10. t4120-apply-popt: help systems with core.filemode=false

    A test case verifies that filemode-only patches work as expected. Help
    systems where "test -x" does not work by applying the test patch also to
    the index, where the effects can be verified even on such systems.
    
    Signed-off-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    j6t committed with gitster Feb 3, 2011
  11. t3509: use unconstrained initial test to setup repository.

    The first test did not run on msysGit due to the SYMLINKS constraint and
    so subsequent tests failed because the test repository was not initialized.
    
    Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    patthoyts committed with gitster Feb 3, 2011
  12. start_command: flush buffers in the WIN32 code path as well

    The POSIX code path did The Right Thing already, but we have to do the same
    on Windows.
    
    This bug caused failures in t5526-fetch-submodules, where the output of
    'git fetch --recurse-submodules' was in the wrong order.
    
    Debugged-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    j6t committed with gitster Feb 4, 2011
  13. bundle: Use OFS_DELTA in bundle files

    git-bundle first appeared in 2e0afaf ("Add git-bundle") in Feb 2007,
    and first shipped in Git 1.5.1.
    
    However, OFS_DELTA is an even earlier invention, coming about in
    eb32d23 ("introduce delta objects with offset to base") in Sep 2006,
    and first shipped in Git 1.4.4.5.
    
    OFS_DELTA is smaller, about 3.2%-5% smaller, and is typically faster
    to access than REF_DELTA because the exact location of the delta base
    is available after parsing the object header.  Since all bundle aware
    versions of Git are also OFS_DELTA aware, just make it the default.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Acked-by: Nicolas Pitre <nico@fluxnic.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    spearce committed with gitster Feb 6, 2011
Commits on Jan 31, 2011
  1. Merge branch 'jl/fetch-submodule-recursive' into maint

    * jl/fetch-submodule-recursive:
      t5526: Fix wrong argument order in "git config"
    gitster committed Jan 31, 2011
  2. t5526: Fix wrong argument order in "git config"

    This fixes a typo where the "git config" arguments "-f" and "--unset" were
    swapped leading to the creation of a "--unset" file.
    
    Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jlehmann committed with gitster Jan 31, 2011
  3. Git 1.7.4

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jan 30, 2011
Commits on Jan 27, 2011
  1. fsck: do not give up too early in fsck_dir()

    When there is a random garbage file whose name happens to be 38-byte
    long in a .git/objects/??/ directory, the loop terminated prematurely
    without marking all the other files that it hasn't checked in the
    readdir() loop.
    
    Treat such a file just like any other garbage file, and do not break out
    of the readdir() loop.
    
    While at it, replace repeated sprintf() calls to a single one outside the
    loop.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jan 26, 2011
  2. fsck: drop unused parameter from traverse_one_object()

    Also add comments to seemingly unsafe pointer dereferences, that
    are all safe.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jan 26, 2011
  3. Don't pass "--xhtml" to hightlight in gitweb.perl script.

    The "--xhtml" option is supported only in highlight < 3.0. There is no option
    to enforce (X)HTML output format compatible with both highlight < 3.0 and
    highlight >= 3.0. However default output format is HTML so we don't need to
    explicitly specify it.
    
    Signed-off-by: Adam Tkac <atkac@redhat.com>
    Helped-by: Jakub Narebski <jnareb@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Adam Tkac committed with gitster Jan 27, 2011
  4. Merge branch 'maint'

    * maint:
      rebase -i: clarify in-editor documentation of "exec"
      tests: sanitize more git environment variables
      fast-import: treat filemodify with empty tree as delete
      rebase: give a better error message for bogus branch
      rebase: use explicit "--" with checkout
    
    Conflicts:
    	t/t9300-fast-import.sh
    gitster committed Jan 27, 2011
  5. rebase -i: clarify in-editor documentation of "exec"

    The hints in the current "instruction sheet" template look like so:
    
     # Rebase 3f14246..a1d7e01 onto 3f14246
     #
     # Commands:
     #  p, pick = use commit
     #  r, reword = use commit, but edit the commit message
     #  e, edit = use commit, but stop for amending
     #  s, squash = use commit, but meld into previous commit
     #  f, fixup = like "squash", but discard this commit's log message
     #  x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
     #
     # If you remove a line here THAT COMMIT WILL BE LOST.
     # However, if you remove everything, the rebase will be aborted.
     #
    
    This does not make it clear that the format of each line is
    
    	<insn> <commit id> <explanatory text that will be printed>
    
    but the reader will probably infer that from the automatically
    generated pick examples above it.
    
    What about the "exec" instruction?  By analogy, I might imagine that
    the format of that line is "exec <command> <explanatory text>", and
    the "x <cmd>" hint does not address that question (at first I read it
    as taking an argument <cmd> that is the name of a shell).  Meanwhile,
    the mention of <cmd> makes the hints harder to scan as a table.
    
    So remove the <cmd> and add some words to remind the reader that
    "exec" runs a command named by the rest of the line.  To make room, it
    is left to the manpage to explain that that command is run using
    $SHELL and that nonzero status from that command will pause the
    rebase.
    
    Wording from Junio.
    
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Jan 21, 2011
  6. tests: sanitize more git environment variables

    These variables should generally not be set in one's
    environment, but they do get set by rebase, which means
    doing an interactive rebase like:
    
      pick abcd1234 foo
      exec make test
    
    will cause false negatives in the test suite.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Jan 26, 2011
  7. Merge branch 'jn/fast-import-empty-tree-removal' into maint

    * jn/fast-import-empty-tree-removal:
      fast-import: treat filemodify with empty tree as delete
    gitster committed Jan 27, 2011
  8. fast-import: treat filemodify with empty tree as delete

    Normal git processes do not allow one to build a tree with an empty
    subtree entry without trying hard at it.  This is in keeping with the
    general UI philosophy: git tracks content, not empty directories.
    
    v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include
    an empty subtree in fast-import's active commit:
    
    	M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir
    
    One can trigger this by reading an empty tree (for example, the tree
    corresponding to an empty root commit) and trying to move it to a
    subtree.  It is better and more closely analogous to 'git read-tree
    --prefix' to treat such commands as requests to remove the subtree.
    
    Noticed-by: David Barr <david.barr@cordelta.com>
    Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    jrn committed with gitster Jan 27, 2011
  9. rebase: give a better error message for bogus branch

    When you give a non-existent branch to git-rebase, it spits
    out the usage. This can be confusing, since you may
    understand the usage just fine, but simply have made a
    mistake in the branch name.
    
    Before:
    
      $ git rebase origin bogus
      Usage: git rebase ...
    
    After:
    
      $ git rebase origin bogus
      fatal: no such branch: bogus
      Usage: git rebase ...
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Jan 27, 2011
  10. rebase: use explicit "--" with checkout

    In the case of a ref/pathname conflict, checkout will
    already do the right thing and checkout the ref. However,
    for a non-existant ref, this has two advantages:
    
      1. If a file with that pathname exists, rebase will
         refresh the file from the index and then rebase the
         current branch instead of producing an error.
    
      2. If no such file exists, the error message using an
         explicit "--" is better:
    
           # before
           $ git rebase -i origin bogus
           error: pathspec 'bogus' did not match any file(s) known to git.
           Could not checkout bogus
    
           # after
           $ git rebase -i origin bogus
           fatal: invalid reference: bogus
           Could not checkout bogus
    
    The problems seem to be trigger-able only through "git
    rebase -i", as regular git-rebase checks the validity of the
    branch parameter as a ref very early on. However, it doesn't
    hurt to be defensive.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    peff committed with gitster Jan 27, 2011