trailer: ignore comment lines inside the trailers

Otherwise trailers that are commented out might be
processed. We would also error out if the comment line
char is also a separator.

This means that comments inside a trailer block will
disappear, but that was already the case anyway.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
trailer: display a trailer without its trailing newline

Trailers passed to the parse_trailer() function often have
a trailing newline. When erroring out, we should display
the invalid trailer properly, that means without any
trailing newline.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
doc: add some crossrefs between manual pages

In particular, git-fast-import and -export link to each
other, and gitremote-helpers links to existing remote
helpers, and vice versa. Also link to fast-import from the
remote helper spec, as this is relevant for remote helpers
using the fast-import format.

Signed-off-by: Max Horn <max@quendi.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SubmittingPatches: final submission is To: maintainer and CC: list

In an earlier part there is:

  "re-send it with "To:" set to the maintainer [*1*] and "cc:" the list [*2*]"

for the final submission, but later we see

  "Send it to the list and cc the maintainer."

Fix the later one to match the previous.

Signed-off-by: Slavomir Vlcek <svlc@inventati.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t5705: the file:// URL should be absolute

The test misused a URL "file://." to mean "relative to here",
which we no longer accept.

In a file:// URL, typically there is no host, and RFC1738 says that
file:///<path> should be used.

Update t5705 to use a working URL.

Reported-by: Michael Blume <blume.mike@gmail.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gittutorial: fix output of 'git status'

'git status' doesn't output leading '#'s these days.

Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'cc/interpret-trailers'

Small fixes to a new experimental command already in 'master'.

* cc/interpret-trailers:
  trailer: display a trailer without its trailing newline
  trailer: ignore comment lines inside the trailers
Merge branch 'tb/no-relative-file-url'

* tb/no-relative-file-url:
  t5705: the file:// URL should be absolute
Merge branch 'mh/doc-remote-helper-xref'

* mh/doc-remote-helper-xref:
  doc: add some crossrefs between manual pages
Merge branch 'sn/tutorial-status-output-example'

* sn/tutorial-status-output-example:
  gittutorial: fix output of 'git status'
Merge branch 'sv/submitting-final-patch'

* sv/submitting-final-patch:
  SubmittingPatches: final submission is To: maintainer and CC: list
tag: factor out contains traversal

Other "--contains" traversals can benefit from the same
speedups that "tag --contains" has received. This code was
not originally made generically available because it has
some gross corners that make it easy to use it in a wrong or
unsafe way. This patch moves the code to commit.[ch] and
attempts to clean up those corners. Specifically:

  1. The "contains" function is renamed to "commit_contains",
     to more clearly indicate what it does.

  2. The original calling convention was to simply call
     "contains", which would magically cache intermediate
     results in the object flag bits. Now we have a context
     struct and an init/release pair, which makes it more
     clear that calls with the same context are related.

  3. From a modularity standpoint, the traversal would
     ideally operate purely on the commit_contains_context.
     But like most traversals, we keep our state in the
     global commit object flags, which means we can only run
     one "contains" traversal at a time.  Therefore, the
     init function will notice and abort when a second
     simultaneous traversal is begun.

  4. The cached state reflects the results for a particular
     set of "want" commits. With the original interface,
     there was nothing to prevent calling "contains" with a
     new set of "want" commits, which would produce
     incoherent results. Now, the contained commits are
     provided once by the init function (which, as noted
     above, will die if invoked twice without an intervening
     finish).

  5. The original implementation abused UNINTERESTING and
     TMP_MARK. Instead, we define new flags to avoid
     conflict with existing revision flags.

  6. The original implementation just left the global object
     flags smudged. This is OK for "tag --contains", but not
     for general use. The release function now clears our
     object flags after use.
move parse_opt_points_at
add ref-filter api
tag: convert to ref-filter
branch: bump up get_head_description
branch: move symref prefix-stripping to presentation layer
branch: roll show_detached HEAD into regular ref_list
branch: drop non-commit error reporting
branch: push 'current' check down to presentation layer