git
11 years agosilence git gc --auto --quiet output
Tobias Ulmer [Mon, 24 Sep 2012 02:40:24 +0000 (04:40 +0200)] 
silence git gc --auto --quiet output

When --quiet is requested, gc --auto should not display messages unless
there is an error.

Signed-off-by: Tobias Ulmer <tobiasu@tmux.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with maint
Junio C Hamano [Mon, 24 Sep 2012 19:50:36 +0000 (12:50 -0700)] 
Sync with maint

11 years agoStart preparation for 1.7.12.2
Junio C Hamano [Mon, 24 Sep 2012 19:50:00 +0000 (12:50 -0700)] 
Start preparation for 1.7.12.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/maint-blame-no-such-path' into maint
Junio C Hamano [Mon, 24 Sep 2012 19:40:02 +0000 (12:40 -0700)] 
Merge branch 'jc/maint-blame-no-such-path' into maint

Even during a conflicted merge, "git blame $path" always meant to
blame uncommitted changes to the "working tree" version; make it
more useful by showing cleanly merged parts as coming from the other
branch that is being merged.

This incidentally fixes an unrelated problem on a case insensitive
filesystem, where "git blame MAKEFILE" run in a history that has
"Makefile" but not "MAKEFILE" did not say "No such file MAKEFILE in
HEAD" but pretended as if "MAKEFILE" was a newly added file.

* jc/maint-blame-no-such-path:
  blame: allow "blame file" in the middle of a conflicted merge
  blame $path: avoid getting fooled by case insensitive filesystems

11 years agoMerge branch 'dj/fetch-all-tags' into maint
Junio C Hamano [Mon, 24 Sep 2012 19:39:21 +0000 (12:39 -0700)] 
Merge branch 'dj/fetch-all-tags' into maint

"git fetch --all", when passed "--no-tags", did not honor the
"--no-tags" option while fetching from individual remotes (the same
issue existed with "--tags", but combination "--all --tags" makes
much less sense than "--all --no-tags").

* dj/fetch-all-tags:
  fetch --all: pass --tags/--no-tags through to each remote
  submodule: use argv_array instead of hand-building arrays
  fetch: use argv_array instead of hand-building arrays
  argv-array: fix bogus cast when freeing array
  argv-array: add pop function

11 years agoImprove the description of GIT_PS1_SHOWUPSTREAM
Jonathan "Duke" Leto [Mon, 24 Sep 2012 17:41:26 +0000 (10:41 -0700)] 
Improve the description of GIT_PS1_SHOWUPSTREAM

Describe what '=' means in the output of __git_ps1 when using
GIT_PS1_SHOWUPSTREAM, which was not previously described.

Signed-off-by: Jonathan "Duke" Leto <jonathan@leto.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mh/fetch-filter-refs'
Junio C Hamano [Fri, 21 Sep 2012 18:17:00 +0000 (11:17 -0700)] 
Merge branch 'mh/fetch-filter-refs'

Finishing touch to update documentation of string-list to make sure
the earlier rewrite of ref-list match logic that depends on its sort
order will not get broken.

* mh/fetch-filter-refs:
  string_list API: document what "sorted" means

11 years agoMerge branch 'jc/maint-log-grep-all-match-1'
Junio C Hamano [Fri, 21 Sep 2012 18:14:49 +0000 (11:14 -0700)] 
Merge branch 'jc/maint-log-grep-all-match-1'

A finishing touch to make two symbols that were meant to be file-scope
static really so.

* jc/maint-log-grep-all-match-1:
  grep.c: make two symbols really file-scope static this time

11 years agoMerge branch 'maint'
Junio C Hamano [Thu, 20 Sep 2012 22:55:47 +0000 (15:55 -0700)] 
Merge branch 'maint'

* maint:
  Documentation: Document signature showing options
  completion: fix shell expansion of items

11 years agoMerge branch 'nd/maint-diffstat-summary' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:55:31 +0000 (15:55 -0700)] 
Merge branch 'nd/maint-diffstat-summary' into maint

* nd/maint-diffstat-summary:
  Revert diffstat back to English

11 years agoMerge branch 'jw/doc-commit-title' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:55:22 +0000 (15:55 -0700)] 
Merge branch 'jw/doc-commit-title' into maint

* jw/doc-commit-title:
  Documentation: describe subject more precisely

11 years agoMerge branch 'dg/run-command-child-cleanup' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:55:12 +0000 (15:55 -0700)] 
Merge branch 'dg/run-command-child-cleanup' into maint

* dg/run-command-child-cleanup:
  run-command.c: fix broken list iteration in clear_child_for_cleanup

11 years agoMerge branch 'jc/mailinfo-RE' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:55:03 +0000 (15:55 -0700)] 
Merge branch 'jc/mailinfo-RE' into maint

* jc/mailinfo-RE:
  mailinfo: strip "RE: " prefix

