Commit graph

40368 commits

Author SHA1 Message Date
Karthik Nayak 1958a6eb54 ref-filter: make 'ref_array_item' use a FLEX_ARRAY for refname
This would remove the need of using a pointer to store refname.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-03 10:24:07 -07:00
Karthik Nayak 14de7fba34 for-each-ref: introduce filter_refs()
Introduce filter_refs() which will act as an API for filtering
a set of refs. Based on the type of refs the user has requested,
we iterate through those refs and apply filters as per the
given ref_filter structure and finally store the filtered refs
in the ref_array structure.

Currently this will wrap around ref_filter_handler(). Hence,
ref_filter_handler is made file scope static.

As users of this API will no longer send a ref_filter_cbdata
structure directly, we make the elements of ref_filter_cbdata
pointers. We can now use the information given by the users
to obtain our own ref_filter_cbdata structure. Changes are made to
support the change in ref_filter_cbdata structure.

Make 'for-each-ref' use this API.

Helped-by: Junio C Hamano <gitster@pobox.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-03 10:24:07 -07:00
Karthik Nayak c95b758587 ref-filter: move code from 'for-each-ref'
Move most of the code from 'for-each-ref' to 'ref-filter' to make
it publicly available to other commands, this is to unify the code
of 'tag -l', 'branch -l' and 'for-each-ref' so that they can share
their implementations with each other.

Add 'ref-filter' to the Makefile, this completes the movement of code
from 'for-each-ref' to 'ref-filter'.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-03 10:24:07 -07:00
Eric Sunshine 1c601af25a Documentation/git-tools: retire manually-maintained list
When Git was young, people looking for third-party Git-related tools
came to the Git project itself to find them, so it made sense to
maintain a list of tools here. These days, however, search engines fill
that role much more efficiently, so retire the manually-maintained
list.

The list of front-ends and tools on the Git wiki rates perhaps a distant
second to search engines, and may still have value, so retain a
reference to it.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-28 13:21:59 -07:00
Eric Sunshine dd7961c0fb Documentation/git-tools: drop references to defunct tools
Cogito -- unmaintained since late 2006[1]
pg -- URL dead; web searches reveal no information
quilt2git -- URL dead; web searches reveal no information
(h)gct -- URL dead; no repository activity since 2007[2]

[1]: http://git.or.cz/cogito/
[2]: http://repo.or.cz/w/hgct.git

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-28 13:21:42 -07:00
Eric Sunshine e810f93977 Documentation/git-tools: fix item text formatting
Descriptive text for each tool item is incorrectly formatted using a
fixed width font. Fix formatting to use a variable width font by
unindenting the item text.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-28 13:21:13 -07:00
Eric Sunshine fd8c620cd9 Documentation/git-tools: improve discoverability of Git wiki
These days, the best way to find Git-related tools is via a search
engine. The Git wiki may be a distant second, and git-tools.txt falls in
last place. Therefore, promote the Git wiki reference to the top of
git-tools.txt so the reader will encounter it first, rather than hiding
it away at the very bottom.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-28 13:20:51 -07:00
Junio C Hamano a17c56c056 Git 2.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-27 12:29:47 -07:00
Junio C Hamano 7a2c87b152 Sync with 2.4.7 2015-07-27 12:26:40 -07:00
Junio C Hamano ca00f80b58 Git 2.4.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-27 12:25:42 -07:00
Junio C Hamano caac7a3abe Merge branch 'jk/pretty-encoding-doc' into maint
Doc update.

* jk/pretty-encoding-doc:
  docs: clarify that --encoding can produce invalid sequences
2015-07-27 12:21:48 -07:00
Junio C Hamano ff132a190e Merge branch 'tb/checkout-doc' into maint
Doc update.

* tb/checkout-doc:
  git-checkout.txt: document "git checkout <pathspec>" better
2015-07-27 12:21:47 -07:00
Junio C Hamano 3afcec9057 Merge branch 'ls/hint-rev-list-count' into maint
* ls/hint-rev-list-count:
  rev-list: add --count to usage guide
2015-07-27 12:21:47 -07:00
Junio C Hamano 315b3ba3e4 Merge branch 'mm/branch-doc-updates' into maint
* mm/branch-doc-updates:
  Documentation/branch: document -M and -D in terms of --force
  Documentation/branch: document -d --force and -m --force
2015-07-27 12:21:46 -07:00
Junio C Hamano bde6a72af5 Merge branch 'jc/fsck-retire-require-eoh' into maint
A fix to a minor regression to "git fsck" in v2.2 era that started
complaining about a body-less tag object when it lacks a separator
empty line after its header to separate it with a non-existent body.

