aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/config.txt12
-rw-r--r--Makefile3
-rw-r--r--builtin-diff.c3
-rwxr-xr-xgit-commit.sh4
4 files changed, 20 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index f5c846f41..9d045d883 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -142,6 +142,18 @@ core.preferSymlinkRefs::
This is sometimes needed to work with old scripts that
expect HEAD to be a symbolic link.
+core.bare::
+ If true this repository is assumed to be 'bare' and has no
+ working directory associated with it. If this is the case a
+ number of commands that require a working directory will be
+ disabled, such as gitlink:git-add[1] or gitlink:git-merge[1].
++
+This setting is automatically guessed by gitlink:git-clone[1] or
+gitlink:git-init[1] when the repository was created. By default a
+repository that ends in "/.git" is assumed to be not bare (bare =
+false), while all other repositories are assumed to be bare (bare
+= true).
+
core.logAllRefUpdates::
Updates to a ref <ref> is logged to the file
"$GIT_DIR/logs/<ref>", by appending the new and old
diff --git a/Makefile b/Makefile
index 289decddc..35be5e204 100644
--- a/Makefile
+++ b/Makefile
@@ -895,7 +895,8 @@ dist: git.spec git-archive
$(TAR) rf $(GIT_TARNAME).tar \
$(GIT_TARNAME)/git.spec \
$(GIT_TARNAME)/version \
- $(GIT_TARNAME)/git-gui/version
+ $(GIT_TARNAME)/git-gui/version \
+ $(GIT_TARNAME)/git-gui/credits
@rm -rf $(GIT_TARNAME)
gzip -f -9 $(GIT_TARNAME).tar
diff --git a/builtin-diff.c b/builtin-diff.c
index a6590205e..c387ebb16 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -192,7 +192,8 @@ static int builtin_diff_combined(struct rev_info *revs,
parent = xmalloc(ents * sizeof(*parent));
/* Again, the revs are all reverse */
for (i = 0; i < ents; i++)
- hashcpy((unsigned char*)parent + i, ent[ents - 1 - i].item->sha1);
+ hashcpy((unsigned char *)(parent + i),
+ ent[ents - 1 - i].item->sha1);
diff_tree_combined(parent[0], parent + 1, ents - 1,
revs->dense_combined_merges, revs);
return 0;
diff --git a/git-commit.sh b/git-commit.sh
index ec506d956..476f4f18d 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -318,6 +318,10 @@ esac
case "$all,$also" in
t,)
+ if test ! -f "$THIS_INDEX"
+ then
+ die 'nothing to commit (use "git add file1 file2" to include for commit)'
+ fi
save_index &&
(
cd_to_toplevel &&