11 years agoMerge branch 'sn/ls-remote-get-url-doc' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:54:57 +0000 (15:54 -0700)] 
Merge branch 'sn/ls-remote-get-url-doc' into maint

* sn/ls-remote-get-url-doc:
  ls-remote: document the '--get-url' option

11 years agoMerge branch 'nd/log-n-doc' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:54:43 +0000 (15:54 -0700)] 
Merge branch 'nd/log-n-doc' into maint

* nd/log-n-doc:
  doc: move rev-list option -<n> from git-log.txt to rev-list-options.txt

11 years agoMerge branch 'nd/maint-remote-remove' into maint
Junio C Hamano [Thu, 20 Sep 2012 22:53:31 +0000 (15:53 -0700)] 
Merge branch 'nd/maint-remote-remove' into maint

* nd/maint-remote-remove:
  remote: prefer subcommand name 'remove' to 'rm'

11 years agogrep.c: make two symbols really file-scope static this time
Junio C Hamano [Thu, 20 Sep 2012 21:20:09 +0000 (14:20 -0700)] 
grep.c: make two symbols really file-scope static this time

Adding a declaration at the beginning is not sufficient for obvious
reasons. The definition has to be made static.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: Document signature showing options
Stephen Boyd [Thu, 20 Sep 2012 08:10:38 +0000 (01:10 -0700)] 
Documentation: Document signature showing options

The pretty formats for GPG signatures were introduced but never
documented. Use the documentation from the commit that introduced them.
Do the same for the --show-signature option added to git log and
friends.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: fix shell expansion of items
Felipe Contreras [Thu, 20 Sep 2012 02:15:15 +0000 (04:15 +0200)] 
completion: fix shell expansion of items

As reported by Jeroen Meijer[1]; the current code doesn't deal properly
with items (tags, branches, etc.) that have ${} in them because they get
expaned by bash while using compgen.

A simple solution is to quote the items so they get expanded properly
(\$\{\}).

In order to achieve that I took bash-completion's quote() function,
which is rather simple, and renamed it to __git_quote() as per Jeff
King's suggestion.

Solves the original problem for me.

[1] http://article.gmane.org/gmane.comp.version-control.git/201596

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.0
Junio C Hamano [Tue, 18 Sep 2012 21:43:12 +0000 (14:43 -0700)] 
Update draft release notes to 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/maint-log-grep-all-match'
Junio C Hamano [Tue, 18 Sep 2012 21:37:53 +0000 (14:37 -0700)] 
Merge branch 'jc/maint-log-grep-all-match'

Fix a long-standing bug in "git log --grep" when multiple "--grep"
are used together with "--all-match" and "--author" or "--committer".

* jc/maint-log-grep-all-match:
  t7810-grep: test --all-match with multiple --grep and --author options
  t7810-grep: test interaction of multiple --grep and --author options
  t7810-grep: test multiple --author with --all-match
  t7810-grep: test multiple --grep with and without --all-match
  t7810-grep: bring log --grep tests in common form
  grep.c: mark private file-scope symbols as static
  log: document use of multiple commit limiting options
  log --grep/--author: honor --all-match honored for multiple --grep patterns
  grep: show --debug output only once
  grep: teach --debug option to dump the parse tree

11 years agoMerge branch 'jc/make-static'
Junio C Hamano [Tue, 18 Sep 2012 21:37:46 +0000 (14:37 -0700)] 
Merge branch 'jc/make-static'

Turn many file-scope private symbols to static to reduce the
global namespace contamination.

* jc/make-static:
  sequencer.c: mark a private file-scope symbol as static
  ident.c: mark private file-scope symbols as static
  trace.c: mark a private file-scope symbol as static
  wt-status.c: mark a private file-scope symbol as static
  read-cache.c: mark a private file-scope symbol as static
  strbuf.c: mark a private file-scope symbol as static
  sha1-array.c: mark a private file-scope symbol as static
  symlinks.c: mark private file-scope symbols as static
  notes.c: mark a private file-scope symbol as static
  rerere.c: mark private file-scope symbols as static
  graph.c: mark private file-scope symbols as static
  diff.c: mark a private file-scope symbol as static
  commit.c: mark a file-scope private symbol as static
  builtin/notes.c: mark file-scope private symbols as static

11 years agoMerge branch 'pw/p4-submit-conflicts'
Junio C Hamano [Tue, 18 Sep 2012 21:36:17 +0000 (14:36 -0700)] 
Merge branch 'pw/p4-submit-conflicts'

Add '--conflict' option to git-p4 subcommand to specify what action
to take when conflicts are found during 'p4 submit'.

* pw/p4-submit-conflicts:
  git-p4: add submit --conflict option and config varaiable
  git p4: add submit --prepare-p4-only option
  git p4: add submit --dry-run option
  git p4: accept -v for --verbose
  git p4: revert deleted files after submit cancel
  git p4: rearrange submit template construction
  git p4: test clean-up after failed submit, fix added files
  git p4: standardize submit cancel due to unchanged template
  git p4: move conflict prompt into run, add [q]uit input
  git p4: remove submit failure options [a]pply and [w]rite
  git p4: gracefully fail if some commits could not be applied
  git p4 test: remove bash-ism of combined export/assignment