* jc/fsck-retire-require-eoh:
  fsck: it is OK for a tag and a commit to lack the body
2015-07-27 12:21:46 -07:00
Junio C Hamano c18593658e Merge branch 'et/http-proxyauth' into maint
We used to ask libCURL to use the most secure authentication method
available when talking to an HTTP proxy only when we were told to
talk to one via configuration variables.  We now ask libCURL to
always use the most secure authentication method, because the user
can tell libCURL to use an HTTP proxy via an environment variable
without using configuration variables.

* et/http-proxyauth:
  http: always use any proxy auth method available
2015-07-27 12:21:44 -07:00
Junio C Hamano 342c14db8c Merge branch 'jc/unexport-git-pager-in-use-in-pager' into maint
When you say "!<ENTER>" while running say "git log", you'd confuse
yourself in the resulting shell, that may look as if you took
control back to the original shell you spawned "git log" from but
that isn't what is happening.  To that new shell, we leaked
GIT_PAGER_IN_USE environment variable that was meant as a local
communication between the original "Git" and subprocesses that was
spawned by it after we launched the pager, which caused many
"interesting" things to happen, e.g. "git diff | cat" still paints
its output in color by default.

Stop leaking that environment variable to the pager's half of the
fork; we only need it on "Git" side when we spawn the pager.

* jc/unexport-git-pager-in-use-in-pager:
  pager: do not leak "GIT_PAGER_IN_USE" to the pager
2015-07-27 12:21:44 -07:00
Junio C Hamano 3b175fb940 Merge branch 'mh/strbuf-read-file-returns-ssize-t' into maint
Avoid possible ssize_t to int truncation.

* mh/strbuf-read-file-returns-ssize-t:
  strbuf: strbuf_read_file() should return ssize_t
2015-07-27 12:21:43 -07:00
Junio C Hamano 6f402a93ce Merge branch 'kb/config-unmap-before-renaming' into maint
"git config" failed to update the configuration file when the
underlying filesystem is incapable of renaming a file that is still
open.

* kb/config-unmap-before-renaming:
  config.c: fix writing config files on Windows network shares
2015-07-27 12:21:42 -07:00
Junio C Hamano 726359be47 Merge branch 'jk/rev-list-no-bitmap-while-pruning' into maint
A minor bugfix when pack bitmap is used with "rev-list --count".

* jk/rev-list-no-bitmap-while-pruning:
  rev-list: disable --use-bitmap-index when pruning commits
2015-07-27 12:21:42 -07:00
Junio C Hamano aa0b816c5d Merge branch 'rh/test-color-avoid-terminfo-in-original-home' into maint
An ancient test framework enhancement to allow color was not
entirely correct; this makes it work even when tput needs to read
from the ~/.terminfo under the user's real HOME directory.

* rh/test-color-avoid-terminfo-in-original-home:
  test-lib.sh: fix color support when tput needs ~/.terminfo
  Revert "test-lib.sh: do tests for color support after changing HOME"
2015-07-27 12:21:41 -07:00
Junio C Hamano 7c696007ca Merge branch 'jk/fix-refresh-utime' into maint
Fix a small bug in our use of umask() return value.

* jk/fix-refresh-utime:
  check_and_freshen_file: fix reversed success-check
2015-07-27 12:21:40 -07:00
Junio C Hamano 3f8b439a0e Merge branch 'cb/rebase-am-exit-code' into maint
"git rebase" did not exit with failure when format-patch it invoked
failed for whatever reason.

* cb/rebase-am-exit-code:
  rebase: return non-zero error code if format-patch fails
2015-07-27 12:21:39 -07:00
Junio C Hamano de62fe8c42 Merge branch 'jk/index-pack-reduce-recheck' into maint
Disable "have we lost a race with competing repack?" check while
receiving a huge object transfer that runs index-pack.

* jk/index-pack-reduce-recheck:
  index-pack: avoid excessive re-reading of pack directory
2015-07-27 12:21:38 -07:00
Jacob Keller cd377f45c9 refs: loosen restriction on wildcard "*" refspecs
Loosen restrictions on refspecs by allowing patterns that have a "*"
within a component instead of only as the whole component.

Remove the logic to accept a single "*" as a whole component from
check_refname_format(), and implement an extended form of that logic
in check_refname_component().  Pass the pointer to the flags argument
to the latter, as it has to clear REFNAME_REFSPEC_PATTERN bit when
it sees "*".

