Permalink
Commits on Jan 12, 2007
  1. GIT v1.5.0-rc1

    Junio C Hamano
    Junio C Hamano committed Jan 12, 2007
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. plug a few leaks in revision walking used in describe.

    Junio C Hamano
    Junio C Hamano committed Jan 11, 2007
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. Chose better tag names in git-describe after merges.

    spearce authored and Junio C Hamano committed Jan 10, 2007
    Recently git.git itself encountered a situation on its master and
    next branches where git-describe stopped reporting 'v1.5.0-rc0-gN'
    and instead started reporting 'v1.4.4.4-gN'.  This appeared to be
    a backward jump in version numbering.
    
      maint     o-------------------4
                \                    \
      master     o-o-o-o-o-o-o-5-o-C-o-W
    
    The issue is that commit C in the diagram claims it is version
    1.5.0, as the tag v1.5.0 is placed on commit 5.  Yet commit W
    claims it is version 1.4.4.4 as the tag v1.5.0 has an older tag
    date than the v1.4.4.4 tag.
    
    As it turns out this situation is very common.  A bug fix applied
    to maint and later merged into master occurs frequently enough that
    it should Just Work Right(tm).
    
    Rather than taking the first tag that gets found git-describe will
    now generate a list of all possible tags and select the one which
    has the most number of commits in common with HEAD (or whatever
    revision the user requested the description of).
    
    This rule is based on the principle shown in the diagram above.
    There are a large number of commits on the primary development branch
    'master' which do not appear in the 'maint' branch, and many of
    these are already tagged as part of v1.5.0-rc0.  Additionally these
    commits are not in v1.4.4.4, as they are part of the v1.5.0 release
    still being developed.  The v1.5.0-rc0 tag is more descriptive of
    W than v1.4.4.4 is, and therefore should be used.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  4. Merge branch 'jc/bare'

    Junio C Hamano
    Junio C Hamano committed Jan 12, 2007
    * jc/bare:
      Disallow working directory commands in a bare repository.
      git-fetch: allow updating the current branch in a bare repository.
      Introduce is_bare_repository() and core.bare configuration variable
      Move initialization of log_all_ref_updates
  5. Merge branch 'ar/merge-recursive'

    Junio C Hamano
    Junio C Hamano committed Jan 12, 2007
    * ar/merge-recursive:
      merge-recursive: do not use on-file index when not needed.
      Speed-up recursive by flushing index only once for all entries
  6. Merge branch 'jc/detached-head'

    Junio C Hamano
    Junio C Hamano committed Jan 12, 2007
    * jc/detached-head:
      git-checkout: handle local changes sanely when detaching HEAD
      git-checkout: safety check for detached HEAD checks existing refs
      git-checkout: fix branch name output from the command
      git-checkout: safety when coming back from the detached HEAD state.
      git-checkout: rewording comments regarding detached HEAD.
      git-checkout: do not warn detaching HEAD when it is already detached.
      Detached HEAD (experimental)
      git-branch: show detached HEAD
      git-status: show detached HEAD