11 years agoMerge branch 'mv/cherry-pick-s'
Junio C Hamano [Tue, 18 Sep 2012 21:36:00 +0000 (14:36 -0700)] 
Merge branch 'mv/cherry-pick-s'

After "git cherry-pick -s" gave control back to the user asking
help to resolve conflicts, concluding "git commit" needs to be run
with "-s" if the user wants to sign it off, but the command should
be able to remember that.

* mv/cherry-pick-s:
  cherry-pick: don't forget -s on failure

11 years agoMerge branch 'nd/fetch-status-alignment'
Junio C Hamano [Tue, 18 Sep 2012 21:35:54 +0000 (14:35 -0700)] 
Merge branch 'nd/fetch-status-alignment'

The status report from "git fetch", when messages like 'up-to-date'
are translated, did not align the branch names well.

* nd/fetch-status-alignment:
  fetch: align per-ref summary report in UTF-8 locales

11 years agoSync with 1.7.12.1
Junio C Hamano [Tue, 18 Sep 2012 21:35:03 +0000 (14:35 -0700)] 
Sync with 1.7.12.1

11 years agoGit 1.7.12.1 v1.7.12.1
Junio C Hamano [Tue, 18 Sep 2012 21:34:31 +0000 (14:34 -0700)] 
Git 1.7.12.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'er/doc-fast-import-done' into maint
Junio C Hamano [Tue, 18 Sep 2012 21:33:52 +0000 (14:33 -0700)] 
Merge branch 'er/doc-fast-import-done' into maint

* er/doc-fast-import-done:
  fast-import: document the --done option

11 years agoMerge branch 'jk/config-warn-on-inaccessible-paths' into maint
Junio C Hamano [Tue, 18 Sep 2012 21:24:06 +0000 (14:24 -0700)] 
Merge branch 'jk/config-warn-on-inaccessible-paths' into maint

The attribute system may be asked for a path that itself or its
leading directories no longer exists in the working tree, and it is
fine if we cannot open .gitattribute file in such a case.  Failure
to open per-directory .gitattributes with error status other than
ENOENT and ENOTDIR should be diagnosed.

* jk/config-warn-on-inaccessible-paths:
  attr: failure to open a .gitattributes file is OK with ENOTDIR
  warn_on_inaccessible(): a helper to warn on inaccessible paths
  attr: warn on inaccessible attribute files
  gitignore: report access errors of exclude files
  config: warn on inaccessible files

11 years agoDoc: Improve shallow depth wording
Philip Oakley [Sun, 16 Sep 2012 10:57:58 +0000 (11:57 +0100)] 
Doc: Improve shallow depth wording

Avoid confusion in compound sentence about the start of the commit set
and the depth measure. Use two sentences.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/git-filter-branch: Move note about effect of removing commits
Andreas Schwab [Tue, 18 Sep 2012 15:55:08 +0000 (17:55 +0200)] 
Documentation/git-filter-branch: Move note about effect of removing commits

The note that explains that changes introduced by removed commits are
preserved should be placed directly after the paragraph that describes
such commits removal.  Otherwise the reference to "the commits" appears
out of context.

Also the big example that follows "Consider this history" is about
rewriting part of the history DAG.  Move the paragraph that
describes the operation close to it.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostring_list API: document what "sorted" means
Michael Haggerty [Mon, 17 Sep 2012 15:21:07 +0000 (17:21 +0200)] 
string_list API: document what "sorted" means

The recent work on using string_list to represent the list of refs
that matched with the refs on the other side during fetch heavily
depends on the sort order by string_list's implementation, and
changing string_list will break it.  Document that it uses strcmp()
order, at least for now.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoThe seventh batch for 1.8.0
Junio C Hamano [Mon, 17 Sep 2012 23:00:39 +0000 (16:00 -0700)] 
The seventh batch for 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 17 Sep 2012 22:59:34 +0000 (15:59 -0700)] 
Merge branch 'maint'

* maint:
  t/perf: add "trash directory" to .gitignore
  Add missing -z to git check-attr usage text for consistency with man page
  git-jump: ignore (custom) prefix in diff mode
  Documentation: indent-with-non-tab uses "equivalent tabs" not 8
  completion: add --no-edit to git-commit

11 years agoMerge branch 'mh/fetch-filter-refs'
Junio C Hamano [Mon, 17 Sep 2012 22:58:49 +0000 (15:58 -0700)] 
Merge branch 'mh/fetch-filter-refs'

Code simplification and clarification.

