~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-updates

« back to all changes in this revision

Viewing changes to builtin-write-tree.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-05-01 08:59:06 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20070501085906-n1e5qzoc00wvlzt3
Tags: 1:1.5.1.3-1
* new upstream point release.
  * git-add tried to optimize by finding common leading directories
    across its arguments but botched, causing very confused behaviour
    (closes: #420671).
  * Documentation/git-reset.txt: suggest git commit --amend in example
    (closes: #420112).
  * unofficial rpm.spec file shipped with git was letting ETC_GITCONFIG
    set to /usr/etc/gitconfig.  Tweak the official Makefile to make it
    harder for distro people to make the same mistake, by setting the
    variable to /etc/gitconfig if prefix is set to /usr (closes:
    #420675).
* debian/changelog.upstream: upstream changes taken from mailing list
  announcement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
                        die("git-write-tree: error building trees");
37
37
                if (0 <= newfd) {
38
38
                        if (!write_cache(newfd, active_cache, active_nr)
39
 
                                        && !close(newfd))
 
39
                                        && !close(newfd)) {
40
40
                                commit_lock_file(lock_file);
 
41
                                newfd = -1;
 
42
                        }
41
43
                }
42
44
                /* Not being able to write is fine -- we are only interested
43
45
                 * in updating the cache-tree part, and if the next caller
55
57
        else
56
58
                hashcpy(sha1, active_cache_tree->sha1);
57
59
 
 
60
        if (0 <= newfd)
 
61
                close(newfd);
58
62
        rollback_lock_file(lock_file);
59
63
 
60
64
        return 0;