Merge branch 'maint'
* 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:
commit
642f7108f6
6
base85.c
6
base85.c
@ -7,9 +7,9 @@
|
|||||||
#define say1(a,b) fprintf(stderr, a, b)
|
#define say1(a,b) fprintf(stderr, a, b)
|
||||||
#define say2(a,b,c) fprintf(stderr, a, b, c)
|
#define say2(a,b,c) fprintf(stderr, a, b, c)
|
||||||
#else
|
#else
|
||||||
#define say(a) do {} while(0)
|
#define say(a) do { /* nothing */ } while (0)
|
||||||
#define say1(a,b) do {} while(0)
|
#define say1(a,b) do { /* nothing */ } while (0)
|
||||||
#define say2(a,b,c) do {} while(0)
|
#define say2(a,b,c) do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char en85[] = {
|
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"))
|
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||||
usage(index_pack_usage);
|
usage(index_pack_usage);
|
||||||
|
|
||||||
|
read_replace_refs = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We wish to read the repository's config file if any, and
|
* We wish to read the repository's config file if any, and
|
||||||
* for that it is necessary to call setup_git_directory_gently().
|
* 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) {
|
if (nonfastforward && advice_push_nonfastforward) {
|
||||||
fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
|
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"
|
"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
|
||||||
"fast-forwards' section of 'git push --help' for details.\n");
|
"'Note about fast-forwards' section of 'git push --help' for details.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
2
cache.h
2
cache.h
@ -449,7 +449,7 @@ extern int init_db(const char *template_dir, unsigned int flags);
|
|||||||
alloc = alloc_nr(alloc); \
|
alloc = alloc_nr(alloc); \
|
||||||
x = xrealloc((x), alloc * sizeof(*(x))); \
|
x = xrealloc((x), alloc * sizeof(*(x))); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
/* Initialize and use the cache information */
|
/* Initialize and use the cache information */
|
||||||
extern int read_index(struct index_state *);
|
extern int read_index(struct index_state *);
|
||||||
|
@ -98,7 +98,7 @@ struct diff_queue_struct {
|
|||||||
(q)->queue = NULL; \
|
(q)->queue = NULL; \
|
||||||
(q)->nr = (q)->alloc = 0; \
|
(q)->nr = (q)->alloc = 0; \
|
||||||
(q)->run = 0; \
|
(q)->run = 0; \
|
||||||
} while(0);
|
} while (0)
|
||||||
|
|
||||||
extern struct diff_queue_struct diff_queued_diff;
|
extern struct diff_queue_struct diff_queued_diff;
|
||||||
extern struct diff_filepair *diff_queue(struct diff_queue_struct *,
|
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_filepair(const struct diff_filepair *, int);
|
||||||
void diff_debug_queue(const char *, struct diff_queue_struct *);
|
void diff_debug_queue(const char *, struct diff_queue_struct *);
|
||||||
#else
|
#else
|
||||||
#define diff_debug_filespec(a,b,c) do {} while(0)
|
#define diff_debug_filespec(a,b,c) do { /* nothing */ } while (0)
|
||||||
#define diff_debug_filepair(a,b) do {} while(0)
|
#define diff_debug_filepair(a,b) do { /* nothing */ } while (0)
|
||||||
#define diff_debug_queue(a,b) do {} while(0)
|
#define diff_debug_queue(a,b) do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int diffcore_count_changes(struct diff_filespec *src,
|
extern int diffcore_count_changes(struct diff_filespec *src,
|
||||||
|
4
http.h
4
http.h
@ -23,10 +23,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LIBCURL_VERSION_NUM < 0x070704
|
#if LIBCURL_VERSION_NUM < 0x070704
|
||||||
#define curl_global_cleanup() do { /* nothing */ } while(0)
|
#define curl_global_cleanup() do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
#if LIBCURL_VERSION_NUM < 0x070800
|
#if LIBCURL_VERSION_NUM < 0x070800
|
||||||
#define curl_global_init(a) do { /* nothing */ } while(0)
|
#define curl_global_init(a) do { /* nothing */ } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)
|
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)
|
||||||
|
@ -219,6 +219,12 @@ test_expect_success 'bisect and replacements' '
|
|||||||
git bisect reset
|
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
|
test_done
|
||||||
|
@ -143,7 +143,7 @@ test_expect_success 'more setup' '
|
|||||||
test_expect_success 'use index-filter to move into a subdirectory' '
|
test_expect_success 'use index-filter to move into a subdirectory' '
|
||||||
git branch directorymoved &&
|
git branch directorymoved &&
|
||||||
git filter-branch -f --index-filter \
|
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_INDEX_FILE=\$GIT_INDEX_FILE.new \
|
||||||
git update-index --index-info &&
|
git update-index --index-info &&
|
||||||
mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&
|
mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&
|
||||||
|
Loading…
Reference in New Issue
Block a user