* mh/fetch-filter-refs:
  test-string-list.c: Fix some sparse warnings
  fetch-pack: eliminate spurious error messages
  cmd_fetch_pack(): simplify computation of return value
  fetch-pack: report missing refs even if no existing refs were received
  cmd_fetch_pack(): return early if finish_connect() fails
  filter_refs(): simplify logic
  filter_refs(): build refs list as we go
  filter_refs(): delete matched refs from sought list
  fetch_pack(): update sought->nr to reflect number of unique entries
  filter_refs(): do not check the same sought_pos twice
  Change fetch_pack() and friends to take string_list arguments
  fetch_pack(): reindent function decl and defn
  Rename static function fetch_pack() to http_fetch_pack()
  t5500: add tests of fetch-pack --all --depth=N $URL $REF
  t5500: add tests of error output for missing refs

11 years agoMerge branch 'nd/maint-diffstat-summary'
Junio C Hamano [Mon, 17 Sep 2012 22:57:22 +0000 (15:57 -0700)] 
Merge branch 'nd/maint-diffstat-summary'

Earlier we made the diffstat summary line that shows the number of
lines added/deleted localizable, but it was found irritating having
to see them in various languages on a list whose discussion language
is English.

The original had trivial thinko in reverting Q_(), which has been
fixed.

* nd/maint-diffstat-summary:
  Revert diffstat back to English

11 years agoMerge branch 'jk/config-warn-on-inaccessible-paths'
Junio C Hamano [Mon, 17 Sep 2012 22:55:41 +0000 (15:55 -0700)] 
Merge branch 'jk/config-warn-on-inaccessible-paths'

The attribute system may be asked for a path that itself or its
leading directories no longer exists in the working tree.  Failure
to open per-directory .gitattributes with error status other than
ENOENT and ENOTDIR are diagnosed.

* jk/config-warn-on-inaccessible-paths:
  attr: failure to open a .gitattributes file is OK with ENOTDIR

11 years agoMerge branch 'jw/doc-commit-title'
Junio C Hamano [Mon, 17 Sep 2012 22:53:39 +0000 (15:53 -0700)] 
Merge branch 'jw/doc-commit-title'

Update parts of document that talked about "first line of commit
log" to say "title of commit" with definition of what that "title"
is.

* jw/doc-commit-title:
  Documentation: describe subject more precisely

11 years agoMerge branch 'mh/string-list'
Junio C Hamano [Mon, 17 Sep 2012 22:53:31 +0000 (15:53 -0700)] 
Merge branch 'mh/string-list'

* mh/string-list:
  api-string-list.txt: initialize the string_list the easy way
  string_list: add a function string_list_longest_prefix()
  string_list: add a new function, string_list_remove_duplicates()
  string_list: add a new function, filter_string_list()
  string_list: add two new functions for splitting strings
  string_list: add function string_list_append_nodup()

11 years agoMerge branch 'jc/maint-blame-no-such-path'
Junio C Hamano [Mon, 17 Sep 2012 22:52:32 +0000 (15:52 -0700)] 
Merge branch 'jc/maint-blame-no-such-path'

"git blame MAKEFILE" run in a history that has "Makefile" but not
"MAKEFILE" should say "No such file MAKEFILE in HEAD", but got
confused on a case insensitive filesystem and failed to do so.

Even during a conflicted merge, "git blame $path" always meant to
blame uncommitted changes to the "working tree" version; make it
more useful by showing cleanly merged parts as coming from the other
branch that is being merged.

* jc/maint-blame-no-such-path:
  blame: allow "blame file" in the middle of a conflicted merge
  blame $path: avoid getting fooled by case insensitive filesystems

11 years agot/perf: add "trash directory" to .gitignore
Ramkumar Ramachandra [Mon, 17 Sep 2012 17:06:18 +0000 (22:36 +0530)] 
t/perf: add "trash directory" to .gitignore

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoAdd missing -z to git check-attr usage text for consistency with man page
Adam Spiers [Mon, 17 Sep 2012 11:38:51 +0000 (12:38 +0100)] 
Add missing -z to git check-attr usage text for consistency with man page

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-jump: ignore (custom) prefix in diff mode
Mischa POSLAWSKY [Mon, 17 Sep 2012 01:21:55 +0000 (03:21 +0200)] 
git-jump: ignore (custom) prefix in diff mode

Matching the default file prefix b/ does not yield any results if config
option diff.noprefix or diff.mnemonicprefix is enabled.

Signed-off-by: Mischa POSLAWSKY <git@shiar.nl>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: indent-with-non-tab uses "equivalent tabs" not 8
Wesley J. Landaker [Mon, 17 Sep 2012 14:22:15 +0000 (08:22 -0600)] 
Documentation: indent-with-non-tab uses "equivalent tabs" not 8

Update the documentation of the core.whitespace option
"indent-with-non-tab" to correctly reflect that it catches the use of
spaces instead of the equivalent tabs, rather than a fixed number.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: add --no-edit to git-commit
Yacine Belkadi [Sun, 16 Sep 2012 16:06:11 +0000 (18:06 +0200)] 
completion: add --no-edit to git-commit

Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-p4: add submit --conflict option and config varaiable
Pete Wyckoff [Sun, 9 Sep 2012 20:16:13 +0000 (16:16 -0400)] 
git-p4: add submit --conflict option and config varaiable

