* What's cooking in git.git (Dec 2012, #05; Tue, 18)
From: Junio C Hamano @ 2012-12-18 20:31 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
The tip of the 'master' branch is a bit past 1.8.1-rc2; hopefully we
can go final around the end of the week.
Many topics are getting into good shape in 'next', hopefully ready
to be merged soon after the 1.8.1 final.
You can find the changes described here in the integration branches of the
repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[New Topics]
* cc/no-gitk-build-dependency (2012-12-18) 3 commits
- Makefile: replace "echo 1>..." with "echo >..."
- Makefile: detect when PYTHON_PATH changes
- Makefile: remove tracking of TCLTK_PATH
Remove leftover bits from an earlier change to move gitk in its own
subdirectory. Reimplementing the dependency tracking rules needs
to be done in gitk history separately.
* cr/doc-checkout-branch (2012-12-18) 2 commits
- Documentation/git-checkout.txt: document 70c9ac2 behavior
- Documentation/git-checkout.txt: clarify usage
Document the magic "git checkout <no-such-branch>" hack to create
local branch out of a remote tracking branch that hasn't been
documented so far.
Will merge to 'next'.
* jc/format-color-auto (2012-12-17) 2 commits
- log --format: teach %C(auto,black) to respect color config
- t6006: clean up whitespace
Introduce "log --format=%C(auto,blue)Foo%C(auto,reset)" that does
not color its output when writing to a non-terminal.
Will merge to 'next'.
* ss/svn-prompt (2012-12-17) 3 commits
- git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
- perl/Git.pm: Honor SSH_ASKPASS as fallback if GIT_ASKPASS is not set
- git-svn, perl/Git.pm: add central method for prompting passwords
Waiting for an Ack from the area export.
* zk/clean-report-failure (2012-12-17) 1 commit
- git-clean: Display more accurate delete messages
"git clean" states what it is going to remove and then goes on to
remove it, but sometimes it only discovers things that cannot be
removed after recursing into a directory, which makes the output
confusing and even wrong.
Waiting for responses to review comments.
* jc/doc-diff-blobs (2012-12-18) 1 commit
- Documentation: Describe "git diff <blob> <blob>" separately
"git diff <blob> <blob>" was not documented and was only hinted as
an extension to "git diff <commit> <commit> -- <pathspec>", but
comparison between two blobs are more special than that. It does
not take any pathspec to begin with.
* mp/complete-paths (2012-12-18) 1 commit
- git-completion.bash: add support for path completion
The completion script used to let the default completer to suggest
pathnames, which gave too many irrelevant choices (e.g. "git add"
would not want to add an unmodified path). Teach it to use a more
git-aware logic to enumerate only relevant ones.
--------------------------------------------------
[Stalled]
* jc/merge-blobs (2012-12-13) 5 commits
. [broken] wip to fix d/f conflicts
- merge-tree: add comments to clarify what these functions are doing
- merge-tree: lose unused "resolve_directories"
- merge-tree: lose unused "flags" from merge_list
- Which merge_file() function do you mean?
A beginning of a new merge strategy based on the disused merge-tree
proof-of-concept code.
* jc/doc-maintainer (2012-11-27) 1 commit
- update "howto maintain git"
An early draft that is still incomplete.
* fc/remote-bzr (2012-12-13) 10 commits
- (fixup) test-bzr.sh: fix multi-line string assignment
- remote-bzr: detect local repositories
- remote-bzr: add support for older versions of bzr
- remote-bzr: add support to push special modes
- remote-bzr: add support for fecthing special modes
- remote-bzr: add simple tests
- remote-bzr: update working tree upon pushing
- remote-bzr: add support for remote repositories
- remote-bzr: add support for pushing
- Add new remote-bzr transport helper
New remote helper for bzr (v3). With minor fixes, this may be ready
for 'next'.
* mo/cvs-server-updates (2012-12-09) 18 commits
- t9402: Use TABs for indentation
- t9402: Rename check.cvsCount and check.list
- t9402: Simplify git ls-tree
- t9402: Add missing &&; Code style
- t9402: No space after IO-redirection
- t9402: Dont use test_must_fail cvs
- t9402: improve check_end_tree() and check_end_full_tree()
- t9402: sed -i is not portable
- cvsserver Documentation: new cvs ... -r support
- cvsserver: add t9402 to test branch and tag refs
- cvsserver: support -r and sticky tags for most operations
- cvsserver: Add version awareness to argsfromdir
- cvsserver: generalize getmeta() to recognize commit refs
- cvsserver: implement req_Sticky and related utilities
- cvsserver: add misc commit lookup, file meta data, and file listing functions
- cvsserver: define a tag name character escape mechanism
- cvsserver: cleanup extra slashes in filename arguments
- cvsserver: factor out git-log parsing logic
Needs review by folks interested in cvsserver.
* as/check-ignore (2012-11-08) 14 commits
- t0007: fix tests on Windows
- Documentation/check-ignore: we show the deciding match, not the first
- Add git-check-ignore sub-command
- dir.c: provide free_directory() for reclaiming dir_struct memory
- pathspec.c: move reusable code from builtin/add.c
- dir.c: refactor treat_gitlinks()
- dir.c: keep track of where patterns came from
- dir.c: refactor is_path_excluded()
- dir.c: refactor is_excluded()
- dir.c: refactor is_excluded_from_list()
- dir.c: rename excluded() to is_excluded()
- dir.c: rename excluded_from_list() to is_excluded_from_list()
- dir.c: rename path_excluded() to is_path_excluded()
- dir.c: rename cryptic 'which' variable to more consistent name
Duy helped to reroll this.
Expecting a re-roll.
* aw/rebase-am-failure-detection (2012-10-11) 1 commit
- rebase: Handle cases where format-patch fails
I am unhappy a bit about the possible performance implications of
having to store the output in a temporary file only for a rare case
of format-patch aborting.
* jk/lua-hackery (2012-10-07) 6 commits
- pretty: fix up one-off format_commit_message calls
- Minimum compilation fixup
- Makefile: make "lua" a bit more configurable
- add a "lua" pretty format
- add basic lua infrastructure
- pretty: make some commit-parsing helpers more public
Interesting exercise. When we do this for real, we probably would want
to wrap a commit to make it more like an "object" with methods like
"parents", etc.
* fc/remote-testgit-feature-done (2012-10-29) 1 commit
- remote-testgit: properly check for errors
Needs review and Ack (or Nack) from people involved in the remote
helper interface for this to move forward.
* rc/maint-complete-git-p4 (2012-09-24) 1 commit
(merged to 'next' on 2012-10-29 at af52cef)
+ Teach git-completion about git p4
Comment from Pete will need to be addressed in a follow-up patch.
* jc/maint-name-rev (2012-09-17) 7 commits
- describe --contains: use "name-rev --algorithm=weight"
- name-rev --algorithm=weight: tests and documentation
- name-rev --algorithm=weight: cache the computed weight in notes
- name-rev --algorithm=weight: trivial optimization
- name-rev: --algorithm option
- name_rev: clarify the logic to assign a new tip-name to a commit
- name-rev: lose unnecessary typedef
"git name-rev" names the given revision based on a ref that can be
reached in the smallest number of steps from the rev, but that is
not useful when the caller wants to know which tag is the oldest one
that contains the rev. This teaches a new mode to the command that
uses the oldest ref among those which contain the rev.
I am not sure if this is worth it; for one thing, even with the help
from notes-cache, it seems to make the "describe --contains" even
slower. Also the command will be unusably slow for a user who does
not have a write access (hence unable to create or update the
notes-cache).
Stalled mostly due to lack of responses.
* jc/xprm-generation (2012-09-14) 1 commit
- test-generation: compute generation numbers and clock skews
A toy to analyze how bad the clock skews are in histories of real
world projects.
Stalled mostly due to lack of responses.
* jc/blame-no-follow (2012-09-21) 2 commits
- blame: pay attention to --no-follow
- diff: accept --no-follow option
Teaches "--no-follow" option to "git blame" to disable its
whole-file rename detection.
Stalled mostly due to lack of responses.
* jc/doc-default-format (2012-11-26) 2 commits
- [SQAUSH] allow "cd Doc* && make DEFAULT_DOC_TARGET=..."
- Allow generating a non-default set of documentation
Need to address the installation half if this is to be any useful.
* mk/maint-graph-infinity-loop (2012-09-25) 1 commit
- graph.c: infinite loop in git whatchanged --graph -m
The --graph code fell into infinite loop when asked to do what the
code did not expect ;-)
Anybody who worked on "--graph" wants to comment?
Stalled mostly due to lack of responses.
* jc/add-delete-default (2012-08-13) 1 commit
- git add: notice removal of tracked paths by default
"git add dir/" updated modified files and added new files, but does
not notice removed files, which may be "Huh?" to some users. They
can of course use "git add -A dir/", but why should they?
Resurrected from graveyard, as I thought it was a worthwhile thing
to do in the longer term.
Waiting for comments.
* mb/remote-default-nn-origin (2012-07-11) 6 commits
- Teach get_default_remote to respect remote.default.
- Test that plain "git fetch" uses remote.default when on a detached HEAD.
- Teach clone to set remote.default.
- Teach "git remote" about remote.default.
- Teach remote.c about the remote.default configuration setting.
- Rename remote.c's default_remote_name static variables.
When the user does not specify what remote to interact with, we
often attempt to use 'origin'. This can now be customized via a
configuration variable.
Expecting a re-roll.
"The first remote becomes the default" bit is better done as a
separate step.
--------------------------------------------------
[Cooking]
* ja/directory-attrs (2012-12-17) 1 commit
(merged to 'next' on 2012-12-17 at ced8e73)
+ Add directory pattern matching to attributes
The attribute mechanism didn't allow limiting attributes to be
applied to only a single directory itself with "path/" like the
exclude mechanism does.
Will cook in 'next'.
* jk/mailmap-cleanup (2012-12-12) 5 commits
(merged to 'next' on 2012-12-17 at 07c1a11)
+ contrib: update stats/mailmap script
+ .mailmap: normalize emails for Linus Torvalds
+ .mailmap: normalize emails for Jeff King
+ .mailmap: fix broken entry for Martin Langhoff
+ .mailmap: match up some obvious names/emails
Update various entries in our .mailmap file.
* jk/mailmap-from-blob (2012-12-13) 5 commits
(merged to 'next' on 2012-12-17 at 14b7cdc)
+ mailmap: default mailmap.blob in bare repositories
+ mailmap: fix some documentation loose-ends for mailmap.blob
+ mailmap: clean up read_mailmap error handling
+ mailmap: support reading mailmap from blobs
+ mailmap: refactor mailmap parsing for non-file sources
Allow us to read, and default to read, mailmap files from the tip
of the history in bare repositories. This will help running tools
like shortlog in server settings.
* nd/index-format-doc (2012-12-13) 1 commit
(merged to 'next' on 2012-12-17 at 7984924)
+ index-format.txt: clarify what is "invalid"
* as/doc-for-devs (2012-12-16) 2 commits
- Documentation: move support for old compilers to CodingGuidelines
- SubmittingPatches: add convention of prefixing commit messages
It might be a better idea to move the text the bottom one adds to
the extended description from the quick checklist part.
Will merge to 'next'.
* dm/port (2012-12-18) 4 commits
- git-compat-util.h: do not #include <sys/param.h> by default
- Generalize the inclusion of strings.h
- Detect when the passwd struct is missing pw_gecos
- Support builds when sys/param.h is missing
Will merge to 'next'.
* jc/fetch-tags-doc (2012-12-13) 1 commit
(merged to 'next' on 2012-12-17 at 857413a)
+ fetch --tags: clarify documentation
The explanation for "fetch --tags" was actually talking more about
"fetch --no-tags". Clariify what "--tags" really means.
* jk/avoid-mailto-invalid-in-doc (2012-12-16) 1 commit
- Documentation: don't link to example mail addresses
Avoids invalid sample e-mail addresses from becoming mailto links
in the formatted output, which by itself is "Meh" for me (who
cares?) but it highlights some issues with ``pretty quotes''.
Will merge to 'next'.
* jk/complete-commit-c (2012-12-15) 1 commit
- completion: complete refs for "git commit -c"
Complete "git commmit -c foo<TAB>" into a refname that begins with
"foo".
Will merge to 'next'.
* jk/error-const-return (2012-12-15) 2 commits
- silence some -Wuninitialized false positives
- make error()'s constant return value more visible
Help compilers' flow analysis by making it more explicit that
error() always returns -1, to reduce false "variable used
uninitialized" warnings.
This is still an RFC.
* mk/qnx (2012-12-15) 2 commits
- Port to QNX
- Make lock local to fetch_pack
Port to QNX; we may want to rebase this on top of dm/port topic as
it also wants to use the HAVE_STRINGS_H mechanism it introduces.
* rj/maint-cygwin-say-color (2012-12-15) 1 commit
- tests: Allow customization of how say_color() prints
Even though I do not think of a cleaner way to do this, I am not
happy with the way how $GIT_TEST_PRINT and $GIT_TEST_PRINT_LN are
interpolated into the command line with token splitting at $IFS.
* sl/readme-gplv2 (2012-12-15) 2 commits
- README: it does not matter who the current maintainer is
- README: Git is released under the GPLv2, not just "the GPL"
Clarify that the project as a whole is GPLv2 only, with some parts
borrowed under different licenses that are compatible with GPLv2.
Will merge to 'next'.
* ta/api-index-doc (2012-12-16) 1 commit
- Remove misleading date from api-index-skel.txt
Will merge to 'next'.
* as/test-tweaks (2012-12-17) 7 commits
- tests: paint unexpectedly fixed known breakages in bold red
- tests: test the test framework more thoroughly
- tests: refactor mechanics of testing in a sub test-lib
- tests: change info messages from yellow/brown to bold cyan
- tests: paint skipped tests in bold blue
- tests: paint known breakages in bold yellow
- tests: test number comes first in 'not ok $count - $message'
Various minor tweaks to the test framework to paint its output
lines in colors that match what they mean better.
Will merge to 'next'.
* sp/shortlog-missing-lf (2012-12-11) 2 commits
(merged to 'next' on 2012-12-11 at 64b8429)
+ strbuf_add_wrapped*(): Remove unused return value
+ shortlog: fix wrapping lines of wraplen
When a line to be wrapped has a solid run of non space characters
whose length exactly is the wrap width, "git shortlog -w" failed to
add a newline after such a line.
Will cook in 'next'.
* ap/log-mailmap (2012-12-15) 7 commits
- test: Add test for --use-mailmap option
- log: Add --use-mailmap option
- pretty: Use mailmap to display username and email
- mailmap: Add mailmap structure to rev_info and pp
- mailmap: Simplify map_user() interface
- mailmap: Remove buffer length limit in map_user
- Use split_ident_line to parse author and committer
Clean up various codepaths around mailmap and teach the "log"
machinery to use it.
Will merge to 'next' after reading it over once again.
* jc/fetch-ignore-symref (2012-12-11) 1 commit
(merged to 'next' on 2012-12-17 at 370e2c8)
+ fetch: ignore wildcarded refspecs that update local symbolic refs
Avoid false error from an attempt to update local symbolic ref via
fetch.
Will cook in 'next'.
* md/gitweb-sort-by-age (2012-12-11) 1 commit
(merged to 'next' on 2012-12-13 at 9f39410)
+ gitweb: Sort projects with undefined ages last
Gitweb showed repositories without any commit at the top in its
age-sorted view, in which the users are interested in looking at
active projects; sorting them at the bottom makes it more useful.
Will cook in 'next'.
* ss/nedmalloc-compilation (2012-12-11) 1 commit
(merged to 'next' on 2012-12-13 at c1f0d7f)
+ nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2
Will cook in 'next'.
* wk/submodule-update-remote (2012-12-12) 3 commits
- submodule add: If --branch is given, record it in .gitmodules
- submodule update: add --remote for submodule's upstream changes
- submodule: add get_submodule_config helper funtion
Expecting a re-roll.
* jc/maint-fbsd-sh-ifs-workaround (2012-12-10) 1 commit
(merged to 'next' on 2012-12-11 at 6659fdc)
+ sh-setup: work around "unset IFS" bug in some shells
Will cook in 'next'.
* jc/same-encoding (2012-12-10) 1 commit
(merged to 'next' on 2012-12-17 at 86b41c7)
+ format_commit_message(): simplify calls to logmsg_reencode()
Finishing touches to the series to unify "Do we need to reencode
between these two encodings?" logic.
* nd/invalidate-i-t-a-cache-tree (2012-12-15) 4 commits
- cache-tree: invalidate i-t-a paths after generating trees
- cache-tree: fix writing cache-tree when CE_REMOVE is present
- cache-tree: replace "for" loops in update_one with "while" loops
- cache-tree: remove dead i-t-a code in verify_cache()
Writing out a tree object when you still have intent-to-add entries
in the index left an incorrect cache-tree data there.
Will merge to 'next'.
* jl/submodule-deinit (2012-12-04) 1 commit
(merged to 'next' on 2012-12-07 at ea772f0)
+ submodule: add 'deinit' command
There was no Porcelain way to say "I no longer am interested in
this submodule", once you express your interest in a submodule with
"submodule init". "submodule deinit" is the way to do so.
Will cook in 'next'.
* sl/git-svn-docs (2012-12-05) 4 commits
(merged to 'next' on 2012-12-07 at 5bfbb73)
+ git-svn: Note about tags.
+ git-svn: Expand documentation for --follow-parent
+ git-svn: Recommend use of structure options.
+ git-svn: Document branches with at-sign(@).
Will cook in 'next'.
* pf/editor-ignore-sigint (2012-12-02) 5 commits
(merged to 'next' on 2012-12-07 at 6b04419)
+ launch_editor: propagate signals from editor to git
+ run-command: do not warn about child death from terminal
+ launch_editor: ignore terminal signals while editor has control
+ launch_editor: refactor to use start/finish_command
+ run-command: drop silent_exec_failure arg from wait_or_whine
Avoid confusing cases where the user hits Ctrl-C while in the editor
session, not realizing git will receive the signal. Since most editors
will take over the terminal and will block SIGINT, this is not likely
to confuse anyone.
Will cook in 'next'.
* bc/append-signed-off-by (2012-11-26) 11 commits
- Unify appending signoff in format-patch, commit and sequencer
- format-patch: update append_signoff prototype
- format-patch: stricter S-o-b detection
- t4014: more tests about appending s-o-b lines
- sequencer.c: teach append_signoff to avoid adding a duplicate newline
- sequencer.c: teach append_signoff how to detect duplicate s-o-b
- sequencer.c: always separate "(cherry picked from" from commit body
- sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer
- t/t3511: add some tests of 'cherry-pick -s' functionality
- t/test-lib-functions.sh: allow to specify the tag name to test_commit
- sequencer.c: remove broken support for rfc2822 continuation in footer
Expecting a re-roll after a review.
* mh/unify-xml-in-imap-send-and-http-push (2012-12-02) 8 commits
(merged to 'next' on 2012-12-03 at d677090)
+ wrap_in_html(): process message in bulk rather than line-by-line
+ wrap_in_html(): use strbuf_addstr_xml_quoted()
+ imap-send: change msg_data from storing (ptr, len) to storing strbuf
+ imap-send: correctly report errors reading from stdin
+ imap-send: store all_msgs as a strbuf
+ lf_to_crlf(): NUL-terminate msg_data::data
+ xml_entities(): use function strbuf_addstr_xml_quoted()
+ Add new function strbuf_add_xml_quoted()
Update imap-send to reuse xml quoting code from http-push codepath,
clean up some code, and fix a small bug.
Will cook in 'next'.
* jk/fsck-dot-in-trees (2012-11-28) 2 commits
(merged to 'next' on 2012-11-28 at 519dabc)
+ fsck: warn about ".git" in trees
+ fsck: warn about '.' and '..' in trees
Will cook in 'next'.
* mh/pthreads-autoconf (2012-11-27) 1 commit
(merged to 'next' on 2012-11-28 at 780600e)
+ configure.ac: fix pthreads detection on Mac OS X
Will cook in 'next'.
* jn/warn-on-inaccessible-loosen (2012-10-14) 4 commits
(merged to 'next' on 2012-11-28 at 43d51c2)
+ config: exit on error accessing any config file
+ doc: advertise GIT_CONFIG_NOSYSTEM
+ config: treat user and xdg config permission problems as errors
+ config, gitignore: failure to access with ENOTDIR is ok
An RFC to deal with a situation where .config/git is a file and we
notice .config/git/config is not readable due to ENOTDIR, not
ENOENT.
Will cook in 'next'.
* mh/ceiling (2012-10-29) 8 commits
(merged to 'next' on 2012-11-26 at d1ce76a)
+ string_list_longest_prefix(): remove function
+ setup_git_directory_gently_1(): resolve symlinks in ceiling paths
+ longest_ancestor_length(): require prefix list entries to be normalized
+ longest_ancestor_length(): take a string_list argument for prefixes
+ longest_ancestor_length(): use string_list_split()
+ Introduce new function real_path_if_valid()
+ real_path_internal(): add comment explaining use of cwd
+ Introduce new static function real_path_internal()
Elements of GIT_CEILING_DIRECTORIES list may not match the real
pathname we obtain from getcwd(), leading the GIT_DIR discovery
logic to escape the ceilings the user thought to have specified.
Resurrected from Stalled; the earlier performance fear was
unwarranted.
Will cook in 'next'.
* fc/fast-export-fixes (2012-12-03) 15 commits
(merged to 'next' on 2012-12-03 at f9df523)
+ fast-export: make sure updated refs get updated
+ fast-export: don't handle uninteresting refs
+ fast-export: fix comparison in tests
+ fast-export: trivial cleanup
+ remote-testgit: implement the "done" feature manually
+ remote-testgit: report success after an import
+ remote-testgit: exercise more features
+ remote-testgit: cleanup tests
+ remote-testgit: remove irrelevant test
+ remote-testgit: remove non-local functionality
+ Add new simplified git-remote-testgit
+ Rename git-remote-testgit to git-remote-testpy
+ remote-helpers: fix failure message
+ remote-testgit: fix direction of marks
+ fast-export: avoid importing blob marks
Will cook in 'next'.
* jc/apply-trailing-blank-removal (2012-10-12) 1 commit
(merged to 'next' on 2012-11-26 at 3af69e7)
+ apply.c:update_pre_post_images(): the preimage can be truncated
Fix to update_pre_post_images() that did not take into account the
possibility that whitespace fix could shrink the preimage and
change the number of lines in it.
Will cook in 'next'.
* nd/pathspec-wildcard (2012-11-26) 4 commits
(merged to 'next' on 2012-12-03 at eca0fcb)
+ tree_entry_interesting: do basedir compare on wildcard patterns when possible
+ pathspec: apply "*.c" optimization from exclude
+ pathspec: do exact comparison on the leading non-wildcard part
+ pathspec: save the non-wildcard length part
Will cook in 'next'.
* nd/wildmatch (2012-12-15) 15 commits
(merged to 'next' on 2012-12-15 at c734714)
+ t3070: Disable some failing fnmatch tests
(merged to 'next' on 2012-11-21 at 151288f)
+ test-wildmatch: avoid Windows path mangling
(merged to 'next' on 2012-10-25 at 510e8df)
+ Support "**" wildcard in .gitignore and .gitattributes
+ wildmatch: make /**/ match zero or more directories
+ wildmatch: adjust "**" behavior
+ wildmatch: fix case-insensitive matching
+ wildmatch: remove static variable force_lower_case
+ wildmatch: make wildmatch's return value compatible with fnmatch
+ t3070: disable unreliable fnmatch tests
+ Integrate wildmatch to git
+ wildmatch: follow Git's coding convention
+ wildmatch: remove unnecessary functions
+ Import wildmatch from rsync
+ ctype: support iscntrl, ispunct, isxdigit and isprint
+ ctype: make sane_ctype[] const array
Allows pathname patterns in .gitignore and .gitattributes files
with double-asterisks "foo/**/bar" to match any number of directory
hierarchies.
I suspect that this needs to be plugged to pathspec matching code;
otherwise "git log -- 'Docum*/**/*.txt'" would not show the log for
commits that touch Documentation/git.txt, which would be confusing
to the users.
Will cook in 'next'.
* cr/push-force-tag-update (2012-12-03) 10 commits
(merged to 'next' on 2012-12-04 at af2e3a9)
+ push: allow already-exists advice to be disabled
+ push: rename config variable for more general use
+ push: cleanup push rules comment
+ push: clarify rejection of update to non-commit-ish
+ push: require force for annotated tags
+ push: require force for refs under refs/tags/
+ push: flag updates that require force
+ push: keep track of "update" state separately
+ push: add advice for rejected tag reference
+ push: return reject reasons as a bitset
Require "-f" for push to update a tag, even if it is a fast-forward.
Will cook in 'next'.
^ permalink raw reply
* Re: Q: do people compile with NO_FNMATCH on OpenBSD 5.2?
From: Greg Troxel @ 2012-12-18 20:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7va9tbf7vd.fsf@alter.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
Junio C Hamano <gitster@pobox.com> writes:
> I seem to get a failure from
>
> git ls-files "a*"
>
> in t/t0000-basic.sh if I link with platform's fnmatch().
Not what you asked, but on NetBSD 5.1, libc fnmatch is used, and with
git 1.8.0.1 that test passes.
This prompted me to look at the rest of the tests. All tests pass
(except for expected failures) until:
*** t0070-fundamental.sh ***
ok 1 - character classes (isspace, isalpha etc.)
not ok - 2 mktemp to nonexistent directory prints filename
#
# test_must_fail test-mktemp doesnotexist/testXXXXXX 2>err &&
# grep "doesnotexist/test" err
#
ok 3 - mktemp to unwritable directory prints filename
ok 4 - check for a bug in the regex routines
# failed 1 among 4 test(s)
1..4
Running this by hand, I get:
gdt 51 /usr/pkgsrc/devel/scmgit-base/work/git-1.8.0.1/t > ../test-mktemp foo/barXXXXXX > MKTEMP.stdout 2> MKTEMP.stderr; ls -l MKTEMP*
-rw-r--r-- 1 gdt wheel 121 Dec 18 15:14 MKTEMP.stderr
-rw-r--r-- 1 gdt wheel 0 Dec 18 15:14 MKTEMP.stdout
gdt 52 /usr/pkgsrc/devel/scmgit-base/work/git-1.8.0.1/t > cat MKTEMP.stderr
fatal: Unable to create temporary file '/usr/pkgsrc/devel/scmgit-base/work/git-1.8.0.1/t/foo': No such file or directory
It seems ENOENT is correct for the directory not existing. I think the
test is complaining that the failed call to mkstemp modified the
argument.
Looking at:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkstemp.html
I can't see that it requires anything in particular for the in/out
paramater when there is an error.
[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply
* Re: [PATCH v3] git-completion.bash: add support for path completion
From: Manlio Perillo @ 2012-12-18 20:29 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, SZEDER Gábor, Felipe Contreras
In-Reply-To: <7vpq27f9m7.fsf@alter.siamese.dyndns.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 18/12/2012 20:22, Junio C Hamano ha scritto:
> [...]
>> Note that the performance is the reason why I suggested, in a previous
>> email, that git should have some more options to format data in custom ways.
>> As an example, there is no way to tell ls-files to not recurse
>> directories, and there is no way to also get the file type.
>
> To ls-files, no-recurse is an idiotic thing to ask. The index is a
> flat structure that is read as a whole. There is no recursion
> involved.
What about an option like --as-tree, so that ls-files will list the
files as they were in a tree, instead of a flat structure ?
Thanks Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDQ0j4ACgkQscQJ24LbaURXoACffQ4iz6MsoeffEZEBib1b1KF8
NZsAoIUXa7OonWyFxfJ35mukBK/sddGr
=0nO7
-----END PGP SIGNATURE-----
^ permalink raw reply
* Q: do people compile with NO_FNMATCH on OpenBSD 5.2?
From: Junio C Hamano @ 2012-12-18 20:00 UTC (permalink / raw)
To: git
I seem to get a failure from
git ls-files "a*"
in t/t0000-basic.sh if I link with platform's fnmatch().
^ permalink raw reply
* Re: sys/param.h
From: Torsten Bögershausen @ 2012-12-18 19:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vobhrgupr.fsf_-_@alter.siamese.dyndns.org>
On 18.12.12 18:01, Junio C Hamano wrote:
> Johannes Sixt <j.sixt@viscovery.net> writes:
>
>>> Junio C Hamano wrote:
>>>> It could turn out that we may be able to get rid of sys/param.h
>>>> altogether, but one step at a time. Inputs from people on minority
>>>> platforms are very much appreciated---does your platform build fine
>>>> when the inclusion of the file is removed from git-compat-util.h?
>>
>> MinGW works fine with sys/param.h removed from git-compat-util.h.
>
> It seems that OpenBSD 5.2 does not mind it getting removed, either.
> Debian 5 and Debian 6 seem OK; so do Ubuntu 10.04 and 12.04. I have
> a hunch that Fedora or anything based on glibc would be fine, too.
>
> What other platforms do we care deeply about?
Mac OS X 10.6.8: OK
^ permalink raw reply
* Re: Incorrect man page for git-diff
From: Junio C Hamano @ 2012-12-18 19:32 UTC (permalink / raw)
To: Manlio Perillo; +Cc: git
In-Reply-To: <50D0BF8D.5050004@gmail.com>
Manlio Perillo <manlio.perillo@gmail.com> writes:
> I'm not sure the man page is wrong and should be changed:
>
> -- usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
> ++ usage: git diff [<options>] [<commit> [<commit>]]
Comparison of two blob objects works entirely in different way (it
is not even recursively comparing two tree-shaped things).
I do not think this mode is common enough to deserve to be in the
short help text, but it should be in the documentation, perhaps like
this patch, I think.
Documentation/git-diff.txt | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git c/Documentation/git-diff.txt w/Documentation/git-diff.txt
index f8d0819..f8c0601 100644
--- c/Documentation/git-diff.txt
+++ w/Documentation/git-diff.txt
@@ -12,6 +12,7 @@ SYNOPSIS
'git diff' [options] [<commit>] [--] [<path>...]
'git diff' [options] --cached [<commit>] [--] [<path>...]
'git diff' [options] <commit> <commit> [--] [<path>...]
+'git diff' [options] <blob> <blob>
'git diff' [options] [--no-index] [--] <path> <path>
DESCRIPTION
@@ -55,6 +56,11 @@ directories. This behavior can be forced by --no-index.
This is to view the changes between two arbitrary
<commit>.
+'git diff' [options] <blob> <blob>::
+
+ This form is to view the differences between the raw
+ contents of two blob objects.
+
'git diff' [--options] <commit>..<commit> [--] [<path>...]::
This is synonymous to the previous form. If <commit> on
@@ -72,8 +78,7 @@ directories. This behavior can be forced by --no-index.
Just in case if you are doing something exotic, it should be
noted that all of the <commit> in the above description, except
in the last two forms that use ".." notations, can be any
-<tree>. The third form ('git diff <commit> <commit>') can also
-be used to compare two <blob> objects.
+<tree>.
For a more complete list of ways to spell <commit>, see
"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
^ permalink raw reply related
* t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
From: Junio C Hamano @ 2012-12-18 19:25 UTC (permalink / raw)
To: git
These tests themselves are properly protected by the GPG
prerequisite, but one of the set-up steps outside the
test_expect_success block unconditionally assumed that there is a
gpghome/ directory, which is not true if GPG is not being used.
It may be a good idea to move the whole set-up steps in the test but
that is a follow-up topic.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t7004-tag.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git i/t/t7004-tag.sh w/t/t7004-tag.sh
index 5189446..f5a79b1 100755
--- i/t/t7004-tag.sh
+++ w/t/t7004-tag.sh
@@ -1066,12 +1066,12 @@ test_expect_success GPG \
'
# usage with rfc1991 signatures
-echo "rfc1991" > gpghome/gpg.conf
get_tag_header rfc1991-signed-tag $commit commit $time >expect
echo "RFC1991 signed tag" >>expect
echo '-----BEGIN PGP MESSAGE-----' >>expect
test_expect_success GPG \
'creating a signed tag with rfc1991' '
+ echo "rfc1991" >gpghome/gpg.conf &&
git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
get_tag_msg rfc1991-signed-tag >actual &&
test_cmp expect actual
@@ -1085,6 +1085,7 @@ chmod +x fakeeditor
test_expect_success GPG \
'reediting a signed tag body omits signature' '
+ echo "rfc1991" >gpghome/gpg.conf &&
echo "RFC1991 signed tag" >expect &&
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
test_cmp expect actual
@@ -1092,11 +1093,13 @@ test_expect_success GPG \
test_expect_success GPG \
'verifying rfc1991 signature' '
+ echo "rfc1991" >gpghome/gpg.conf &&
git tag -v rfc1991-signed-tag
'
test_expect_success GPG \
'list tag with rfc1991 signature' '
+ echo "rfc1991" >gpghome/gpg.conf &&
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
git tag -l -n1 rfc1991-signed-tag >actual &&
test_cmp expect actual &&
^ permalink raw reply related
* Re: [PATCH v3] git-completion.bash: add support for path completion
From: Junio C Hamano @ 2012-12-18 19:22 UTC (permalink / raw)
To: Manlio Perillo; +Cc: git, SZEDER Gábor, Felipe Contreras
In-Reply-To: <50D0BC32.2020401@gmail.com>
Manlio Perillo <manlio.perillo@gmail.com> writes:
> Il 18/12/2012 18:53, Junio C Hamano ha scritto:
>> [jch: cc'ed git-completion experts to review implementation details]
>>
>> Manlio Perillo <manlio.perillo@gmail.com> writes:
>>
>>> The git-completion.bash script did not implemented full, git aware,
>>> support for completion, for git commands that operate on files within
>>> the current working directory or the index.
>>>
>>> For these commands, only long options completion was available.
>>
>> I find the "long options completion" is a misleading phrase. It
>> sounds as if you changed the current completion that does not
>> complete "git commit -<TAB>" but does "git commit --<TAB>" to
>> complete the short options (e.g. "git commit -c"), but I do not
>> think that is the topic of this patch.
>>
>
> It does not sound misleading to me.
> I'm saying that the git-completion.bash script only implemented
> completion for long options, but not for file names in the current
> working directory.
>
> Do you think I should rewrite the subject and the log message introduction?
The subject sounds fine; it is just "It only does long options"
sounded as if it were viewing the lack of "short options" support as
an issue. In other words, my knee-jerk answer to "long options, as
opposed to what???" question was "short options", not "files".
If the phrase were "It only does options", the question would become
"options as opposed to what???", which may have given me a chance to
guess "files" as the answer to that question.
> As an example, something like this in the subject:
>
> git-completion.bash: improve some git commands completion
I think the original is better; you do not touch any "options",
either long or short. You are improving "paths", and the original
is much clearer on that point.
>
> and in the message:
>
> The git-completion.bash script did not implemented full, git aware,
> support for completion, for git commands that operate on files within
With s/for completion/to complete paths/, it would be perfect. You
do not touch options, and this new log message does not talk about
it. Much nicer than the one that was posted.
> Note that the performance is the reason why I suggested, in a previous
> email, that git should have some more options to format data in custom ways.
> As an example, there is no way to tell ls-files to not recurse
> directories, and there is no way to also get the file type.
To ls-files, no-recurse is an idiotic thing to ask. The index is a
flat structure that is read as a whole. There is no recursion
involved.
^ permalink raw reply
* Re: Incorrect man page for git-diff
From: Manlio Perillo @ 2012-12-18 19:10 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vwqwffcxp.fsf@alter.siamese.dyndns.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 18/12/2012 19:11, Junio C Hamano ha scritto:
> Manlio Perillo <manlio.perillo@gmail.com> writes:
>
>> Documentation seems to suggest this is supported, but it is not true:
>>
>> $ git diff HEAD:git.c HEAD~100:git.c -- git.c
>> usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
>>
>> unless I'm missing something.
>
> Neither HEAD:git.c nor HEAD~100:git.c are commits.
Well, the documentation calls these parameter "commit", later saying
"For a more complete list of ways to spell <commit>, see "SPECIFYING
REVISIONS".
> You are
> comparing two blob objects in their raw forms without textconv nor
> filter.
>
Note that I was not missing the fact that git diff does not apply
texconv and filters.
I'm not sure the man page is wrong and should be changed:
-- usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
++ usage: git diff [<options>] [<commit> [<commit>]]
Regards Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDQv40ACgkQscQJ24LbaUT+vwCgj0rjaZbc+/x0+jvAGZydbVKB
244An2pWLj7t4nG3lZzx+LGyH3mjTujS
=TmVI
-----END PGP SIGNATURE-----
^ permalink raw reply
* [PATCH v5 2/3] Makefile: detect when PYTHON_PATH changes
From: Christian Couder @ 2012-12-18 19:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
When make is run, the python scripts are created from *.py files that
are changed to use the python given by PYTHON_PATH. And PYTHON_PATH
is set by default to /usr/bin/python on Linux.
This is nice except when you run make another time setting a
different PYTHON_PATH, because, as the python scripts have already
been created, make finds nothing to do.
The goal of this patch is to detect when the PYTHON_PATH changes and
to create the python scripts again when this happens. To do that we
use the same trick that is done to track other variables like prefix,
flags, tcl/tk path and shell path. We update a GIT-PYTHON-VARS file
with the PYTHON_PATH and check if it changed.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
.gitignore | 1 +
Makefile | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 64a454b..56a4b2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
/GIT-CFLAGS
/GIT-LDFLAGS
/GIT-PREFIX
+/GIT-PYTHON-VARS
/GIT-SCRIPT-DEFINES
/GIT-USER-AGENT
/GIT-VERSION-FILE
diff --git a/Makefile b/Makefile
index 585b2eb..7db8445 100644
--- a/Makefile
+++ b/Makefile
@@ -2245,7 +2245,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
endif # NO_PERL
ifndef NO_PYTHON
-$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX
+$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
$(QUIET_GEN)$(RM) $@ $@+ && \
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \
@@ -2624,6 +2624,18 @@ ifdef GIT_PERF_MAKE_OPTS
@echo GIT_PERF_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_MAKE_OPTS)))'\' >>$@
endif
+### Detect Python interpreter path changes
+ifndef NO_PYTHON
+TRACK_PYTHON = $(subst ','\'',-DPYTHON_PATH='$(PYTHON_PATH_SQ)')
+
+GIT-PYTHON-VARS: FORCE
+ @VARS='$(TRACK_PYTHON)'; \
+ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
+ echo 1>&2 " * new Python interpreter location"; \
+ echo "$$VARS" >$@; \
+ fi
+endif
+
test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
all:: $(TEST_PROGRAMS) $(test_bindir_programs)
@@ -2899,7 +2911,7 @@ ifndef NO_TCLTK
$(MAKE) -C git-gui clean
endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
- $(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES
+ $(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES GIT-PYTHON-VARS
.PHONY: all install profile-clean clean strip
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
--
1.8.1.rc1.2.g8740035
^ permalink raw reply related
* [PATCH v5 3/3] Makefile: replace "echo 1>..." with "echo >..."
From: Christian Couder @ 2012-12-18 19:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
This is clearer to many people this way.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 7db8445..e055c9a 100644
--- a/Makefile
+++ b/Makefile
@@ -2183,7 +2183,7 @@ endef
GIT-SCRIPT-DEFINES: FORCE
@FLAGS='$(SCRIPT_DEFINES)'; \
if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
- echo 1>&2 " * new script parameters"; \
+ echo >&2 " * new script parameters"; \
echo "$$FLAGS" >$@; \
fi
@@ -2564,7 +2564,7 @@ TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\
GIT-PREFIX: FORCE
@FLAGS='$(TRACK_PREFIX)'; \
if test x"$$FLAGS" != x"`cat GIT-PREFIX 2>/dev/null`" ; then \
- echo 1>&2 " * new prefix flags"; \
+ echo >&2 " * new prefix flags"; \
echo "$$FLAGS" >GIT-PREFIX; \
fi
@@ -2573,7 +2573,7 @@ TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):$(USE_GETTEXT_SCHEME)
GIT-CFLAGS: FORCE
@FLAGS='$(TRACK_CFLAGS)'; \
if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \
- echo 1>&2 " * new build flags"; \
+ echo >&2 " * new build flags"; \
echo "$$FLAGS" >GIT-CFLAGS; \
fi
@@ -2582,7 +2582,7 @@ TRACK_LDFLAGS = $(subst ','\'',$(ALL_LDFLAGS))
GIT-LDFLAGS: FORCE
@FLAGS='$(TRACK_LDFLAGS)'; \
if test x"$$FLAGS" != x"`cat GIT-LDFLAGS 2>/dev/null`" ; then \
- echo 1>&2 " * new link flags"; \
+ echo >&2 " * new link flags"; \
echo "$$FLAGS" >GIT-LDFLAGS; \
fi
@@ -2631,7 +2631,7 @@ TRACK_PYTHON = $(subst ','\'',-DPYTHON_PATH='$(PYTHON_PATH_SQ)')
GIT-PYTHON-VARS: FORCE
@VARS='$(TRACK_PYTHON)'; \
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
- echo 1>&2 " * new Python interpreter location"; \
+ echo >&2 " * new Python interpreter location"; \
echo "$$VARS" >$@; \
fi
endif
--
1.8.1.rc1.2.g8740035
^ permalink raw reply related
* [PATCH v5 1/3] Makefile: remove tracking of TCLTK_PATH
From: Christian Couder @ 2012-12-18 19:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
It looks like we are tracking the value of TCLTK_PATH in the main
Makefile for no good reason.
This patch removes the useless code used to do this tracking.
Maybe this code should have been moved to gitk-git/Makefile by
62ba514 (Move gitk to its own subdirectory, 2007-11-17).
A patch to do that has just been sent to Paul Mackerras, the gitk
maintainer.
While at it, this patch removes /gitk-git/gitk-wish from
.gitignore as it should be in /gitk-git/.gitignore and the patch
sent to Paul put it there.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
.gitignore | 2 --
Makefile | 14 +-------------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/.gitignore b/.gitignore
index f702415..64a454b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
/GIT-BUILD-OPTIONS
/GIT-CFLAGS
/GIT-LDFLAGS
-/GIT-GUI-VARS
/GIT-PREFIX
/GIT-SCRIPT-DEFINES
/GIT-USER-AGENT
@@ -171,7 +170,6 @@
/git-whatchanged
/git-write-tree
/git-core-*/?*
-/gitk-git/gitk-wish
/gitweb/GITWEB-BUILD-OPTIONS
/gitweb/gitweb.cgi
/gitweb/static/gitweb.js
diff --git a/Makefile b/Makefile
index 4ad6fbd..585b2eb 100644
--- a/Makefile
+++ b/Makefile
@@ -2624,18 +2624,6 @@ ifdef GIT_PERF_MAKE_OPTS
@echo GIT_PERF_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_MAKE_OPTS)))'\' >>$@
endif
-### Detect Tck/Tk interpreter path changes
-ifndef NO_TCLTK
-TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
-
-GIT-GUI-VARS: FORCE
- @VARS='$(TRACK_VARS)'; \
- if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
- echo 1>&2 " * new Tcl/Tk interpreter location"; \
- echo "$$VARS" >$@; \
- fi
-endif
-
test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
all:: $(TEST_PROGRAMS) $(test_bindir_programs)
@@ -2910,7 +2898,7 @@ ifndef NO_TCLTK
$(MAKE) -C gitk-git clean
$(MAKE) -C git-gui clean
endif
- $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
+ $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
$(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES
.PHONY: all install profile-clean clean strip
--
1.8.1.rc1.2.g8740035
^ permalink raw reply related
* Re: [PATCH v3] git-completion.bash: add support for path completion
From: Manlio Perillo @ 2012-12-18 18:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, SZEDER Gábor, Felipe Contreras
In-Reply-To: <7v1uengsbm.fsf@alter.siamese.dyndns.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 18/12/2012 18:53, Junio C Hamano ha scritto:
> [jch: cc'ed git-completion experts to review implementation details]
>
> Manlio Perillo <manlio.perillo@gmail.com> writes:
>
>> The git-completion.bash script did not implemented full, git aware,
>> support for completion, for git commands that operate on files within
>> the current working directory or the index.
>>
>> For these commands, only long options completion was available.
>
> I find the "long options completion" is a misleading phrase. It
> sounds as if you changed the current completion that does not
> complete "git commit -<TAB>" but does "git commit --<TAB>" to
> complete the short options (e.g. "git commit -c"), but I do not
> think that is the topic of this patch.
>
It does not sound misleading to me.
I'm saying that the git-completion.bash script only implemented
completion for long options, but not for file names in the current
working directory.
Do you think I should rewrite the subject and the log message introduction?
As an example, something like this in the subject:
git-completion.bash: improve some git commands completion
and in the message:
The git-completion.bash script did not implemented full, git aware,
support for completion, for git commands that operate on files within
the current working directory or the index.
As an example:
...
I'm still not fully satisfied with it, however.
It still requires reading the full message to understand the changes
implemented.
>> As an example:
>>
>> git add <TAB>
>>
>> will suggest all files in the current working directory, including
>> ignored files and files that have not been modified.
>>
>> Full support for completion is now implemented, for git commands where
>
> s/Full.*implemented/Support more comprehensive completion/; or
> something, talking in the imperative mood (i.e. as if you are giving
> the order to the codebase to do something).
>
Ok.
>> the non-option arguments always refer to paths within the current
>> working directory or the index, as the follow:
>>
>> * the path completion for the "git mv", "git rm" and "git ls-tree"
>> commands will suggest all cached files.
>
> I thought you dropped "git mv" in this round.
>
Well, no.
But the current implementation should not cause problems.
Also note that I added support for ls-files, too.
There are some XXX marks in the code, but I think that the changes
always improve the old behaviour.
> [...]
>> For all affected commands, completion will always stop at directory
>> boundary. Only standard ignored files are excluded, using the
>> --exclude-standard option of the ls-files command.
>
> I read "always stop at directory boundary" to mean that
>
> git cmd t<TAB>
>
> will give us "t/ tag.c" (assuming there is a new or modified file in
> t/ and tag.c is the only modified file at the root level that begins
> with "t") and then
>
> git cmd t/<TAB>
>
> will likewise show the files and top-level subdirectories within t/
> directory. That would be great.
>
Yes, this is how it works, bugs excluded (I'm not a bash/perl expert).
> [...]
>> +# Perl filter used to process path list returned by ls-files and
>> +# diff-index --name-only commands, in order to list file names
>> +# relative to a specified directory, and append a slash to directory
>> +# names.
>> +# The script expects the prefix path in the "pfx" environ variable.
>> +# The output must be processed with the uniq filter, to remove
>> +# duplicate directories.
>> +# XXX remove duplicates in the Perl script ?
>
> Surely, that will remove one fork/exec with pipeline. I am not sure
> what the performance implication of using Perl here, but because we
> do not have to stick to POSIX shell in this file, the completion
> experts would be able to help rewriting this logic as a pure bash
> script.
>
Ok. I'll wait for a review from git-completion experts.
Note that the performance is the reason why I suggested, in a previous
email, that git should have some more options to format data in custom ways.
As an example, there is no way to tell ls-files to not recurse
directories, and there is no way to also get the file type.
A --no-recurse option, and a change in the code to make, as an example
git ls-files --stage --modified
to honor the --modified option, will probably make it possible to use a
simple sed filter (there is still the problem that, unlike ls-tree,
ls-files shows the complete file path).
> [...]
>> +__git_files ()
>> +{
>> + local dir="$(__gitdir)" flags="-${1}"
>> +
>> + if [ -d "$dir" ]; then
>> + git --git-dir="$dir" ls-files --exclude-standard ${flags} ${pfx} \
>> + | pfx=$2 perl -ne "${__git_index_file_list_filter}" \
>> + | uniq
>
> This is purely a style thing (note that style suggestions are not
> optional), but
>
> the data source command |
> a filter command |
> another filter command
>
> is easier to read and can be spelled without the backslash. The
> same comment applies to git-commit-files as well.
>
I agree.
But I was copying the style currently used in the script
(see the __git_complete_revlist_file function).
Note that I plan to do a small code refactorization, since I need the
ls-tree support code from __git_complete_revlist_file function for a
future change. I can fix these style issues in that patch.
I plan to improve completion support for checkout and reset commands,
too (currently only the commit/tree-ish argument is autocompleted, but
not the path).
Regards Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDQvDIACgkQscQJ24LbaUTT9wCgh6jtbhdQ7GNIkqCq34QjXdIs
w9QAnjz2VjPFm4n2ICkcWWEsqWDWM+Hm
=8/Ad
-----END PGP SIGNATURE-----
^ permalink raw reply
* [PATCH] Makefile: replace "echo 1>..." with "echo >..."
From: Christian Couder @ 2012-12-18 18:47 UTC (permalink / raw)
To: Pat Thoyts; +Cc: Junio C Hamano, git
This is clearer to many people this way.
A similar patch has been sent to the git mailing list
for git.git.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
Hi Pat,
Here is a patch to apply to your git-gui tree following this
discussion:
http://thread.gmane.org/gmane.comp.version-control.git/211532/
Thanks,
Christian.
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index e22ba5c..e9c2bc3 100644
--- a/Makefile
+++ b/Makefile
@@ -254,7 +254,7 @@ lib/tclIndex: $(ALL_LIBFILES) GIT-GUI-VARS
auto_mkindex lib '*.tcl' \
| $(TCL_PATH) $(QUIET_2DEVNULL); then : ok; \
else \
- echo 1>&2 " * $(TCL_PATH) failed; using unoptimized loading"; \
+ echo >&2 " * $(TCL_PATH) failed; using unoptimized loading"; \
rm -f $@ ; \
echo '# Autogenerated by git-gui Makefile' >$@ && \
echo >>$@ && \
@@ -274,8 +274,8 @@ TRACK_VARS = \
GIT-GUI-VARS: FORCE
@VARS='$(TRACK_VARS)'; \
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
- echo 1>&2 " * new locations or Tcl/Tk interpreter"; \
- echo 1>$@ "$$VARS"; \
+ echo >&2 " * new locations or Tcl/Tk interpreter"; \
+ echo >$@ "$$VARS"; \
fi
ifdef GITGUI_MACOSXAPP
--
1.8.1.rc1.2.g8740035
^ permalink raw reply related
* Re: [PATCH] Makefile: track TCLTK_PATH as it used to be tracked
From: Christian Couder @ 2012-12-18 18:23 UTC (permalink / raw)
To: gitster; +Cc: paulus, git
In-Reply-To: <7vk3sfguh2.fsf@alter.siamese.dyndns.org>
From: Junio C Hamano <gitster@pobox.com>
> Christian Couder <chriscool@tuxfamily.org> writes:
>
>> ...
>> +GIT-TCLTK-VARS: FORCE
>> + @VARS='$(TRACK_TCLTK)'; \
>> + if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
>> + echo 1>&2 " * new Tcl/Tk interpreter location"; \
>
> I think in a related patch to the top-level Makefile changes it to
> lose "1" to read it as "echo >&2" here.
Yeah, I forgot to remove the 1 here.
Thanks,
Christian.
^ permalink raw reply
* Re: Incorrect man page for git-diff
From: Junio C Hamano @ 2012-12-18 18:11 UTC (permalink / raw)
To: Manlio Perillo; +Cc: git
In-Reply-To: <50D0AA78.5090603@gmail.com>
Manlio Perillo <manlio.perillo@gmail.com> writes:
> Documentation seems to suggest this is supported, but it is not true:
>
> $ git diff HEAD:git.c HEAD~100:git.c -- git.c
> usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
>
> unless I'm missing something.
Neither HEAD:git.c nor HEAD~100:git.c are commits. You are
comparing two blob objects in their raw forms without textconv nor
filter.
^ permalink raw reply
* Re: Re: [PATCH] completion: add option --recurse-submodules to "git push"
From: Heiko Voigt @ 2012-12-18 17:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Steffen Jaeckel, git, Felipe Contreras, Jens Lehmann
In-Reply-To: <7vehj1ixr6.fsf@alter.siamese.dyndns.org>
Hi,
sorry for the late reply.
On Fri, Dec 07, 2012 at 09:21:33AM -0800, Junio C Hamano wrote:
> Steffen Jaeckel <steffen.jaeckel@stzedn.de> writes:
>
> > Signed-off-by: Steffen Jaeckel <steffen.jaeckel@stzedn.de>
> > ---
> > contrib/completion/git-completion.bash | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> > index 0b77eb1..5b4d2e1 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1434,6 +1434,10 @@ _git_pull ()
> > __git_complete_remote_or_refspec
> > }
> >
> > +__git_push_recurse_submodules_options="
> > + check on-demand
> > +"
>
> Most of the existing completion functions do not seem to define
> separate variables like this; instead, they literally embed their
> choices at the point of use.
>
> Is it expected that the same set of choices will appear in the
> completion of many other subcommand options? [jc: Cc'ed Heiko so
> that we can sanity check the answer to this question]. If so, the
> variable may be justified; otherwise, not.
No I think not. At least not exactly the same. check will be limited to
push since it only makes sense there. on-demand on the other hand is
already used for fetch and pull. Currently no more possible uses come to
my mind. checkout and others will learn to traverse submodules but that will
most likely be a boolean (to switch it on and off).
CC'ed Jens so he can also take a look.
Cheers Heiko
^ permalink raw reply
* Re: [PATCH v3] git-completion.bash: add support for path completion
From: Junio C Hamano @ 2012-12-18 17:53 UTC (permalink / raw)
To: Manlio Perillo; +Cc: git, SZEDER Gábor, Felipe Contreras
In-Reply-To: <1355851510-13438-1-git-send-email-manlio.perillo@gmail.com>
[jch: cc'ed git-completion experts to review implementation details]
Manlio Perillo <manlio.perillo@gmail.com> writes:
> The git-completion.bash script did not implemented full, git aware,
> support for completion, for git commands that operate on files within
> the current working directory or the index.
>
> For these commands, only long options completion was available.
I find the "long options completion" is a misleading phrase. It
sounds as if you changed the current completion that does not
complete "git commit -<TAB>" but does "git commit --<TAB>" to
complete the short options (e.g. "git commit -c"), but I do not
think that is the topic of this patch.
> As an example:
>
> git add <TAB>
>
> will suggest all files in the current working directory, including
> ignored files and files that have not been modified.
>
> Full support for completion is now implemented, for git commands where
s/Full.*implemented/Support more comprehensive completion/; or
something, talking in the imperative mood (i.e. as if you are giving
the order to the codebase to do something).
> the non-option arguments always refer to paths within the current
> working directory or the index, as the follow:
>
> * the path completion for the "git mv", "git rm" and "git ls-tree"
> commands will suggest all cached files.
I thought you dropped "git mv" in this round.
> * the path completion for the "git add" command will suggest all
> untracked and modified files. Ignored files are excluded.
>
> * the path completion for the "git clean" command will suggest all
> untracked files. Ignored files are excluded.
>
> * the path completion for the "git commit" command will suggest all
> files that have been modified from the HEAD.
>
> For all affected commands, completion will always stop at directory
> boundary. Only standard ignored files are excluded, using the
> --exclude-standard option of the ls-files command.
I read "always stop at directory boundary" to mean that
git cmd t<TAB>
will give us "t/ tag.c" (assuming there is a new or modified file in
t/ and tag.c is the only modified file at the root level that begins
with "t") and then
git cmd t/<TAB>
will likewise show the files and top-level subdirectories within t/
directory. That would be great.
> Signed-off-by: Manlio Perillo <manlio.perillo@gmail.com>
> ---
> contrib/completion/git-completion.bash | 112 ++++++++++++++++++++++++++++-----
> 1 file changed, 97 insertions(+), 15 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 0b77eb1..923ef37 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -13,6 +13,7 @@
> # *) .git/remotes file names
> # *) git 'subcommands'
> # *) tree paths within 'ref:path/to/file' expressions
> +# *) file paths within current working directory and index
> # *) common --long-options
> #
> # To use these routines:
> @@ -233,6 +234,59 @@ __gitcomp_nl ()
> COMPREPLY=($(compgen -P "${2-}" -S "${4- }" -W "$1" -- "${3-$cur}"))
> }
>
> +# Perl filter used to process path list returned by ls-files and
> +# diff-index --name-only commands, in order to list file names
> +# relative to a specified directory, and append a slash to directory
> +# names.
> +# The script expects the prefix path in the "pfx" environ variable.
> +# The output must be processed with the uniq filter, to remove
> +# duplicate directories.
> +# XXX remove duplicates in the Perl script ?
Surely, that will remove one fork/exec with pipeline. I am not sure
what the performance implication of using Perl here, but because we
do not have to stick to POSIX shell in this file, the completion
experts would be able to help rewriting this logic as a pure bash
script.
> +__git_index_file_list_filter='$pfx = $ENV{"pfx"};
> + $idx = index($_, $pfx);
> + if ($idx == 0) {
> + $_ = substr $_, length($pfx);
> + @segments = split("/", $_);
> + if ($segments[1]) {
> + print $segments[0], "/\n"
> + } else {
> + print $segments[0], "\n"
> + }
> + }'
> +
> +# __git_files accepts 1 or 2 arguments:
> +# 1: A string for file index status mode ("c", "m", "d", "o"), as
> +# supported by git ls-files command. This is required.
> +# 2: An optional directory path. If provided, only files within the
> +# specified directory are listed. Sub directories are never recursed.
> +# Path must have a trailing slash.
> +__git_files ()
> +{
> + local dir="$(__gitdir)" flags="-${1}"
> +
> + if [ -d "$dir" ]; then
> + git --git-dir="$dir" ls-files --exclude-standard ${flags} ${pfx} \
> + | pfx=$2 perl -ne "${__git_index_file_list_filter}" \
> + | uniq
This is purely a style thing (note that style suggestions are not
optional), but
the data source command |
a filter command |
another filter command
is easier to read and can be spelled without the backslash. The
same comment applies to git-commit-files as well.
Thanks.
^ permalink raw reply
* Incorrect man page for git-diff
From: Manlio Perillo @ 2012-12-18 17:40 UTC (permalink / raw)
To: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
Documentation seems to suggest this is supported, but it is not true:
$ git diff HEAD:git.c HEAD~100:git.c -- git.c
usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
unless I'm missing something.
Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDQqncACgkQscQJ24LbaUT9XwCfV40P7lGulSWw+dzVo17EhcDQ
YFoAnRb46025qYsKWp9mg6ZTRyuuaG3x
=0gO1
-----END PGP SIGNATURE-----
^ permalink raw reply
* [RFH/PATCH] git-compat-util.h: do not #include <sys/param.h> by default
From: Junio C Hamano @ 2012-12-18 17:35 UTC (permalink / raw)
To: git
In-Reply-To: <7vobhrgupr.fsf_-_@alter.siamese.dyndns.org>
Earlier we allowed platforms that lack <sys/param.h> not to include
the header file from git-compat-util.h; we have included this header
file since the early days back when we used MAXPATHLEN (which we no
longer use) and also depended on it slurping ULONG_MAX (which we get
by including stdint.h or inttypes.h these days).
It turns out that we can compile our modern codebase just file
without including it on many platforms (so far, Debian, Ubuntu,
MinGW, HP-Nonstop, QNX and z/OS are reported to be OK).
Let's stop including it by default, and on platforms that need it to
be included, leave "make NEEDS_SYS_PARAM_H=YesPlease" as an escape
hatch and ask them to report to us, so that we can find out about
the real dependency and fix it in a more platform agnostic way.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* I'd propose queuing this on top of dm/port topic, cook it in
'next' for a while and then unleash it to the public.
Makefile | 8 +++++---
configure.ac | 6 ------
git-compat-util.h | 2 +-
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 5cd1de0..2c1f04f 100644
--- a/Makefile
+++ b/Makefile
@@ -167,7 +167,9 @@ all::
# Define NO_POLL if you do not have or don't want to use poll().
# This also implies NO_SYS_POLL_H.
#
-# Define NO_SYS_PARAM_H if you don't have sys/param.h.
+# Define NEEDS_SYS_PARAM_H if you need to include sys/param.h to compile,
+# *PLEASE* REPORT to git@vger.kernel.org if your platform needs this;
+# we want to know more about the issue.
#
# Define NO_PTHREADS if you do not have or do not want to use Pthreads.
#
@@ -1747,8 +1749,8 @@ endif
ifdef NO_SYS_POLL_H
BASIC_CFLAGS += -DNO_SYS_POLL_H
endif
-ifdef NO_SYS_PARAM_H
- BASIC_CFLAGS += -DNO_SYS_PARAM_H
+ifdef NEEDS_SYS_PARAM_H
+ BASIC_CFLAGS += -DNEEDS_SYS_PARAM_H
endif
ifdef NO_INTTYPES_H
BASIC_CFLAGS += -DNO_INTTYPES_H
diff --git a/configure.ac b/configure.ac
index e3ab6fe..8fbb533 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,12 +699,6 @@ AC_CHECK_HEADER([sys/poll.h],
[NO_SYS_POLL_H=UnfortunatelyYes])
GIT_CONF_SUBST([NO_SYS_POLL_H])
#
-# Define NO_SYS_PARAM_H if you don't have sys/param.h
-AC_CHECK_HEADER([sys/param.h],
-[NO_SYS_PARAM_H=],
-[NO_SYS_PARAM_H=UnfortunatelyYes])
-GIT_CONF_SUBST([NO_SYS_PARAM_H])
-#
# Define NO_INTTYPES_H if you don't have inttypes.h
AC_CHECK_HEADER([inttypes.h],
[NO_INTTYPES_H=],
diff --git a/git-compat-util.h b/git-compat-util.h
index d7359ef..a88147b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -104,7 +104,7 @@
#endif
#include <errno.h>
#include <limits.h>
-#ifndef NO_SYS_PARAM_H
+#ifdef NEEDS_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/types.h>
--
1.8.1.rc2.136.gb42b73a
^ permalink raw reply related
* [PATCH v3] git-completion.bash: add support for path completion
From: Manlio Perillo @ 2012-12-18 17:25 UTC (permalink / raw)
To: git; +Cc: Manlio Perillo
The git-completion.bash script did not implemented full, git aware,
support for completion, for git commands that operate on files within
the current working directory or the index.
For these commands, only long options completion was available.
As an example:
git add <TAB>
will suggest all files in the current working directory, including
ignored files and files that have not been modified.
Full support for completion is now implemented, for git commands where
the non-option arguments always refer to paths within the current
working directory or the index, as the follow:
* the path completion for the "git mv", "git rm" and "git ls-tree"
commands will suggest all cached files.
* the path completion for the "git add" command will suggest all
untracked and modified files. Ignored files are excluded.
* the path completion for the "git clean" command will suggest all
untracked files. Ignored files are excluded.
* the path completion for the "git commit" command will suggest all
files that have been modified from the HEAD.
For all affected commands, completion will always stop at directory
boundary. Only standard ignored files are excluded, using the
--exclude-standard option of the ls-files command.
Signed-off-by: Manlio Perillo <manlio.perillo@gmail.com>
---
contrib/completion/git-completion.bash | 112 ++++++++++++++++++++++++++++-----
1 file changed, 97 insertions(+), 15 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0b77eb1..923ef37 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -13,6 +13,7 @@
# *) .git/remotes file names
# *) git 'subcommands'
# *) tree paths within 'ref:path/to/file' expressions
+# *) file paths within current working directory and index
# *) common --long-options
#
# To use these routines:
@@ -233,6 +234,59 @@ __gitcomp_nl ()
COMPREPLY=($(compgen -P "${2-}" -S "${4- }" -W "$1" -- "${3-$cur}"))
}
+# Perl filter used to process path list returned by ls-files and
+# diff-index --name-only commands, in order to list file names
+# relative to a specified directory, and append a slash to directory
+# names.
+# The script expects the prefix path in the "pfx" environ variable.
+# The output must be processed with the uniq filter, to remove
+# duplicate directories.
+# XXX remove duplicates in the Perl script ?
+__git_index_file_list_filter='$pfx = $ENV{"pfx"};
+ $idx = index($_, $pfx);
+ if ($idx == 0) {
+ $_ = substr $_, length($pfx);
+ @segments = split("/", $_);
+ if ($segments[1]) {
+ print $segments[0], "/\n"
+ } else {
+ print $segments[0], "\n"
+ }
+ }'
+
+# __git_files accepts 1 or 2 arguments:
+# 1: A string for file index status mode ("c", "m", "d", "o"), as
+# supported by git ls-files command. This is required.
+# 2: An optional directory path. If provided, only files within the
+# specified directory are listed. Sub directories are never recursed.
+# Path must have a trailing slash.
+__git_files ()
+{
+ local dir="$(__gitdir)" flags="-${1}"
+
+ if [ -d "$dir" ]; then
+ git --git-dir="$dir" ls-files --exclude-standard ${flags} ${pfx} \
+ | pfx=$2 perl -ne "${__git_index_file_list_filter}" \
+ | uniq
+ return
+ fi
+}
+
+# __git_commit_files accepts 1 optional argument: a directory path.
+# If provided, only files within the specified directory are listed.
+# Sub directories are never recursed. Path must have a trailing slash.
+__git_commit_files ()
+{
+ local dir="$(__gitdir)"
+
+ if [ -d "$dir" ]; then
+ git --git-dir="$dir" diff-index --name-only HEAD \
+ | pfx=$1 perl -ne "${__git_index_file_list_filter}" \
+ | uniq
+ return
+ fi
+}
+
__git_heads ()
{
local dir="$(__gitdir)"
@@ -430,6 +484,25 @@ __git_complete_revlist_file ()
}
+# __git_complete_index_file requires 1 argument, the file index
+# status mode
+_git_complete_index_file ()
+{
+ local pfx cur_="$cur" flags=${1}
+ case "$cur_" in
+ ?*/*)
+ pfx="${cur_%/*}"
+ cur_="${cur_##*/}"
+ pfx="${pfx}/"
+
+ __gitcomp_nl "$(__git_files ${flags} ${pfx})" "$pfx" "$cur_" ""
+ ;;
+ *)
+ __gitcomp_nl "$(__git_files ${flags})" "" "$cur_" ""
+ ;;
+ esac
+}
+
__git_complete_file ()
{
__git_complete_revlist_file
@@ -770,8 +843,6 @@ _git_apply ()
_git_add ()
{
- __git_has_doubledash && return
-
case "$cur" in
--*)
__gitcomp "
@@ -780,7 +851,8 @@ _git_add ()
"
return
esac
- COMPREPLY=()
+ # XXX should we check for --update and --all options ?
+ _git_complete_index_file "om"
}
_git_archive ()
@@ -930,15 +1002,14 @@ _git_cherry_pick ()
_git_clean ()
{
- __git_has_doubledash && return
-
case "$cur" in
--*)
__gitcomp "--dry-run --quiet"
return
;;
esac
- COMPREPLY=()
+ # XXX should we check for -x option ?
+ _git_complete_index_file "o"
}
_git_clone ()
@@ -969,7 +1040,7 @@ _git_clone ()
_git_commit ()
{
- __git_has_doubledash && return
+ local pfx cur_=${cur}
case "$cur" in
--cleanup=*)
@@ -997,8 +1068,20 @@ _git_commit ()
--verbose --quiet --fixup= --squash=
"
return
+ ;;
+ ?*/*)
+ pfx="${cur_%/*}"
+ cur_="${cur_##*/}"
+ pfx="${pfx}/"
+
+ __gitcomp_nl "$(__git_commit_files ${pfx})" "$pfx" "$cur_" ""
+ return
+ ;;
+ *)
+ __gitcomp_nl "$(__git_commit_files)" "" "$cur_" ""
+ return
+ ;;
esac
- COMPREPLY=()
}
_git_describe ()
@@ -1216,8 +1299,6 @@ _git_init ()
_git_ls_files ()
{
- __git_has_doubledash && return
-
case "$cur" in
--*)
__gitcomp "--cached --deleted --modified --others --ignored
@@ -1230,7 +1311,9 @@ _git_ls_files ()
return
;;
esac
- COMPREPLY=()
+ # XXX ignore options like --modified and always suggest all cached
+ # files.
+ _git_complete_index_file "c"
}
_git_ls_remote ()
@@ -1362,7 +1445,8 @@ _git_mv ()
return
;;
esac
- COMPREPLY=()
+ # XXX needs more work
+ _git_complete_index_file "c"
}
_git_name_rev ()
@@ -2068,15 +2152,13 @@ _git_revert ()
_git_rm ()
{
- __git_has_doubledash && return
-
case "$cur" in
--*)
__gitcomp "--cached --dry-run --ignore-unmatch --quiet"
return
;;
esac
- COMPREPLY=()
+ _git_complete_index_file "c"
}
_git_shortlog ()
--
1.8.1.rc1.18.g9db0d25
^ permalink raw reply related
* Re: [PATCH] Makefile: track TCLTK_PATH as it used to be tracked
From: Junio C Hamano @ 2012-12-18 17:07 UTC (permalink / raw)
To: Christian Couder; +Cc: Paul Mackerras, git
In-Reply-To: <20121218145753.28253.98431.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
> A long time ago, gitk used to live at the root of the git.git
> repository. In 62ba514 (Move gitk to its own subdirectory,
> 2007-11-17) it was moved to a subdirectory, but some code used
> to track TCLTK_PATH was left in the main Makefile instead
> of being moved to the new Makefile that was created in gitk-git/.
>
> The code left in the main Makefile in git.git should now have
> been removed because it was found useless.
>
> And this patch puts some code back to track TCLTK_PATH properly
> where it should be.
It is more like "should have been moved to gitk's Makefile back
then, but didn't. Make it so.".
>
> Note that there is already some code to do that in git-gui.
>
> At the same time this patch creates a .gitignore and also marks
> some targets in the Makefile as PHONY.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> Hi Paul,
>
> In this thread:
>
> http://thread.gmane.org/gmane.comp.version-control.git/211641
>
> Junio asked me to send you this patch.
> So here it is, for you to apply to your tree.
Paul, just to clarify, I didn't review the contents of the patch; I
merely redirected the patch in the right direction, so this still
needs to be vetted by you ;-)
> ...
> +GIT-TCLTK-VARS: FORCE
> + @VARS='$(TRACK_TCLTK)'; \
> + if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
> + echo 1>&2 " * new Tcl/Tk interpreter location"; \
I think in a related patch to the top-level Makefile changes it to
lose "1" to read it as "echo >&2" here.
^ permalink raw reply
* sys/param.h
From: Junio C Hamano @ 2012-12-18 17:01 UTC (permalink / raw)
To: git
In-Reply-To: <50D02B9A.1040906@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
>> Junio C Hamano wrote:
>>> It could turn out that we may be able to get rid of sys/param.h
>>> altogether, but one step at a time. Inputs from people on minority
>>> platforms are very much appreciated---does your platform build fine
>>> when the inclusion of the file is removed from git-compat-util.h?
>
> MinGW works fine with sys/param.h removed from git-compat-util.h.
It seems that OpenBSD 5.2 does not mind it getting removed, either.
Debian 5 and Debian 6 seem OK; so do Ubuntu 10.04 and 12.04. I have
a hunch that Fedora or anything based on glibc would be fine, too.
What other platforms do we care deeply about?
^ permalink raw reply
* Re: [PATCH 1/2] Documentation/git-checkout.txt: clarify usage
From: Junio C Hamano @ 2012-12-18 16:43 UTC (permalink / raw)
To: Chris Rorvick
Cc: Andrew Ardill, Philip Oakley, Git List, Tomas Carnecky, Woody Wu,
Johannes Sixt
In-Reply-To: <CAEUsAPa1XMeymEXbLu=iy8VTdLO=iPUeVN3QPH+FbQecL8XnsA@mail.gmail.com>
Chris Rorvick <chris@rorvick.com> writes:
> I like Johannes' suggestion of using "<branch>" in the --detach case
> instead of "<commit>" as I think it makes the reason for the
> separation more obvious at a glance.
Sounds sensible; even though the option does not require its
argument to be a branch name, the user does not have a reason to use
the option if it is not giving a branch name, either, so it all
balances out ;-).
>
> --->8---
> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
> index dcf1a32..4fdf41a 100644
> --- a/Documentation/git-checkout.txt
> +++ b/Documentation/git-checkout.txt
> @@ -61,8 +61,8 @@ $ git checkout <branch>
> that is to say, the branch is not reset/created unless "git checkout" is
> successful.
>
> -'git checkout' --detach [<commit>]::
> 'git checkout' <commit>::
> +'git checkout' --detach [<branch>]::
>
> Prepare to work on top of <commit>, by detaching HEAD at it
> (see "DETACHED HEAD" section), and updating the index and the
> @@ -71,7 +71,8 @@ successful.
> tree will be the state recorded in the commit plus the local
> modifications.
> +
> -Passing `--detach` forces this behavior even if <commit> is a branch.
> +Passing `--detach` forces this behavior in the case of a <branch>, or
> +the current branch if one is not specified.
>
> 'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...::
^ permalink raw reply
* Re: problem with BOINC repository and CR/LF
From: Jeff King @ 2012-12-18 16:41 UTC (permalink / raw)
To: Torsten Bögershausen
Cc: Toralf Förster, Andrew Ardill, git@vger.kernel.org
In-Reply-To: <50D05E62.7090605@web.de>
On Tue, Dec 18, 2012 at 01:15:30PM +0100, Torsten Bögershausen wrote:
> I could re-produce the problem here:
> git version 1.8.0.197.g5a90748
> Mac OS X (that what I had at hands fastest)
I could reproduce it, too, on Linux.
The reason it does not always happen is that git will not re-examine the
file content unless the timestamp on the file is older than what's in
the index. So it is a race condition for git to see whether the file is
stat-dirty.
But you can make sure all files are stat-dirty by just resetting the
index:
$ git clone git://boinc.berkeley.edu/boinc.git
$ rm .git/index
$ git reset
which shows the complete list of files with LF/CRLF normalization
issues.
> So my conclusion is:
> The file has CRLF in the repo, but should have LF.
> This is not a good thing, and the files need to be normalized.
Yes, exactly. The project has told git via .gitattributes that certain
files should have particular line endings in the repository, but that is
not the case with the current versions. Doing:
$ git commit -a -m 'normalize line endings according to gitattributes'
on top of the commands above would fix it (for that commit and onwards,
anyway).
-Peff
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox