From 9f1beb7140584b3eb803cc9a69cbced528209f6e Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Thu, 19 Apr 2007 11:51:21 +1200 Subject: git-tar-tree: complete deprecation conversion message The syntax for git-archive is different; warn about it in the deprecation message on the manual page. Signed-off-by: Junio C Hamano --- Documentation/git-tar-tree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt index 595940524..7bde73b1b 100644 --- a/Documentation/git-tar-tree.txt +++ b/Documentation/git-tar-tree.txt @@ -13,7 +13,7 @@ SYNOPSIS DESCRIPTION ----------- THIS COMMAND IS DEPRECATED. Use `git-archive` with `--format=tar` -option instead. +option instead (and move the argument to `--prefix=base/`). Creates a tar archive containing the tree structure for the named tree. When is specified it is added as a leading path to the files in the -- cgit v1.2.1 From 6e6db39afc305e1205a4d2dcf34680bfa80bfc24 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Thu, 19 Apr 2007 03:08:15 +0100 Subject: fix up strtoul_ui error handling Two scanf() calls were converted to strtoul_ui() but the return values were not updated to match. scanf() returns the number of matched "values" which for this usage is 1 on success. strtoul_ui() return 0 on success. Update these call sites to match. Signed-off-by: Andy Whitcroft Signed-off-by: Junio C Hamano --- builtin-update-index.c | 2 +- convert-objects.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin-update-index.c b/builtin-update-index.c index 6ed61ebc5..8659800ee 100644 --- a/builtin-update-index.c +++ b/builtin-update-index.c @@ -551,7 +551,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) if (i+3 >= argc) die("git-update-index: --cacheinfo "); - if ((strtoul_ui(argv[i+1], 8, &mode) != 1) || + if (strtoul_ui(argv[i+1], 8, &mode) || get_sha1_hex(argv[i+2], sha1) || add_cacheinfo(mode, sha1, argv[i+3], 0)) die("git-update-index: --cacheinfo" diff --git a/convert-objects.c b/convert-objects.c index cf03bcfe5..cefbcebdc 100644 --- a/convert-objects.c +++ b/convert-objects.c @@ -88,7 +88,7 @@ static int write_subdirectory(void *buffer, unsigned long size, const char *base unsigned int mode; char *slash, *origpath; - if (!path || strtoul_ui(buffer, 8, &mode) != 1) + if (!path || strtoul_ui(buffer, 8, &mode)) die("bad tree conversion"); mode = convert_mode(mode); path++; -- cgit v1.2.1