This allows specifying what to do when a conflict
happens when applying a commit to p4, automating the
interactive prompt.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: add submit --prepare-p4-only option
Pete Wyckoff [Sun, 9 Sep 2012 20:16:12 +0000 (16:16 -0400)] 
git p4: add submit --prepare-p4-only option

This option can be used to prepare the client workspace for
submission, only.  It does not invoke the final "p4 submit".
A message describes how to proceed, either submitting the
changes or reverting.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: add submit --dry-run option
Pete Wyckoff [Sun, 9 Sep 2012 20:16:11 +0000 (16:16 -0400)] 
git p4: add submit --dry-run option

A new option, "git p4 submit --dry-run" can be used to verify
what commits and labels would be moved into p4.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: accept -v for --verbose
Pete Wyckoff [Sun, 9 Sep 2012 20:16:10 +0000 (16:16 -0400)] 
git p4: accept -v for --verbose

The short form "-v" is common in many git commands as an
alias for "--verbose".

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: revert deleted files after submit cancel
Pete Wyckoff [Sun, 9 Sep 2012 20:16:09 +0000 (16:16 -0400)] 
git p4: revert deleted files after submit cancel

The user can decide not to continue with a submission,
by not saving the p4 submit template, then answering "no" to
the "Submit anyway?" prompt.  In this case, be sure to
return the p4 client to its initial state.

Deleted files were not reverted; fix this and test all cases.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: rearrange submit template construction
Pete Wyckoff [Sun, 9 Sep 2012 20:16:08 +0000 (16:16 -0400)] 
git p4: rearrange submit template construction

Put all items in order as they appear, and add comments.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: test clean-up after failed submit, fix added files
Pete Wyckoff [Sun, 9 Sep 2012 20:16:07 +0000 (16:16 -0400)] 
git p4: test clean-up after failed submit, fix added files

Test a variety of cases where a patch failed to apply to
p4 and had to be cleaned up.

If the patch failed to apply cleanly, do not try to remove
to-be-added files, as they have not really been added yet.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: standardize submit cancel due to unchanged template
Pete Wyckoff [Sun, 9 Sep 2012 20:16:06 +0000 (16:16 -0400)] 
git p4: standardize submit cancel due to unchanged template

When editing the submit template, if no change was made to it,
git p4 offers a prompt "Submit anyway?".  Answering "no" cancels
the submit.

Previously, a "no" answer behaves like a "[s]kip" answer to the
failed-patch prompt, in that it proceeded to try to apply the
rest of the commits.  Instead, put users back into the new
"[s]kip / [c]ontinue" loop so that they can decide.  This makes
both cases of patch failure behave identically.

The return code of git p4 after a "no" answer is now the same
as that for a "skip" due to failed patch; update a test to
understand this.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: move conflict prompt into run, add [q]uit input
Pete Wyckoff [Sun, 9 Sep 2012 20:16:05 +0000 (16:16 -0400)] 
git p4: move conflict prompt into run, add [q]uit input

When applying a commit to the p4 workspace fails, a prompt
asks what to do next.  This belongs up in run() instead
of in applyCommit(), where run() can notice, for instance,
that the prompt is unnecessary because this is the last commit.

Offer two options about how to continue at conflict: [s]kip or
[q]uit.  Having an explicit "quit" option gives git p4 a chance
to clean up, show the applied-commit summary, and do tag export.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: remove submit failure options [a]pply and [w]rite
Pete Wyckoff [Sun, 9 Sep 2012 20:16:04 +0000 (16:16 -0400)] 
git p4: remove submit failure options [a]pply and [w]rite

When a patch failed to apply, these interactive options offered
to:

    1) apply the patch anyway, leaving reject (.rej) files around, or,
    2) write the patch to a file (patch.txt)

In both cases it suggested to invoke "git p4 submit --continue",
an unimplemented option.

While manually fixing the rejects and submitting the result might
work, there are many steps that must be done to the job properly:

    * apply patch
    * invoke p4 add and delete
    * change executable bits
    * p4 sync -f renamed/copied files
    * extract commit message into p4 change description and
      move Jobs lines out of description section
    * set changelist owner for --preserve-user

Plus the following manual sync/rebase will cause conflicts too,
which must be resolved once again.

Drop these workflows.  Instead users should do a sync/rebase in
git, fix the conflicts there, and do a clean "git p4 submit".

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4: gracefully fail if some commits could not be applied
Pete Wyckoff [Sun, 9 Sep 2012 20:16:03 +0000 (16:16 -0400)] 
git p4: gracefully fail if some commits could not be applied

If a commit fails to apply cleanly to the p4 tree, an interactive
prompt asks what to do next.  In all cases (skip, apply, write),
the behavior after the prompt had a few problems.

