summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-05-25 19:44:52 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-05-25 19:44:52 -0700
commit23807fa0086ae6ad6980a2a1071f23ed1a6dde93 (patch)
tree7e73547d4f5187bfb985282d94d358ed7b0ca255
parentconvert bare readlink to strbuf_readlink (diff)
parentPrepare for 1.6.3.2 (diff)
downloadtgif-23807fa0086ae6ad6980a2a1071f23ed1a6dde93.tar.xz
Merge branch 'maint'
* maint: Prepare for 1.6.3.2 fix cat-file usage message and documentation fetch: report ref storage DF errors more accurately lock_ref: inform callers of unavailable ref merge-options.txt: Clarify merge --squash Conflicts: RelNotes
-rw-r--r--Documentation/RelNotes-1.6.3.2.txt51
-rw-r--r--Documentation/git-cat-file.txt4
-rw-r--r--Documentation/merge-options.txt3
-rw-r--r--builtin-cat-file.c4
-rw-r--r--builtin-fetch.c11
-rw-r--r--refs.c4
6 files changed, 68 insertions, 9 deletions
diff --git a/Documentation/RelNotes-1.6.3.2.txt b/Documentation/RelNotes-1.6.3.2.txt
new file mode 100644
index 0000000000..a3fceebb11
--- /dev/null
+++ b/Documentation/RelNotes-1.6.3.2.txt
@@ -0,0 +1,51 @@
+GIT v1.6.3.2 Release Notes
+==========================
+
+Fixes since v1.6.3.1
+--------------------
+
+ * A few codepaths picked up the first few bytes from an sha1[] by
+ casting the (char *) pointer to (int *); GCC 4.4 did not like this,
+ and aborted compilation.
+
+ * http-push had a small use-after-free bug.
+
+ * command completion code in bash did not reliably detect that we are
+ in a bare repository.
+
+ * "git for-each-ref" had a segfaulting bug when dealing with a tag object
+ created by an ancient git.
+
+ * Some unlink(2) failures went undiagnosed.
+
+ * The "recursive" merge strategy misbehaved when faced rename/delete
+ conflicts while coming up with an intermediate merge base.
+
+ * GIT_TRACE mechanism segfaulted when tracing a shell-quoted aliases.
+
+ * "git add ." in an empty directory complained that pathspec "." did not
+ match anything, which may be technically correct, but not useful. We
+ silently make it a no-op now.
+
+ * "git format-patch -k" still added patch numbers if format.numbered
+ configuration was set.
+
+ * OpenBSD also uses st_ctimspec in "struct stat", instead of "st_ctim".
+
+ * With NO_CROSS_DIRECTORY_HARDLINKS, "make install" can be told not to
+ create hardlinks between $(gitexecdir)/git-$builtin_commands and
+ $(bindir)/git.
+
+ * "git push" was converting OFS_DELTA pack representation into less
+ efficient REF_DELTA representation unconditionally upon transfer,
+ making the transferred data unnecessarily larger.
+
+Many other general usability updates around help text, diagnostic messages
+and documentation are included as well.
+
+---
+exec >/var/tmp/1
+O=v1.6.3.1-51-g2a1feb9
+echo O=$(git describe maint)
+git shortlog --no-merges $O..maint
+
diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index b191276d7a..58c8d65772 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -9,8 +9,8 @@ git-cat-file - Provide content or type and size information for repository objec
SYNOPSIS
--------
[verse]
-'git cat-file' [-t | -s | -e | -p | <type>] <object>
-'git cat-file' [--batch | --batch-check] < <list-of-objects>
+'git cat-file' (-t | -s | -e | -p | <type>) <object>
+'git cat-file' (--batch | --batch-check) < <list-of-objects>
DESCRIPTION
-----------
diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 637b53f898..adadf8e4bf 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -39,7 +39,8 @@
--squash::
Produce the working tree and index state as if a real
- merge happened, but do not actually make a commit or
+ merge happened (except for the merge information),
+ but do not actually make a commit or
move the `HEAD`, nor record `$GIT_DIR/MERGE_HEAD` to
cause the next `git commit` command to create a merge
commit. This allows you to create a single commit on
diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index 8fad19daed..43ffe7ffae 100644
--- a/builtin-cat-file.c
+++ b/builtin-cat-file.c
@@ -201,8 +201,8 @@ static int batch_objects(int print_contents)
}
static const char * const cat_file_usage[] = {
- "git cat-file [-t|-s|-e|-p|<type>] <sha1>",
- "git cat-file [--batch|--batch-check] < <list_of_sha1s>",
+ "git cat-file (-t|-s|-e|-p|<type>) <object>",
+ "git cat-file (--batch|--batch-check) < <list_of_objects>",
NULL
};
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 77acabfcc7..1eec64e9c4 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -167,6 +167,9 @@ static struct ref *get_ref_map(struct transport *transport,
return ref_map;
}
+#define STORE_REF_ERROR_OTHER 1
+#define STORE_REF_ERROR_DF_CONFLICT 2
+
static int s_update_ref(const char *action,
struct ref *ref,
int check_old)
@@ -181,9 +184,11 @@ static int s_update_ref(const char *action,
lock = lock_any_ref_for_update(ref->name,
check_old ? ref->old_sha1 : NULL, 0);
if (!lock)
- return 2;
+ return errno == ENOTDIR ? STORE_REF_ERROR_DF_CONFLICT :
+ STORE_REF_ERROR_OTHER;
if (write_ref_sha1(lock, ref->new_sha1, msg) < 0)
- return 2;
+ return errno == ENOTDIR ? STORE_REF_ERROR_DF_CONFLICT :
+ STORE_REF_ERROR_OTHER;
return 0;
}
@@ -386,7 +391,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
}
free(url);
fclose(fp);
- if (rc & 2)
+ if (rc & STORE_REF_ERROR_DF_CONFLICT)
error("some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting "
"branches", remote_name);
diff --git a/refs.c b/refs.c
index 45ad55693d..24438c652f 100644
--- a/refs.c
+++ b/refs.c
@@ -893,8 +893,10 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char
* name is a proper prefix of our refname.
*/
if (missing &&
- !is_refname_available(ref, NULL, get_packed_refs(), 0))
+ !is_refname_available(ref, NULL, get_packed_refs(), 0)) {
+ last_errno = ENOTDIR;
goto error_return;
+ }
lock->lk = xcalloc(1, sizeof(struct lock_file));