Teach check_refname_component() function to allow an asterisk "*"
only when REFNAME_REFSPEC_PATTERN is set in the flags, and drop the
bit after seeing a "*", to ensure that one side of a refspec
contains at most one asterisk.

This will allow us to accept refspecs such as `for/bar*:foo/baz*`.
Any refspec which functioned before shall continue functioning with
the new logic.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-27 09:21:31 -07:00
Jacob Keller 53a8555ee4 refs: cleanup comments regarding check_refname_component()
Correctly specify all characters which are rejected under the '4: a
bad character' disposition, which did not list all characters that
are treated as such.

Cleanup comment style for rejected refs by inserting a ", or" at the
end of each statement.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-27 09:21:15 -07:00
Eric Sunshine f25b98e6f8 Documentation/git: drop outdated Cogito reference
Cogito hasn't been maintained since late 2006, so drop the reference
to it. The warning that SCMS front-ends might override listed
environment variables, however, may still be valuable, so keep it but
generalize the wording.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-25 10:47:11 -07:00
Junio C Hamano 6f9504c48e RelNotes: am.threeWay does not exist (yet)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-24 14:31:23 -07:00
Junio C Hamano 15dc5b5fb0 Revert "git-am: add am.threeWay config variable"
This reverts commit d96a275b91.

It used to be possible to apply a patch series with "git am mbox"
and then only after seeing a failure, switch to three-way mode via
"git am -3" (no other options or arguments).  The commit being
reverted broke this workflow.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-24 10:55:24 -07:00
David Aguilar e7aac44ed2 contrib/subtree: ignore log.date configuration
git-subtree's log format string uses "%ad" and "%cd", which
respect the user's configured log.date value.

This is problematic for git-subtree because it needs to use real
dates so that copied commits come through unchanged.

Add a test and tweak the format strings to use %aD and %cD
so that the default date format is used instead.

Reported-by: Bryan Jacobs <b@q3q.us>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-23 15:08:41 -07:00
Zoë Blade 69f9c87d46 userdiff: add support for Fountain documents
Add support for Fountain, a plain text screenplay format.  Git
facilitates not just programming specifically, but creative writing
in general, so it makes sense to also support other plain text
documents besides source code.

In the structure of a screenplay specifically, scenes are roughly
analogous to functions, in the sense that it makes your job easier
if you can see which ones were changed in a given range of patches.

More information about the Fountain format can be found on its
official website, at http://fountain.io .

Signed-off-by: Zoë Blade <zoe@bytenoise.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-23 14:44:51 -07:00
Jiang Xin b112b14d78 receive-pack: crash when checking with non-exist HEAD
If HEAD of a repository points to a conflict reference, such as:

* There exist a reference named 'refs/heads/jx/feature1', but HEAD
  points to 'refs/heads/jx', or

* There exist a reference named 'refs/heads/feature', but HEAD points
  to 'refs/heads/feature/bad'.

When we push to delete a reference for this repo, such as:

        git push /path/to/bad-head-repo.git :some/good/reference

The git-receive-pack process will crash.

This is because if HEAD points to a conflict reference, the function
`resolve_refdup("HEAD", ...)` does not return a valid reference name,
but a null buffer.  Later matching the delete reference against the null
buffer will cause git-receive-pack crash.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-22 14:18:22 -07:00
Junio C Hamano d830d395a1 builtin/send-pack.c: respect user.signingkey
When git-send-pack is exec'ed, as is done by git-remote-http, it
does not read the config, and configured value of user.signingkey is
ignored. Thus it was impossible to specify a signing key over HTTP,
other than the default key in the keyring having a User ID matching
the "Name <email>" format.

This patch at least partially fixes the problem by reading in the GPG
config from within send-pack. It does not address the related problem
of plumbing a value for this configuration option using
`git -c user.signingkey push ...`.

Signed-off-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 15:24:27 -07:00
Junio C Hamano f99a38c012 Git 2.5.0-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:11:54 -07:00
David Turner 89dea97334 git-stash: use update-ref --create-reflog instead of creating files
This is in support of alternate ref backends which don't necessarily
store reflogs as files.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:08:49 -07:00
David Turner 144c76fa39 update-ref and tag: add --create-reflog arg
Allow the creation of a ref (e.g. stash) with a reflog already in
place. For most refs (e.g. those under refs/heads), this happens
automatically, but for others, we need this option.

