From: Junio C Hamano Date: Mon, 1 Apr 2013 16:19:30 +0000 (-0700) Subject: Merge branch 'tb/document-status-u-tradeoff' into maint X-Git-Url: https://repo.or.cz/w/git/mingw.git/commitdiff_plain/fec274b01f39262f945edb64c14c3bfe130b5bef Merge branch 'tb/document-status-u-tradeoff' into maint * tb/document-status-u-tradeoff: status: advise to consider use of -u when read_directory takes too long git status: document trade-offs in choosing parameters to the -u option --- fec274b01f39262f945edb64c14c3bfe130b5bef diff --cc Documentation/config.txt index b82e0816cb,a16eda5d47..bc750d5794 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -160,24 -158,15 +160,28 @@@ advice.*: 'matching refs' explicitly (i.e. you used ':', or specified a refspec that isn't your current branch) and it resulted in a non-fast-forward error. + pushAlreadyExists:: + Shown when linkgit:git-push[1] rejects an update that + does not qualify for fast-forwarding (e.g., a tag.) + pushFetchFirst:: + Shown when linkgit:git-push[1] rejects an update that + tries to overwrite a remote ref that points at an + object we do not have. + pushNeedsForce:: + Shown when linkgit:git-push[1] rejects an update that + tries to overwrite a remote ref that points at an + object that is not a committish, or make the remote + ref point at an object that is not a committish. statusHints:: Show directions on how to proceed from the current - state in the output of linkgit:git-status[1] and in + state in the output of linkgit:git-status[1], in the template shown when writing commit messages in - linkgit:git-commit[1]. + linkgit:git-commit[1], and in the help message shown + by linkgit:git-checkout[1] when switching branch. + statusUoption:: + Advise to consider using the `-u` option to linkgit:git-status[1] + when the command takes more than 2 seconds to enumerate untracked + files. commitBeforeMerge:: Advice shown when linkgit:git-merge[1] refuses to merge to avoid overwriting local changes. diff --cc advice.c index 780f58da0f,015011fe0d..3bc86260b8 --- a/advice.c +++ b/advice.c @@@ -4,10 -4,8 +4,11 @@@ int advice_push_update_rejected = 1 int advice_push_non_ff_current = 1; int advice_push_non_ff_default = 1; int advice_push_non_ff_matching = 1; +int advice_push_already_exists = 1; +int advice_push_fetch_first = 1; +int advice_push_needs_force = 1; int advice_status_hints = 1; + int advice_status_u_option = 1; int advice_commit_before_merge = 1; int advice_resolve_conflict = 1; int advice_implicit_identity = 1; @@@ -21,10 -19,8 +22,11 @@@ static struct { "pushnonffcurrent", &advice_push_non_ff_current }, { "pushnonffdefault", &advice_push_non_ff_default }, { "pushnonffmatching", &advice_push_non_ff_matching }, + { "pushalreadyexists", &advice_push_already_exists }, + { "pushfetchfirst", &advice_push_fetch_first }, + { "pushneedsforce", &advice_push_needs_force }, { "statushints", &advice_status_hints }, + { "statusuoption", &advice_status_u_option }, { "commitbeforemerge", &advice_commit_before_merge }, { "resolveconflict", &advice_resolve_conflict }, { "implicitidentity", &advice_implicit_identity }, diff --cc advice.h index fad36df467,e3e665dc18..af0c983c68 --- a/advice.h +++ b/advice.h @@@ -7,10 -7,8 +7,11 @@@ extern int advice_push_update_rejected extern int advice_push_non_ff_current; extern int advice_push_non_ff_default; extern int advice_push_non_ff_matching; +extern int advice_push_already_exists; +extern int advice_push_fetch_first; +extern int advice_push_needs_force; extern int advice_status_hints; + extern int advice_status_u_option; extern int advice_commit_before_merge; extern int advice_resolve_conflict; extern int advice_implicit_identity;