Change it so that it does not claim erroneously that all commits
were applied.  Instead list the set of the patches under
consideration, and mark with an asterisk those that were
applied successfully.  Like this example:

    Applying 592f1f9 line5 in file1 will conflict
    ...
    Unfortunately applying the change failed!
    What do you want to do?
    [s]kip this patch / [a]pply the patch forcibly and with .rej files / [w]rite the patch to a file (patch.txt) s
    Skipping! Good luck with the next patches...
    //depot/file1#4 - was edit, reverted
    Applying b8db1c6 okay_commit_after_skip
    ...
    Change 6 submitted.
    Applied only the commits marked with '*':
      592f1f9 line5 in file1 will conflict
    * b8db1c6 okay_commit_after_skip

Do not try to sync and rebase unless all patches were applied.
If there was a conflict during the submit, there is sure to be one
at the rebase.  Let the user to do the sync and rebase manually.

This changes how a couple tets in t9810-git-p4-rcs.sh behave:

    - git p4 now does not leave files open and edited in the
      client

    - If a git commit contains a change to a file that was
      deleted in p4, the test used to check that the sync/rebase
      loop happened after the failure to apply the change.  Since
      now sync/rebase does not happen after failure, do not test
      this.  Normal rebase machinery, outside of git p4, will let
      rebase --skip work.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit p4 test: remove bash-ism of combined export/assignment
Pete Wyckoff [Sun, 9 Sep 2012 20:16:02 +0000 (16:16 -0400)] 
git p4 test: remove bash-ism of combined export/assignment

Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7810-grep: test --all-match with multiple --grep and --author options
Michael J Gruber [Fri, 14 Sep 2012 09:46:43 +0000 (11:46 +0200)] 
t7810-grep: test --all-match with multiple --grep and --author options

The code used to have a bug that ignores "--all-match", that requires
all "--grep" to have matched, when "--author" or "--committer" was used.

Make sure the bug will not be reintroduced.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7810-grep: test interaction of multiple --grep and --author options
Michael J Gruber [Fri, 14 Sep 2012 09:46:42 +0000 (11:46 +0200)] 
t7810-grep: test interaction of multiple --grep and --author options

There are tests for this interaction already. Restructure slightly and
avoid any claims about --all-match.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7810-grep: test multiple --author with --all-match
Michael J Gruber [Fri, 14 Sep 2012 09:46:41 +0000 (11:46 +0200)] 
t7810-grep: test multiple --author with --all-match

The "--all-match" option is about "--grep", and does not affect how
"--author" or "--committer" limitation is applied.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7810-grep: test multiple --grep with and without --all-match
Michael J Gruber [Fri, 14 Sep 2012 09:46:40 +0000 (11:46 +0200)] 
t7810-grep: test multiple --grep with and without --all-match

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7810-grep: bring log --grep tests in common form
Michael J Gruber [Fri, 14 Sep 2012 09:46:39 +0000 (11:46 +0200)] 
t7810-grep: bring log --grep tests in common form

The log --grep tests generate the expected out in different ways.
Make them all use command blocks so that subshells are avoided and the
expected output is easier to grasp visually.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogrep.c: mark private file-scope symbols as static
Junio C Hamano [Sat, 15 Sep 2012 21:04:36 +0000 (14:04 -0700)] 
grep.c: mark private file-scope symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotest-string-list.c: Fix some sparse warnings
Ramsay Jones [Sat, 15 Sep 2012 16:18:42 +0000 (17:18 +0100)] 
test-string-list.c: Fix some sparse warnings

In particular, sparse complains as follows:

        SP test-string-list.c
    test-string-list.c:10:6: warning: symbol 'parse_string_list' was not \
        declared. Should it be static?
    test-string-list.c:18:6: warning: symbol 'write_list' was not \
        declared. Should it be static?
    test-string-list.c:25:6: warning: symbol 'write_list_compact' was not \
        declared. Should it be static?
    test-string-list.c:38:5: warning: symbol 'prefix_cb' was not \
        declared. Should it be static?

In order to suppress the warnings, since the above symbols do not
need more than file scope, we simply include the static modifier
in their declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosequencer.c: mark a private file-scope symbol as static
Junio C Hamano [Sun, 16 Sep 2012 06:20:40 +0000 (23:20 -0700)] 
sequencer.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoident.c: mark private file-scope symbols as static
Junio C Hamano [Sun, 16 Sep 2012 05:50:09 +0000 (22:50 -0700)] 
ident.c: mark private file-scope symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotrace.c: mark a private file-scope symbol as static
Junio C Hamano [Sun, 16 Sep 2012 05:47:42 +0000 (22:47 -0700)] 
trace.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowt-status.c: mark a private file-scope symbol as static
Junio C Hamano [Sun, 16 Sep 2012 05:46:26 +0000 (22:46 -0700)] 
wt-status.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoread-cache.c: mark a private file-scope symbol as static
Junio C Hamano [Sun, 16 Sep 2012 05:44:31 +0000 (22:44 -0700)] 
read-cache.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostrbuf.c: mark a private file-scope symbol as static
Junio C Hamano [Sun, 16 Sep 2012 05:43:15 +0000 (22:43 -0700)] 
strbuf.c: mark a private file-scope symbol as static

