[PATCH 1/1] RFC: git: update to v2.7.0-rc0

John Keeping john at keeping.me.uk
Fri Dec 11 13:25:59 CET 2015


On Fri, Dec 11, 2015 at 01:20:29PM +0100, Christian Hesse wrote:
> From: Christian Hesse <mail at eworm.de>
> 
> Update to git version v2.7.0-rc0.
> 
> * Upstream commit ed1c9977cb1b63e4270ad8bdf967a2d02580aa08 (Remove
>   get_object_hash.) changed API:
> 
>   Convert all instances of get_object_hash to use an appropriate
>   reference to the hash member of the oid member of struct object.
>   This provides no functional change, as it is essentially a macro
>   substitution.
> 
> Signed-off-by: Christian Hesse <mail at eworm.de>
> ---
>  Makefile    |  4 ++--
>  git         |  2 +-
>  parsing.c   |  4 ++--
>  shared.c    |  4 ++--
>  ui-atom.c   |  2 +-
>  ui-clone.c  |  2 +-
>  ui-commit.c | 12 ++++++------
>  ui-diff.c   |  6 +++---
>  ui-log.c    | 12 ++++++------
>  ui-patch.c  |  2 +-
>  ui-plain.c  |  2 +-
>  ui-shared.c |  2 +-
>  ui-tree.c   |  2 +-
>  13 files changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 77b9f60..3864398 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -14,8 +14,8 @@ htmldir = $(docdir)
>  pdfdir = $(docdir)
>  mandir = $(prefix)/share/man
>  SHA1_HEADER = <openssl/sha.h>
> -GIT_VER = 2.6.1
> -GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz
> +GIT_VER = 2.7.0-rc0
> +GIT_URL = https://www.kernel.org/pub/software/scm/git/testing/git-$(GIT_VER).tar.gz
>  INSTALL = install
>  COPYTREE = cp -r
>  MAN5_TXT = $(wildcard *.5.txt)
> diff --git a/git b/git
> index 22f698c..7d72253 160000
> --- a/git
> +++ b/git
> @@ -1 +1 @@
> -Subproject commit 22f698cb188243b313e024d618283e0293e37140
> +Subproject commit 7d722536dd86b5fbd0c0434bfcea5588132ee6ad
> diff --git a/parsing.c b/parsing.c
> index f903c7c..60036e1 100644
> --- a/parsing.c
> +++ b/parsing.c
> @@ -139,7 +139,7 @@ struct commitinfo *cgit_parse_commit(struct commit *commit)
>  		return ret;
>  
>  	if (!skip_prefix(p, "tree ", &p))
> -		die("Bad commit: %s", sha1_to_hex(commit->object.sha1));
> +		die("Bad commit: %s", sha1_to_hex(commit->object.oid.hash));

Would it be better to use oid_to_hex() here?  (The same comment applies
in several other places.)

Otherwise this looks good to me.  At some point we will probably want to
change some CGit functions to take 'struct object_id' instead of a SHA1,
but that is something to think about in the future.

>  	p += sha1hex_len + 1;
>  
>  	while (skip_prefix(p, "parent ", &p))


More information about the CGit mailing list