Commits on Jan 11, 2007
  1. git-status: wording update to deal with deleted files.

    Junio C Hamano
    Junio C Hamano committed Jan 11, 2007
    If you do:
    
    	$ /bin/rm foo
    	$ git status
    
    we used to say "git add ... to add content to commit".  But
    suggsting "git add" to record the deletion of a file is simply
    insane.
    
    So this rewords various things:
    
     - The section header is the old "Changed but not updated",
       instead of "Changed but not added";
    
     - Suggestion is "git add ... to update what will be committed",
       instead of "... to add content to commit";
    
     - If there are removed paths, the above suggestion becomes "git
       add/rm ... to update what will be committed";
    
     - For untracked files, the suggestion is "git add ... to
       include in what will be committed".
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. git-rm: do not fail on already removed file.

    Junio C Hamano
    Junio C Hamano committed Jan 11, 2007
    Often the user would do "/bin/rm foo" before telling git, but
    then want to tell git about it.  "git rm foo" however would fail
    because it cannot unlink(2) foo.
    
    Treat ENOENT error return from unlink(2) as if a successful
    removal happened.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. Avoid errors and warnings when attempting to do I/O on zero bytes

    Eric Wong Junio C Hamano
    Eric Wong authored and Junio C Hamano committed Jan 11, 2007
    Unfortunately, while {read,write}_in_full do take into account
    zero-sized reads/writes; their die and whine variants do not.
    
    I have a repository where there are zero-sized files in
    the history that was triggering these things.
    
    Signed-off-by: Eric Wong <normalperson@yhbt.net>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  4. Better error messages for corrupt databases

    Linus Torvalds Junio C Hamano
    Linus Torvalds authored and Junio C Hamano committed Jan 11, 2007
    This fixes another problem that Andy's case showed: git-fsck-objects
    reports nonsensical results for corrupt objects.
    
    There were actually two independent and confusing problems:
    
     - when we had a zero-sized file and used map_sha1_file, mmap() would
       return EINVAL, and git-fsck-objects would report that as an insane and
       confusing error. I don't know when this was introduced, it might have
       been there forever.
    
     - when "parse_object()" returned NULL, fsck would say "object not found",
       which can be very confusing, since obviously the object might "exist",
       it's just unparseable because it's totally corrupt.
    
    So this just makes "xmmap()" return NULL for a zero-sized object (which is
    a valid thing pointer, exactly the same way "malloc()" can return NULL for
    a zero-sized allocation). That fixes the first problem (but we could have
    fixed it in the caller too - I don't personally much care whichever way it
    goes, but maybe somebody should check that the NO_MMAP case does
    something sane in this case too?).
    
    And the second problem is solved by just making the error message slightly
    clearer - the failure to parse an object may be because it's missing or
    corrupt, not necessarily because it's not "found".
    
    Signed-off-by: Linus Torvalds <torvalds@osdl.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  5. config-set: check write-in-full returns in set_multivar

    Junio C Hamano
    Junio C Hamano committed Jan 11, 2007
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  6. index-pack: write-or-die instead of unchecked write-in-full.

    Junio C Hamano
    Junio C Hamano committed Jan 11, 2007
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  7. write_in_full: really write in full or return error on disk full.

    Linus Torvalds Junio C Hamano
    Linus Torvalds authored and Junio C Hamano committed Jan 11, 2007
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  8. Document git-init

    Junio C Hamano
    Junio C Hamano committed Jan 11, 2007
    These days, the command does a lot more than just initialise the
    object database (such as setting default config-variables,
    installing template hooks...), and "git init" is actually a more
    sensible name nowadays.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  9. write-cache: do not leak the serialized cache-tree data.

    Linus Torvalds Junio C Hamano
    Linus Torvalds authored and Junio C Hamano committed Jan 11, 2007
    It is not used after getting written, and just is leaking every time
    we write the index out.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jan 10, 2007
  1. Disallow working directory commands in a bare repository.

    spearce authored and Junio C Hamano committed Dec 31, 2006
    If the user tries to run a porcelainish command which requires
    a working directory in a bare repository they may get unexpected
    results which are difficult to predict and may differ from command
    to command.
    
    Instead we should detect that the current repository is a bare
    repository and refuse to run the command there, as there is no
    working directory associated with it.
    
    [jc: updated Shawn's original somewhat -- bugs are mine.]
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. merge-recursive: do not use on-file index when not needed.

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    This revamps the merge-recursive implementation following the
    outline in:
    
    	Message-ID: <7v8xgileza.fsf@assigned-by-dhcp.cox.net>
    
    There is no need to write out the index until the very end just
    once from merge-recursive.  Also there is no need to write out
    the resulting tree object for the simple case of merging with a
    single merge base.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. Speed-up recursive by flushing index only once for all entries

    raalkml authored and Junio C Hamano committed Jan 4, 2007
    The merge-recursive implementation in C inherited the invariant
    that the on-file index file is written out and later read back
    after any index operations and writing trees from the original
    Python implementation.  But it was only because the original
    implementation worked at the scripting level.
    
    There is no need to write out the index file after handling
    every path.
    
    Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  4. Provide better feedback for the untracked only case in status output

    j-r authored and Junio C Hamano committed Jan 10, 2007
    Since 98bf8a4 status would claim that
    git-commit could be useful even if there are no changes except untracked files.
    
    Since wt-status is already computing all the information needed go the whole
    way and actually track the (non-)emptiness of all three sections separately,
    unify the code, and provide useful messages for each individual case.
    
    Thanks to Junio and Michael Loeffler for suggestions.
    
    Signed-off-by: Jürgen Rühle <j-r@online.de>
  5. Merge branch 'js/reflog'

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    * js/reflog:
      Sanitize for_each_reflog_ent()
  6. Makefile: remove $foo when $foo.exe is built/installed.

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    On Cygwin, newly builtins are not recognized, because there exist both
    the executable binaries (with .exe extension) _and_ the now-obsolete
    scripts (without extension), but the script is executed.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  7. send-email: work around double encoding of in-body From field.

    j-r authored and Junio C Hamano committed Jan 10, 2007
    git-send-email sends out the message taken from format-patch
    output without quoting nor encoding.  When copying the From:
    line to form in-body From: field, it should not copy it
    verbatim, because the From: for the header is quoted according
    to RFC 2047 when not ASCII.
    
    The original came from Jürgen Rühle, but I moved the
    string munging into a separate function so that later other
    people can tweak it more easily.  Bugs introduced during the
    translation are mine.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  8. Add git-init documentation.

    Nicolas Pitre Junio C Hamano
    Nicolas Pitre authored and Junio C Hamano committed Jan 10, 2007
    Oops. Commit 515377e missed one
    file, git-init documentation.
    
    Signed-off-by: Nicolas Pitre <nico@cam.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  9. Fix t1410 for core.filemode==false

    dscho authored and Junio C Hamano committed Jan 10, 2007
    Since c869753, core.filemode is hardwired to false on Cygwin.
    So this test had no chance to succeed, since an early commit
    (changing just the filemode) failed, and therefore all subsequent
    tests.
    
    Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  10. Make git-describe a builtin.

    spearce authored and Junio C Hamano committed Jan 10, 2007
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  11. Don't save the commit buffer in git-describe.

    spearce authored and Junio C Hamano committed Jan 10, 2007
    The commit buffer (message of the commit) is not actually
    used by the git-describe process.  We can save some memory
    by not keeping it around.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  12. Fix warnings in sha1_file.c - use C99 printf format if available

    proski authored and Junio C Hamano committed Jan 10, 2007
    Signed-off-by: Pavel Roskin <proski@gnu.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  13. -u is now default for 'git-mailinfo'.

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    Originally from David Woodhouse, but also adjusts the callers of
    mailinfo to the new default.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  14. -u is now default for 'git-applymbox'

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    It has '-n' to disable it just in case, but do not even bother
    documenting it.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  15. git-am: should work when "--no-utf8 --utf8" is given

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  16. git-checkout: handle local changes sanely when detaching HEAD

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    When switching branches, we usually first try read-tree to make
    sure that we do not lose the local changes and then updated the
    HEAD using update-ref.  However, we detached and updated HEAD
    before these checks, which was quite bad in a repository with
    local changes.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  17. Don't die in git-http-fetch when fetching packs.

    spearce authored and Junio C Hamano committed Jan 10, 2007
    My sp/mmap changes to pack-check.c modified the function such that
    it expects packed_git.pack_size to be populated with the total
    bytecount of the packfile by the caller.
    
    But that isn't the case for packs obtained by git-http-fetch as
    pack_size was not initialized before being accessed.  This caused
    verify_pack to think it had 2^32-21 bytes available when the
    downloaded pack perhaps was only 305 bytes in length.  The use_pack
    function then later dies with "offset beyond end of packfile"
    when computing the overall file checksum.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  18. git-checkout: safety check for detached HEAD checks existing refs

    Junio C Hamano
    Junio C Hamano committed Jan 10, 2007
    Checking for reachability from refs does not help much if the
    state we are currently on is somewhere in the middle.  We will
    lose where we were.
    
    So this makes sureh that HEAD is something directly pointed at
    by one of the existing refs (most likely a tag for a user who
    has been "sightseeing").
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  19. Update git-svn manpage to remove the implication that SVN::* is optio…

    Steven Grimm Junio C Hamano
    Steven Grimm authored and Junio C Hamano committed Jan 10, 2007
    …nal.
    
    Now that git-svn requires the SVN::* Perl library, the manpage doesn't need
    to describe what happens when you don't have it.
    
    Signed-off-by: Steven Grimm <koreth@midwinter.com>
    Acked-by: Eric Wong <normalperson@yhbt.net>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  20. Replacing the system call pread() with lseek()/xread()/lseek() sequence.

    Stefan-W. Hahn Junio C Hamano
    Stefan-W. Hahn authored and Junio C Hamano committed Jan 9, 2007
    Using cygwin with cygwin.dll before 1.5.22 the system call pread() is buggy.
    This patch introduces NO_PREAD. If NO_PREAD is set git uses a sequence of
    lseek()/xread()/lseek() to emulate pread.
    
    Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>