Also remove an unused function.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosha1-array.c: mark a private file-scope symbol as static
Junio C Hamano [Sun, 16 Sep 2012 05:39:43 +0000 (22:39 -0700)] 
sha1-array.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosymlinks.c: mark private file-scope symbols as static
Junio C Hamano [Sun, 16 Sep 2012 05:38:28 +0000 (22:38 -0700)] 
symlinks.c: mark private file-scope symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agonotes.c: mark a private file-scope symbol as static
Junio C Hamano [Sat, 15 Sep 2012 21:08:39 +0000 (14:08 -0700)] 
notes.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agorerere.c: mark private file-scope symbols as static
Junio C Hamano [Sat, 15 Sep 2012 21:06:00 +0000 (14:06 -0700)] 
rerere.c: mark private file-scope symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agograph.c: mark private file-scope symbols as static
Junio C Hamano [Sat, 15 Sep 2012 21:02:52 +0000 (14:02 -0700)] 
graph.c: mark private file-scope symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodiff.c: mark a private file-scope symbol as static
Junio C Hamano [Sat, 15 Sep 2012 20:59:59 +0000 (13:59 -0700)] 
diff.c: mark a private file-scope symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocommit.c: mark a file-scope private symbol as static
Junio C Hamano [Sat, 15 Sep 2012 20:58:15 +0000 (13:58 -0700)] 
commit.c: mark a file-scope private symbol as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agobuiltin/notes.c: mark file-scope private symbols as static
Junio C Hamano [Sat, 15 Sep 2012 20:56:07 +0000 (13:56 -0700)] 
builtin/notes.c: mark file-scope private symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDraft release notes to 1.8.0
Junio C Hamano [Sat, 15 Sep 2012 04:44:37 +0000 (21:44 -0700)] 
Draft release notes to 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/ll-merge-binary-ours'
Junio C Hamano [Sat, 15 Sep 2012 04:39:56 +0000 (21:39 -0700)] 
Merge branch 'jc/ll-merge-binary-ours'

"git merge -Xtheirs" did not help content-level merge of binary
files; it should just take their version.  Also "*.jpg binary" in
the attributes did not imply they should use the binary ll-merge
driver.

* jc/ll-merge-binary-ours:
  ll-merge: warn about inability to merge binary files only when we can't
  attr: "binary" attribute should choose built-in "binary" merge driver
  merge: teach -Xours/-Xtheirs to binary ll-merge driver

11 years agoMerge branch 'cn/branch-set-upstream-to'
Junio C Hamano [Sat, 15 Sep 2012 04:39:47 +0000 (21:39 -0700)] 
Merge branch 'cn/branch-set-upstream-to'

Finishing touches to the recently graduated topic to introduce
"git branch --set-upstream-to" option.

* cn/branch-set-upstream-to:
  completion: complete branch name for "branch --set-upstream-to="
  completion: add --set-upstream-to and --unset-upstream

11 years agoMerge branch 'sl/autoconf'
Junio C Hamano [Sat, 15 Sep 2012 04:39:42 +0000 (21:39 -0700)] 
Merge branch 'sl/autoconf'

Reduces repetition in configure.ac.

* sl/autoconf:
  build: don't duplicate substitution of make variables
  build: improve GIT_CONF_SUBST signature

11 years agoMerge branch 'dg/run-command-child-cleanup'
Junio C Hamano [Sat, 15 Sep 2012 04:39:37 +0000 (21:39 -0700)] 
Merge branch 'dg/run-command-child-cleanup'

The code to wait for subprocess and remove it from our internal queue
wasn't quite right.

* dg/run-command-child-cleanup:
  run-command.c: fix broken list iteration in clear_child_for_cleanup

11 years agoMerge branch 'jc/mailinfo-RE'
Junio C Hamano [Sat, 15 Sep 2012 04:39:27 +0000 (21:39 -0700)] 
Merge branch 'jc/mailinfo-RE'

We strip the prefix from "Re: subject" and also from a less common
"re: subject", but left even less common "RE: subject" intact.

* jc/mailinfo-RE:
  mailinfo: strip "RE: " prefix

11 years agoMerge branch 'maint'
Junio C Hamano [Sat, 15 Sep 2012 04:38:20 +0000 (21:38 -0700)] 
Merge branch 'maint'

11 years agoDraft release notes to 1.7.12.1
Junio C Hamano [Sat, 15 Sep 2012 04:37:51 +0000 (21:37 -0700)] 
Draft release notes to 1.7.12.1

We are almost there...

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'sb/send-email-reconfirm-fix' into maint
Junio C Hamano [Sat, 15 Sep 2012 04:32:07 +0000 (21:32 -0700)] 
Merge branch 'sb/send-email-reconfirm-fix' into maint