Currently, git does this by pre-creating the reflog, but alternate ref
backends might store reflogs somewhere other than .git/logs.  Code
that now directly manipulates .git/logs should instead use git
plumbing commands.

I also added --create-reflog to git tag, just for completeness.

In a moment, we will use this argument to make git stash work with
alternate ref backends.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:08:35 -07:00
David Turner 0f2a71d992 refs: add REF_FORCE_CREATE_REFLOG flag
Add a flag to allow forcing the creation of a reflog even if the ref
name and core.logAllRefUpdates setting would not ordinarily cause ref
creation.

In a moment, we will use this to add options to git tag and git
update-ref to force reflog creation.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:08:26 -07:00
David Turner afcb2e7a3b git-reflog: add exists command
This is necessary because alternate ref backends might store reflogs
somewhere other than .git/logs.  Code that now directly manipulates
.git/logs should instead go through git-reflog.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:08:14 -07:00
David Turner abd0cd3a30 refs: new public ref function: safe_create_reflog
The safe_create_reflog function creates a reflog, if it does not
already exist.

The log_ref_setup function becomes private and gains a force_create
parameter to force the creation of a reflog even if log_all_ref_updates
is false or the refname is not one of the special refnames.

The new parameter also reduces the need to store, modify, and restore
the log_all_ref_updates global before reflog creation.

In a moment, we will use this to add reflog creation commands to
git-reflog.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:07:59 -07:00
David Turner 4e2bef57c9 refs: break out check for reflog autocreation
This is just for clarity.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:07:54 -07:00
David Turner a4c653dfcd refs.c: add err arguments to reflog functions
Add an err argument to log_ref_setup that can explain the reason
for a failure. This then eliminates the need to manage errno through
this function since we can just add strerror(errno) to the err string
when meaningful. No callers relied on errno from this function for
anything else than the error message.

Also add err arguments to private functions write_ref_to_lockfile,
log_ref_write_1, commit_ref_update. This again eliminates the need to
manage errno in these functions.

Some error messages are slightly reordered.

Update of a patch by Ronnie Sahlberg.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 14:07:28 -07:00
David Turner 7d782416cb unpack-trees: don't update files with CE_WT_REMOVE set
Don't update files in the worktree from cache entries which are
flagged with CE_WT_REMOVE.

When a user does a sparse checkout, git removes files that are
marked with CE_WT_REMOVE (because they are out-of-scope for the
sparse checkout). If those files are also marked CE_UPDATE (for
instance, because they differ in the branch that is being checked
out and the outgoing branch), git would previously recreate them.
This patch prevents them from being recreated.

These erroneously-created files would also interfere with merges,
causing pre-merge revisions of out-of-scope files to appear in the
worktree.

apply_sparse_checkout() is the function where all "action"
manipulation (add, delete, update files..) for sparse checkout
occurs; it should not ask to delete and update both at the same
time.

Signed-off-by: Anatole Shaw <git-devel@omni.poc.net>
Signed-off-by: David Turner <dturner@twopensource.com>
Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-21 13:19:20 -07:00
Junio C Hamano c5918ab450 Merge branch 'tf/gitweb-typofix'
* tf/gitweb-typofix:
  gitweb: fix typo in man page
2015-07-21 12:45:27 -07:00
Junio C Hamano 83d3330dec l10n-2.5.0-rnd2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVrYWdAAoJEMek6Rt1RHooJR8QAIC+KLoZ7pSgOzira17zWXms
 aNY4crxis0ABFa/cuklh6mV45dkbYlxyRwmsjR8Aewppo8QNp5qd9o9pvz2U8u72
 DfoIMBwXPRahP0OP+Wv2/s5TmTHYH0b3PpAsiyrcH5S3MbwYiybT4cKtnCOuaag6
 AwwS3/iEaUPc6t1ioRwbhIxHUZ5pjWI3qVcD6Vq0+hvFOoQmK/faWN3bR9WSqZu+
 Yn/tLmpay8TTNX6sPlHGjERFx3nmdWI8MpxkI0L7ydIcTvErgUCxY5r9Y4bdCYN4
 ibBIIQRdkQR54PFpui/CYuvsDtL3UFxhk6SB928FmehwGc29HK5/+wpAeRYm35oC
 XJcm/c1En2gQhqU4EtHsJxPZii+hAy2v/w8sRCp2Ruvc4aRZ3B5ffSyHfQ1mcn89
 dsWqB5cX4rMjxAv/n8QITLVBp1YRCoKbn5IwfUnQx4EaCiHP4hQvPQHxsPSJqTC/
 /dBXwFhDIC+nmITZCJVJXNfzWh1VfJrUS06O8twhYAxdhCGttEHbJ7OC1kZqV+W0
 tbKoZz260OjWiXW5g3U0Os+dTq5BanqAPf7uwuTsIuMv8og0frZ/TevwlqnmHw5E
 +yr+tJ9evUn4a2AiIGGESlrxmd+EL72E0Q/2SNEpd/qtSrZSiknubwD3B//a+zGv
 xyHyukC8t5C9k2B3SMng
 =uYzi
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.5.0-rnd2' of git://github.com/git-l10n/git-po

