Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
Shouldn't we be doing this? I think if quiet is set,
then a failed rename will go undetected since we
won't enter print_summary to have lookup_commit fail.
rerere() die()'s on a failure, but also returns zero
if it can't create a lock file.
run_hook also is not checked for failure. I guess it
should at least print an error message on failure, but
I've never used hooks.
-brandon
builtin-commit.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index a764053..d7db7b3 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -122,19 +122,23 @@ static void rollback_index_files(void)
}
}
-static void commit_index_files(void)
+static int commit_index_files(void)
{
+ int err = 0;
+
switch (commit_style) {
case COMMIT_AS_IS:
break; /* nothing to do */
case COMMIT_NORMAL:
- commit_lock_file(&index_lock);
+ err = commit_lock_file(&index_lock);
break;
case COMMIT_PARTIAL:
- commit_lock_file(&index_lock);
+ err = commit_lock_file(&index_lock);
rollback_lock_file(&false_lock);
break;
}
+
+ return err;
}
/*
@@ -912,7 +916,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
unlink(git_path("MERGE_HEAD"));
unlink(git_path("MERGE_MSG"));
- commit_index_files();
+ if (commit_index_files())
+ die("unable to write new_index file");
rerere();
run_hook(get_index_file(), "post-commit", NULL);
--
1.5.4.rc3.17.gb63a4
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Glauber de Oliveira Costa | [PATCH 0/19] desc_struct integration |
| Paolo Ornati | Re: [patch 00/69] -stable review |
| Ingo Molnar | [patch] CFS scheduler, -v6 |
git: | |
| Denis Bueno | git-instaweb portability issue (maybe?) |
| Jon Smirl | Re: Inconsistencies with git log |
| Johannes Schindelin | Re: [PATCH] Fix premature call to git_config() causing t1020-subdirectory to fail |
| Dan Farina | backup or mirror a repository |
| Marc Espie | Re: That whole "Linux stealing our code" thing |
| Ray Percival | Re: Real men don't attack straw men |
| askthelist | Packets Per Second Limit? |
| Didier Wiroth | how can I "find xyz | xargs tar" ... like gtar |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Giacomo A. Catenazzi | Re: [BUG] New Kernel Bugs |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Ingo Oeser | Re: [PATCH]: Third (final?) release of Sun Neptune driver |
| high memory | 10 hours ago | Linux kernel |
| semaphore access speed | 13 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 14 hours ago | Linux kernel |
| Easter Eggs in windows XP | 17 hours ago | Windows |
| Shared swap partition | 18 hours ago | Linux general |
| Root password | 18 hours ago | Linux general |
| Where/when DNOTIFY is used? | 20 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 22 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 23 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
