* maint:
  push: mention "git pull" in error message for non-fast forwards
  Standardize do { ... } while (0) style
  t/t7003: replace \t with literal tab in sed expression
  index-pack: Don't follow replace refs.
This commit is contained in:
Junio C Hamano 2010-08-12 18:07:09 -07:00
Родитель 7980e41746 452c6d506b
Коммит 642f7108f6
8 изменённых файлов: 21 добавлений и 13 удалений

Просмотреть файл

@ -7,9 +7,9 @@
#define say1(a,b) fprintf(stderr, a, b)
#define say2(a,b,c) fprintf(stderr, a, b, c)
#else
#define say(a) do {} while(0)
#define say1(a,b) do {} while(0)
#define say2(a,b,c) do {} while(0)
#define say(a) do { /* nothing */ } while (0)
#define say1(a,b) do { /* nothing */ } while (0)
#define say2(a,b,c) do { /* nothing */ } while (0)
#endif
static const char en85[] = {

Просмотреть файл

@ -884,6 +884,8 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
if (argc == 2 && !strcmp(argv[1], "-h"))
usage(index_pack_usage);
read_replace_refs = 0;
/*
* We wish to read the repository's config file if any, and
* for that it is necessary to call setup_git_directory_gently().

Просмотреть файл

@ -130,8 +130,8 @@ static int push_with_options(struct transport *transport, int flags)
if (nonfastforward && advice_push_nonfastforward) {
fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
"Merge the remote changes before pushing again. See the 'Note about\n"
"fast-forwards' section of 'git push --help' for details.\n");
"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
"'Note about fast-forwards' section of 'git push --help' for details.\n");
}
return 1;

Просмотреть файл

@ -449,7 +449,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
alloc = alloc_nr(alloc); \
x = xrealloc((x), alloc * sizeof(*(x))); \
} \
} while(0)
} while (0)
/* Initialize and use the cache information */
extern int read_index(struct index_state *);

Просмотреть файл

@ -98,7 +98,7 @@ struct diff_queue_struct {
(q)->queue = NULL; \
(q)->nr = (q)->alloc = 0; \
(q)->run = 0; \
} while(0);
} while (0)
extern struct diff_queue_struct diff_queued_diff;
extern struct diff_filepair *diff_queue(struct diff_queue_struct *,
@ -118,9 +118,9 @@ void diff_debug_filespec(struct diff_filespec *, int, const char *);
void diff_debug_filepair(const struct diff_filepair *, int);
void diff_debug_queue(const char *, struct diff_queue_struct *);
#else
#define diff_debug_filespec(a,b,c) do {} while(0)
#define diff_debug_filepair(a,b) do {} while(0)
#define diff_debug_queue(a,b) do {} while(0)
#define diff_debug_filespec(a,b,c) do { /* nothing */ } while (0)
#define diff_debug_filepair(a,b) do { /* nothing */ } while (0)
#define diff_debug_queue(a,b) do { /* nothing */ } while (0)
#endif
extern int diffcore_count_changes(struct diff_filespec *src,

4
http.h
Просмотреть файл

@ -23,10 +23,10 @@
#endif
#if LIBCURL_VERSION_NUM < 0x070704
#define curl_global_cleanup() do { /* nothing */ } while(0)
#define curl_global_cleanup() do { /* nothing */ } while (0)
#endif
#if LIBCURL_VERSION_NUM < 0x070800
#define curl_global_init(a) do { /* nothing */ } while(0)
#define curl_global_init(a) do { /* nothing */ } while (0)
#endif
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)

Просмотреть файл

@ -219,6 +219,12 @@ test_expect_success 'bisect and replacements' '
git bisect reset
'
test_expect_success 'index-pack and replacements' '
git --no-replace-objects rev-list --objects HEAD |
git --no-replace-objects pack-objects test- &&
git index-pack test-*.pack
'
#
#
test_done

Просмотреть файл

@ -143,7 +143,7 @@ test_expect_success 'more setup' '
test_expect_success 'use index-filter to move into a subdirectory' '
git branch directorymoved &&
git filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
"git ls-files -s | sed \"s- -&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&