Permalink
Commits on Aug 15, 2007
  1. GIT 1.5.2.5

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Aug 15, 2007
  2. git-add -u paths... now works from subdirectory

    git-add -u also takes the path limiters, but unlike the
    command without the -u option, the code forgot that it
    could be invoked from a subdirectory, and did not correctly
    handle the prefix.
    
    Signed-off-by: Salikh Zakirov <salikh@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Salikh Zakirov committed with gitster Aug 15, 2007
  3. Fix "git add -u" data corruption.

    This applies to 'maint' to fix a rather serious data corruption
    issue.  When "git add -u" affects a subdirectory in such a way
    that the only changes to its contents are path removals, the
    next tree object written out of that index was bogus, as the
    remove codepath forgot to invalidate the cache-tree entry.
    
    Reported by Salikh Zakirov.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Aug 15, 2007
Commits on Aug 6, 2007
  1. apply: remove directory that becomes empty by renaming the last file …

    …away
    
    We attempt to remove directory that becomes empty after removal
    of a file.  We should do the same when we rename an existing
    file away.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    torvalds committed with gitster Aug 5, 2007
  2. setup.c:verify_non_filename(): don't die unnecessarily while disambig…

    …uating
    
    If you have a working tree _file_ "foo", attempt to refer to a
    branch "foo/bar" without -- to disambiguate, like this:
    
    	$ git log foo/bar
    
    tried to make sure that foo/bar cannot be naming a working tree
    file "foo/bar" (in which case we would say "which one do you
    want?  A rev or a working tree file?  clarify with -- please").
    We run lstat("foo/bar") to check that.  If it does not succeed,
    there is no ambiguity.
    
    That is good.  But we also checked the error status for the
    lstat() and expected it to fail with ENOENT.  In this particular
    case, however, it fails with ENOTDIR.  That should be treated as
    "expected error" as well.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Aug 6, 2007
Commits on Aug 1, 2007
  1. rev-list --bisect: fix allocation of "int*" instead of "int".

    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    chriscool committed with gitster Jul 31, 2007
Commits on Jul 18, 2007
  1. Force listingblocks to be monospaced in manpages

    For the html output we can use a stylesheet to make sure that the
    listingblocks are presented in a monospaced font.  For the manpages do
    it manually by inserting a ".ft C" before and ".ft" after the block in
    question.
    
    In order for these roff commands to get through to the manpage they
    have to be element encoded to prevent quoting.
    
    Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    qur committed with gitster Jul 18, 2007
  2. Do not expect unlink(2) to fail on a directory.

    When "git checkout-index" checks out path A/B/C, it makes sure A
    and A/B are truly directories; if there is a regular file or
    symlink at A, we prefer to remove it.
    
    We used to do this by catching an error return from mkdir(2),
    and on EEXIST did unlink(2), and when it succeeded, tried
    another mkdir(2).
    
    Thomas Glanzmann found out the above does not work on Solaris
    for a root user, as unlink(2) was so old fashioned there that it
    allowed to unlink a directory.
    
    As pointed out, this still doesn't guarantee that git won't call
    "unlink()" on a directory (race conditions etc), but that's
    fundamentally true (there is no "funlink()" like there is
    "fstat()"), and besides, that is in no way git-specific (ie it's
    true of any application that gets run as root).
    
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jul 18, 2007
Commits on Jul 12, 2007
  1. GIT 1.5.2.4

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jul 12, 2007
  2. Teach read-tree 2-way merge to ignore intermediate symlinks

    Earlier in 16a4c61, we taught "read-tree -m -u" not to be
    confused when switching from a branch that has a path frotz/filfre
    to another branch that has a symlink frotz that points at xyzzy/
    directory.  The fix was incomplete in that it was still confused
    when coming back (i.e. switching from a branch with frotz -> xyzzy/
    to another branch with frotz/filfre).
    
    This fix is rather expensive in that for a path that is created
    we would need to see if any of the leading component of that
    path exists as a symbolic link in the filesystem (in which case,
    we know that path itself does not exist, and the fact we already
    decided to check it out tells us that in the index we already
    know that symbolic link is going away as there is no D/F
    conflict).
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jul 12, 2007
  3. Merge branch 'maint' of git://repo.or.cz/git-gui into maint

    * 'maint' of git://repo.or.cz/git-gui:
      git-gui: Work around bad interaction between Tcl and cmd.exe on ^{tree}
      git-gui: Don't linewrap within console windows
      git-gui: Correct ls-tree buffering problem in browser
      git-gui: Skip nicknames when selecting author initials
      git-gui: Ensure windows shortcuts always have .bat extension
      git-gui: Include a Push action on the left toolbar
      git-gui: Bind M1-P to push action
      git-gui: Don't bind F5/M1-R in all windows
      git-gui: Unlock the index when cancelling merge dialog
      git-gui: properly popup error if gitk should be started but is not installed
    gitster committed Jul 12, 2007
  4. git-gui: Work around bad interaction between Tcl and cmd.exe on ^{tree}

    From Johannes Sixt <J.Sixt@eudaptics.com>:
    > It seems that MSYS's wish does some quoting for Bourne shells,
    > in particular, escape the first '{' of the "^{tree}" suffix, but
    > then it uses cmd.exe to run "git rev-parse". However, cmd.exe does
    > not remove the backslash, so that the resulting rev expression
    > ends up in git's guts as unrecognizable garbage: rev-parse fails,
    > and git-gui hickups in a way that it must be restarted.
    
    Johannes originally submitted a patch to this section of commit.tcl
    to use `git rev-parse $PARENT:`, but not all versions of Git will
    accept that format.  So I'm just taking the really simple approach
    here of scanning the first line of the commit to grab its tree.
    About the same cost, but works everywhere.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 12, 2007
Commits on Jul 10, 2007
  1. Clarify documentation of fast-import's D subcommand

    The 'D' subcommand within a commit can also delete a directory
    recursively.  This wasn't clear in the prior version of the
    documentation, leading to a question on the mailing list.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 10, 2007
  2. git-gui: Don't linewrap within console windows

    If we get more than 80 characters of text in a single line odds
    are it is output from git-fetch or git-push and its showing a
    lot of detail off to the right edge that is not so important to
    the average user.  We still want to make sure we show everything
    we need, but we can get away with that information being off to
    the side with a horizontal scrollbar.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 9, 2007
  3. git-gui: Correct ls-tree buffering problem in browser

    Our file browser was showing bad output as it did not properly buffer
    a partial record when read from `ls-tree -z`.  This did not show up on
    my Mac OS X system as most trees are small, the pipe buffers generally
    big and `ls-tree -z` was generally fast enough that all data was ready
    before Tcl started to read.  However on my Cygwin system one of my
    production repositories had a large enough tree and packfile that it
    took a couple of pipe buffers for `ls-tree -z` to complete its dump.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 9, 2007
Commits on Jul 9, 2007
  1. git-gui: Skip nicknames when selecting author initials

    Our blame viewer only grabbed the first initial of the git.git
    author string "Simon 'corecode' Schubert".  Here the problem was we
    looked at Simon, pulled the S into the author initials, then saw
    the single quote as the start of the next name and did not like
    this character as it was not an uppercase letter.
    
    We now skip over single quoted nicknames placed within the author
    name field and grab the initials following it.  So the above name
    will get the initials SS, rather than just S.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 9, 2007
Commits on Jul 8, 2007
  1. user-manual: fix directory name in git-archive example

    Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
    wrp committed with J. Bruce Fields Jun 29, 2007
  2. user-manual: more explanation of push and pull usage

    Recently a user on the mailing list complained that they'd read the
    manual but couldn't figure out how to keep a couple private repositories
    in sync.  They'd tried using push, and were surprised by the effect.
    
    Add a little text in an attempt to make it clear that:
    	- Pushing to a branch that is checked out will have odd results.
    	- It's OK to synchronize just using pull if that's simpler.
    
    Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
    J. Bruce Fields committed Jun 18, 2007
  3. tutorial: Fix typo

    "You" should be "Alice" here.
    
    Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
    J. Bruce Fields committed Jun 22, 2007
  4. user-manual: grammar and style fixes

     - "method of" is vulgar, "method for" is nicer
     - "recovery" becomes "recovering" from Steve Hoelzer's original version
       of this patch
     - "if you want" is nicer as "if you wish"
     - "you may" should be "you can"; "you may" is "you have permission to"
       rather than "you can"'s "it is possible to"
    
    Signed-off-by: Andy Parkins <andyparkins@gmail.com>
    Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
    andyparkins committed with J. Bruce Fields Jun 12, 2007
Commits on Jul 7, 2007
  1. Fix "apply --reverse" with regard to whitespace

    "git apply" used to take check the whitespace in the wrong
    direction.
    
    Noticed by Daniel Barkalow.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed with gitster Jul 7, 2007
Commits on Jul 6, 2007
  1. git-gui: Ensure windows shortcuts always have .bat extension

    Apparently under some setups on Windows Tk is hiding our file
    extension recommendation of ".bat" from the user and that is
    allowing the user to create a shortcut file which has no file
    extension.  Double clicking on such a file in Windows Explorer
    brings up the associate file dialog, as Windows does not know
    what application to launch.
    
    We now append the file extension ".bat" to the filename of the
    shortcut file if it has no extension or if it has one but it is
    not ".bat".
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 5, 2007
  2. git-gui: Include a Push action on the left toolbar

    Pushing changes to a remote system is a very common action for
    many users of git-gui, so much so that in some workflows a user
    is supposed to push immediately after they make a local commit
    so that their change(s) are immediately available for their
    teammates to view and build on top of.
    
    Including the push button right below the commit button on the
    left toolbar indicates that users should probably perform this
    action after they have performed the commit action.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 6, 2007
  3. git-gui: Bind M1-P to push action

    Users often need to be able to push the current branch so that they
    can publish their recent changes to anyone they are collaborating
    with on the project.  Associating a keyboard action with this will
    make it easier for keyboard-oriented users to quickly activate the
    push features.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 6, 2007
  4. git-gui: Don't bind F5/M1-R in all windows

    We actually only want our F5/M1-R keystroke bound in the main window.
    Within a browser/blame/console window pressing these keys should not
    execute the rescan action.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 6, 2007
Commits on Jul 4, 2007
  1. git-gui: Unlock the index when cancelling merge dialog

    Pressing the escape key while in the merge dialog cancels the merge
    and correctly unlocks the index.  Unfortunately this is not true of
    the Cancel button, using it closes the dialog but does not release
    the index lock, rendering git-gui frozen until you restart it.  We
    now properly release the index lock when the Cancel button is used.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    spearce committed Jul 4, 2007
  2. Document -<n> for git-format-patch

    The -<n> option was not mentioned in git-format-patch's manpage till
    now. Fix this.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Miklos Vajna committed with gitster Jul 3, 2007
Commits on Jul 3, 2007
  1. glossary: add 'reflog'

    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed with gitster Jul 3, 2007
  2. diff --no-index: fix --name-status with added files

    Without this patch, an added file would be reported as /dev/null.
    
    Noticed by David Kastrup.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    dscho committed with gitster Jul 3, 2007
  3. Don't smash stack when $GIT_ALTERNATE_OBJECT_DIRECTORIES is too long

    There is no restriction on the length of the name returned by
    get_object_directory, other than the fact that it must be a stat'able
    git object directory.  That means its name may have length up to
    PATH_MAX-1 (i.e., often 4095) not counting the trailing NUL.
    
    Combine that with the assumption that the concatenation of that name and
    suffixes like "/info/alternates" and "/pack/---long-name---.idx" will fit
    in a buffer of length PATH_MAX, and you see the problem.  Here's a fix:
    
        sha1_file.c (prepare_packed_git_one): Lengthen "path" buffer
        so we are guaranteed to be able to append "/pack/" without checking.
        Skip any directory entry that is too long to be appended.
        (read_info_alternates): Protect against a similar buffer overrun.
    
    Before this change, using the following admittedly contrived environment
    setting would cause many git commands to clobber their stack and segfault
    on a system with PATH_MAX == 4096:
    
      t=$(perl -e '$s=".git/objects";$n=(4096-6-length($s))/2;print "./"x$n . $s')
      export GIT_ALTERNATE_OBJECT_DIRECTORIES=$t
      touch g
      ./git-update-index --add g
    
    If you run the above commands, you'll soon notice that many
    git commands now segfault, so you'll want to do this:
    
      unset GIT_ALTERNATE_OBJECT_DIRECTORIES
    
    Signed-off-by: Jim Meyering <jim@meyering.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    meyering committed with gitster Jul 3, 2007
  4. Correctly document the name of the global excludes file configuration

    Signed-off-by: Michael Hendricks <michael@ndrix.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    mndrix committed with gitster Jul 2, 2007
Commits on Jul 2, 2007
  1. Make git-prune submodule aware (and fix a SEGFAULT in the process)

    I ran git-prune on a repository and got this:
    
     $ git-prune
     error: Object 228f8065b930120e35fc0c154c237487ab02d64a is a blob, not a commit
     Segmentation fault (core dumped)
    
    This repository was a strange one in that it was being used to provide
    its own submodule.  That is, the repository was cloned into a
    subdirectory, an independent branch checked out in that subdirectory,
    and then it was marked as a submodule.  git-prune then failed in the
    above manner.
    
    The problem was that git-prune was not submodule aware in two areas.
    
    Linus said:
    
     > So what happens is that something traverses a tree object, looks at each
     > entry, sees that it's not a tree, and tries to look it up as a blob. But
     > subprojects are commits, not blobs, and then when you look at the object
     > more closely, you get the above kind of object type confusion.
    
    and included a patch to add an S_ISGITLINK() test to reachable.c's
    process_tree() function.  That fixed the first git-prune error, and
    stopped it from trying to process the gitlink entries in trees as if
    they were pointers to other trees (and of course failing, because
    gitlinks _aren't_ trees).  That part of this patch is his.
    
    The second area is add_cache_refs().  This is called before starting the
    reachability analysis, and was calling lookup_blob() on every object
    hash found in the index.  However, it is no longer true that every hash
    in the index is a pointer to a blob, some of them are gitlinks, and are
    not backed by any object at all, they are commits in another repository.
    Normally this bug was not causing any problems, but in the case of the
    self-referencing repository described above, it meant that the gitlink
    hash was being marked as being of type OBJ_BLOB by add_cache_refs() call
    to lookup_blob().  Then later, because that hash was also pointed to by
    a ref, add_one_ref() would treat it as a commit; lookup_commit() would
    return a NULL because that object was already noted as being an
    OBJ_BLOB, not an OBJ_COMMIT; and parse_commit_buffer() would SEGFAULT on
    that NULL pointer.
    
    The fix made by this patch is to not blindly call lookup_blob() in
    reachable.c's add_cache_refs(), and instead skip any index entries that
    are S_ISGITLINK().
    
    Signed-off-by: Andy Parkins <andyparkins@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    andyparkins committed with gitster Jul 2, 2007
  2. GIT 1.5.2.3

    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    gitster committed Jul 2, 2007
Commits on Jun 30, 2007
  1. Correct the name of NO_R_TO_GCC_LINKER in the comment describing it.

    Signed-off-by: Matt Kraai <kraai@ftbfs.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    kraai committed with gitster Jun 30, 2007
  2. git-remote: document -n

    The 'show' and 'prune' commands accept an option '-n'; document what
    it does.
    
    Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Sam Vilain committed with gitster Jun 30, 2007