author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 07:50:58 +0000 (02:50 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 07:50:58 +0000 (02:50 -0500) | ||
commit | 4539eacd6dde87b4e73c859e946bb0a2c89d71f4 | |
tree | acaa9604ce1e8d89fae2fe23556fbcd6ba71ec91 | tree | snapshot |
parent | cbbaa28bc0a2b607b0f5e2e23f910d1619b52b0f | commit | diff |
git-gui: Make initial commits work properly.
Apparently I never really tested the logic for making or amending an
initial commit, so although most of the code was here in git-gui it
didn't quite work as it was intended to.
So this is all just bug fixes to make initial commits correctly
generate the list of files going into the initial commit, or to
show a newly added file's diff, and to amend an initial commit.
Because we really want to diff the index against a tree-ish and
there is no such tree-ish on an initial commit we create an empty
tree through git-mktree and diff against that. This unfortunately
creates a dangling tree, which may confuse a new user who uses
git-gui to make a new commit and then immediately afterwards runs
git fsck-objects to see if their object database is corrupt or not.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Apparently I never really tested the logic for making or amending an
initial commit, so although most of the code was here in git-gui it
didn't quite work as it was intended to.
So this is all just bug fixes to make initial commits correctly
generate the list of files going into the initial commit, or to
show a newly added file's diff, and to amend an initial commit.
Because we really want to diff the index against a tree-ish and
there is no such tree-ish on an initial commit we create an empty
tree through git-mktree and diff against that. This unfortunately
creates a dangling tree, which may confuse a new user who uses
git-gui to make a new commit and then immediately afterwards runs
git fsck-objects to see if their object database is corrupt or not.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | diff | blob | history |