* sb/send-email-reconfirm-fix:
  send-email: initial_to and initial_reply_to are both optional

11 years agoMerge branch 'jc/send-email-reconfirm' into maint
Junio C Hamano [Sat, 15 Sep 2012 04:32:01 +0000 (21:32 -0700)] 
Merge branch 'jc/send-email-reconfirm' into maint

* jc/send-email-reconfirm:
  send-email: validate & reconfirm interactive responses

11 years agoMerge branch 'mz/cherry-pick-cmdline-order' into maint
Junio C Hamano [Sat, 15 Sep 2012 04:24:18 +0000 (21:24 -0700)] 
Merge branch 'mz/cherry-pick-cmdline-order' into maint

* mz/cherry-pick-cmdline-order:
  cherry-pick/revert: respect order of revisions to pick
  demonstrate broken 'git cherry-pick three one two'
  teach log --no-walk=unsorted, which avoids sorting

11 years agoSync with 1.7.11.7
Junio C Hamano [Sat, 15 Sep 2012 04:20:40 +0000 (21:20 -0700)] 
Sync with 1.7.11.7

11 years agoGit 1.7.11.7 v1.7.11.7
Junio C Hamano [Sat, 15 Sep 2012 03:57:23 +0000 (20:57 -0700)] 
Git 1.7.11.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:48:31 +0000 (20:48 -0700)] 
Merge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11

* jk/maint-quiet-is-synonym-to-s-in-log:
  log: fix --quiet synonym for -s

11 years agoMerge branch 'jc/maint-ident-missing-human-name' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:48:22 +0000 (20:48 -0700)] 
Merge branch 'jc/maint-ident-missing-human-name' into maint-1.7.11

* jc/maint-ident-missing-human-name:
  split_ident_line(): make best effort when parsing author/committer line

11 years agoMerge branch 'rj/test-regex' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:46:39 +0000 (20:46 -0700)] 
Merge branch 'rj/test-regex' into maint-1.7.11

* rj/test-regex:
  test-regex: Add a test to check for a bug in the regex routines

11 years agoMerge branch 'da/gitk-reload-tag-contents' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:45:55 +0000 (20:45 -0700)] 
Merge branch 'da/gitk-reload-tag-contents' into maint-1.7.11

* da/gitk-reload-tag-contents:
  gitk: Rename 'tagcontents' to 'cached_tagcontent'
  gitk: Teach "Reread references" to reload tags
  gitk: Avoid Meta1-F5

11 years agoMerge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:45:03 +0000 (20:45 -0700)] 
Merge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11

* jc/maint-checkout-fileglob-doc:
  gitcli: contrast wildcard given to shell and to git
  gitcli: formatting fix
  Document file-glob for "git checkout -- '*.c'"

11 years agofetch: align per-ref summary report in UTF-8 locales
Nguyễn Thái Ngọc Duy [Tue, 4 Sep 2012 10:39:35 +0000 (17:39 +0700)] 
fetch: align per-ref summary report in UTF-8 locales

fetch does printf("%-*s", width, "foo") where "foo" can be a utf-8
string, but width is in bytes, not columns. For ASCII it's fine as one
byte takes one column. For utf-8, this may result in misaligned ref
summary table.

Introduce gettext_width() function that returns the string length in
columns (currently only supports utf-8 locales). Make the code use
TRANSPORT_SUMMARY(x) where the length is compensated properly in
non-English locales.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoThe sixth batch for 1.8.0
Junio C Hamano [Fri, 14 Sep 2012 19:34:11 +0000 (12:34 -0700)] 
The sixth batch for 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'nd/checkout-option-parsing-fix'
Junio C Hamano [Fri, 14 Sep 2012 18:54:34 +0000 (11:54 -0700)] 
Merge branch 'nd/checkout-option-parsing-fix'

The option parsing of "git checkout" had error checking, dwim and
defaulting missing options, all mixed in the code, and issuing an
appropriate error message with useful context was getting harder.
Reorganize the code and allow giving a proper diagnosis when the
user says "git checkout -b -t foo bar" (e.g. "-t" is not a good name
for a branch).

* nd/checkout-option-parsing-fix:
  checkout: reorder option handling
  checkout: move more parameters to struct checkout_opts
  checkout: pass "struct checkout_opts *" as const pointer

11 years agoMerge branch 'mh/abspath'
Junio C Hamano [Fri, 14 Sep 2012 18:54:28 +0000 (11:54 -0700)] 
Merge branch 'mh/abspath'

* mh/abspath:
  t0060: split absolute path test in two to exercise some of it on Windows
  t0060: verify that real_path() removes extra slashes
  real_path(): properly handle nonexistent top-level paths
  t0060: verify that real_path() works correctly with absolute paths
  real_path(): reject the empty string
  t0060: verify that real_path() fails if passed the empty string
  absolute_path(): reject the empty string
  t0060: verify that absolute_path() fails if passed the empty string
  t0060: move tests of real_path() from t0000 to here