l10n-2.5.0-rnd2

* tag 'l10n-2.5.0-rnd2' of git://github.com/git-l10n/git-po:
  l10n: ca.po: update translation
  l10n: de.po: translate 9 new messages
  l10n: Updated Bulgarian translation of git (2359t,0f,0u)
  l10n: zh_CN: for git v2.5.0 l10n round 2
  l10n: sv.po: Update Swedish translation (2359t0f0u)
  l10n: fr v2.5.0 round 2 (2359t)
  l10n: ru.po: update Russian translation
  l10n: Updated Vietnamese translation (2359t)
  l10n: git.pot: v2.5.0 round 2 (9 new, 5 removed)
2015-07-21 10:27:33 -07:00
Jeff King e4f031e34b strbuf: make strbuf_addftime more robust
The return value of strftime is poorly designed; when it
returns 0, the caller cannot tell if the buffer was not
large enough, or if the output was actually 0 bytes. In the
original implementation of strbuf_addftime, we simply punted
and guessed that our 128-byte hint would be large enough.

We can do better, though, if we're willing to treat strftime
like less of a black box. We can munge the incoming format
to make sure that it never produces 0-length output, and
then "fix" the resulting output.  That lets us reliably grow
the buffer based on strftime's return value.

Clever-idea-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-20 22:17:06 -07:00
SZEDER Gábor dd160d794f bash prompt: faster untracked status indicator with untracked directories
If the untracked status indicator is enabled, __git_ps1() looks for
untracked files by running 'git ls-files'.  This can be perceptibly slow
in case of an untracked directory containing lot of files, because it
lists all files found in the untracked directory only to be redirected
into /dev/null right away (this is the actual command run by __git_ps1()):

  $ ls untracked-dir/ |wc -l
  100000
  $ time git ls-files --others --exclude-standard --error-unmatch \
    -- ':/*' >/dev/null 2>/dev/null

  real	0m0.955s
  user	0m0.936s
  sys	0m0.016s

Eliminate this delay by additionally passing the '--directory
--no-empty-directory' options to 'git ls-files' to show only the name of
non-empty untracked directories instead of all their content:

  $ time git ls-files --others --exclude-standard --directory \
    --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null

  real	0m0.010s
  user	0m0.008s
  sys	0m0.000s

This follows suit of ea95c7b8f5 (completion: improve untracked directory
filtering for filename completion, 2013-09-18).

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-20 13:08:56 -07:00
SZEDER Gábor 6bfab998b5 bash prompt: test untracked files status indicator with untracked dirs
The next commit will tweak the way __git_ps1() decides whether to display
the untracked files status indicator in the presence of untracked
directories.  Add tests to make sure it doesn't change current behavior,
in particular that an empty untracked directory doesn't trigger the
untracked files status indicator.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-20 13:08:53 -07:00
Alex Henrie cdab3cacf6 l10n: ca.po: update translation
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-07-20 11:54:40 -06:00
Paul Tan 5b05b92d03 t3901: test git-am encoding conversion
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
supported the --utf8 and --no-utf8 options, and if set, would pass the
-u flag and the -k flag respectively.

git mailinfo -u will re-code the commit log message and authorship info
in the charset specified by i18n.commitencoding setting, while
git mailinfo -n will disable the re-coding.

Since d84029b (--utf8 is now default for 'git-am', 2007-01-08), --utf8
is set by default in git-am.

Add various encoding conversion tests to t3901 to test git-mailinfo's
encoding conversion. In addition, add a test for --no-utf8 to check that
no encoding conversion will occur if that option is set.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-20 10:53:05 -07:00
Paul Tan 0f62fbae65 t3418: non-interactive rebase --continue with rerere enabled
Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28), git-am
will call git-rerere to re-use recorded merge conflict resolutions if
any occur in a threeway merge.

Add a test to ensure that git-rerere is called by git-am (which handles
the non-interactive rebase).

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-20 10:53:01 -07:00