Skip to content
This repository

Fork of Git, same baseline, more features

branch: master

This branch is 0 commits ahead and 0 commits behind master

completion: zsh: improve main function selection

Sometimes we want to use the function directly (e.g. _git_checkout), for
example when zsh has the option 'complete_aliases', this way, we can do
something like:

  compdef _git gco=git_checkout

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
latest commit aaafa76fcc
Felipe Contreras authored
Documentation doc: add git-remote-bzr/hg documentation
block-sha1 Merge branch 'jk/pack-bitmap'
builtin add: remove dead code
compat Merge branch 'jk/commit-dates-parsing-fix'
contrib Merge tag 'v2.0.0'
ewah ewah_bitmap.c: do not assume size_t and eword_t are the same size
git-gui Merge branch 'jl/use-vsatisfy-correctly-for-2.0'
gitk-git Merge git://ozlabs.org/~paulus/gitk
gitweb Merge branch 'jl/nor-or-nand-and'
mergetools mergetools: add vimdiff3 mode
perl code and test: fix misuses of "nor"
po fr: a lot of good fixups
ppc fix openssl headers conflicting with custom SHA1 implementations
shared completion: zsh: improve main function selection
t test: cleanup remote-hg-hg-git test
templates sample pre-commit hook: use --bool when retrieving config var
vcs-svn Silence gcc warnings with -O3
xdiff C: have space around && and || operators
.gitattributes .gitattributes: detect 8-space indent in shell scripts
.gitignore Trivial synchronization fixes
.mailmap .mailmap: switch to Thomas Rast's personal address
.travis.yml travis: trivial cleanup
COPYING Update COPYING with GPLv2 with new FSF address
GIT-VERSION-GEN Git v2.0.0+fc2
INSTALL Typo fix: replacing it's -> its
LGPL-2.1 provide a copy of the LGPLv2.1
Makefile build: fix gitk completion link
README.md readme: rename once again
README.upstream Add our own README
RelNotes Start preparing for Git 2.0
abspath.c Merge branch 'ap/path-max'
aclocal.m4 configure: use AC_LANG_PROGRAM consistently
advice.c Merge branch 'jc/push-2.0-default-to-simple'
advice.h Merge branch 'jc/push-2.0-default-to-simple'
alias.c replace {pre,suf}fixcmp() with {starts,ends}_with()
alloc.c alloc.c: have SP around arithmetic operators
archive-tar.c archive-tar: use parse_config_key when parsing config
archive-zip.c Merge branch 'sb/archive-zip-double-assignment-fix' into maint
archive.c Merge branch 'rm/strchrnul-not-strlen'
archive.h archive: convert to use parse_pathspec
argv-array.c Merge branch 'fa/remote-svn'
argv-array.h Add the LAST_ARG_MUST_BE_NULL macro
attr.c attr.c: use ALLOC_GROW() in handle_attr_line()
attr.h correct a few doubled-word nits in comments and documentation
base85.c base85.c: have SP around arithmetic operators
bisect.c Merge branch 'nd/log-show-linear-break'
bisect.h Move print_commit_list to libgit.a
blob.c Replace parse_blob() with an explanatory comment
blob.h Replace parse_blob() with an explanatory comment
branch.c Merge tag 'v2.0.0'
branch.h branch: allow configuring the publish branch
builtin.h Merge tag 'v1.9.0' into fc/master
bulk-checkin.c finish_tmp_packfile():use strbuf for pathname construction
bulk-checkin.h bulk-checkin: replace fast-import based implementation
bundle.c Merge branch 'nd/log-show-linear-break'
bundle.h Merge branch 'jc/unseekable-bundle'
cache-tree.c Merge branch 'rm/strchrnul-not-strlen'
cache-tree.h Convert "struct cache_entry *" to "const ..." wherever possible
cache.h Merge tag 'v2.0.0'
check-builtins.sh check-builtins.sh: use the $(...) construct for command substitution
check-racy.c ce_match_stat, run_diff_files: use symbolic constants for readability
check_bindir Move all dashed-form commands to libexecdir
color.c make color.ui default to 'auto'
color.h want_color: automatically fallback to color.ui
column.c comments: fix misuses of "nor"
column.h column: support piping stdout to external git-column process
combine-diff.c combine-diff: simplify intersect_paths() further
command-list.txt peek-remote: remove deprecated alias of ls-remote
commit-slab.h commit-slab: sizeof() the right type in xrealloc
commit.c Merge tag 'v2.0.0'
commit.h merge: add --reverse-parents option
config.c Trivial synchronization fixes
config.mak.in Merge branch 'jc/remove-export-from-config-mak-in'
config.mak.uname Merge branch 'mr/msvc-link-with-invalidcontinue'
configure.ac Merge branch 'dm/configure-iconv-locale-charset'
connect.c Merge branch 'nd/indent-fix-connect-c'
connect.h connect.c: refactor url parsing
connected.c Merge branch 'nd/shallow-clone'
connected.h connected.c: add new variant that runs with --shallow-file
convert.c replace {pre,suf}fixcmp() with {starts,ends}_with()
convert.h typofix: in-code comments
copy.c preserve mtime of local clone
credential-cache--daemon.c credentials: add "cache" helper
credential-cache.c credential-cache: ignore "connection refused" errors
credential-store.c sparse: Fix mingw_main() argument number/type errors
credential.c credential: fix wrong double password prompt
credential.h git credential fill: output the whole 'struct credential'
csum-file.c Merge branch 'jk/sha1write-void'
csum-file.h Merge branch 'jk/sha1write-void'
ctype.c ctype: support iscntrl, ispunct, isxdigit and isprint
daemon.c daemon: move daemonize() to libgit.a
date.c i18n: fix uncatchable comments for translators in date.c
decorate.c decorate.c: compact table when growing
decorate.h decorate: allow const objects to be decorated
delta.h comments: fix misuses of "nor"
diff-delta.c create_delta_index: simplify condition always evaluating to true
diff-lib.c Merge branch 'jc/hold-diff-remove-q-synonym-for-no-deletion'
diff-no-index.c Merge branch 'jc/fix-diff-no-index-diff-opt-parse'
diff.c Merge branch 'jk/external-diff-use-argv-array' (early part)
diff.h Merge branch 'jc/hold-diff-remove-q-synonym-for-no-deletion'
diffcore-break.c diffcore-break: don't divide by zero
diffcore-delta.c Fix diff -B/--dirstat miscounting of newly added contents
diffcore-order.c Merge branch 'nd/no-more-fnmatch'
diffcore-pickaxe.c pickaxe: simplify kwset loop in contains()
diffcore-rename.c Merge branch 'dd/use-alloc-grow'
diffcore.h Merge branch 'jk/diff-filespec-cleanup'
dir.c Merge branch 'cb/aix'
dir.h pathspec: pass directory indicator to match_pathspec_item()
editor.c editor: use canonicalized absolute path
entry.c Merge branch 'mh/remove-subtree-long-pathname-fix' into maint
environment.c Merge tag 'v2.0.0'
exec_cmd.c run-command: treat inaccessible directories as ENOENT
exec_cmd.h Add the LAST_ARG_MUST_BE_NULL macro
fast-import.c Merge tag 'v2.0.0'
fetch-pack.c Merge branch 'nd/log-show-linear-break'
fetch-pack.h Merge branch 'nd/shallow-clone'
fmt-merge-msg.h fmt-merge-msg: use branch.$name.description
fsck.c Merge branch 'hs/simplify-bit-setting-in-fsck-tree'
fsck.h Check the format of more printf-type functions
generate-cmdlist.sh i18n: help: mark strings for translation
gettext.c gettext.c: detect the vsnprintf bug at runtime
gettext.h Merge branch 'nd/fetch-status-alignment'
git-add--interactive.perl Merge branch 'jl/nor-or-nand-and'
git-am.sh Merge branch 'jl/nor-or-nand-and'
git-archimport.perl git-archimport: use a lowercase "usage:" string
git-bisect.sh git-bisect.sh: fix a few style issues
git-compat-util.h Merge tag 'v2.0.0'
git-cvsexportcommit.perl git-cvsexportcommit: use a lowercase "usage:" string
git-cvsimport.perl git-cvsimport: use a lowercase "usage:" string
git-cvsserver.perl Merge branch 'ak/cvsserver-stabilize-use-of-hash-keys'
git-difftool--helper.sh difftool: display the number of files in the diff queue in the prompt
git-difftool.perl difftool: support repositories with .git-files
git-filter-branch.sh Merge branch 'lc/filter-branch-too-many-refs'
git-instaweb.sh git-sh-setup.sh: add variable to use the stuck-long mode
git-merge-octopus.sh merge-octopus: Work around environment issue on Windows
git-merge-one-file.sh Merge branch 'kb/p4merge'
git-merge-resolve.sh Convert to use quiet option when available
git-mergetool--lib.sh remove #!interpreter line from shell libraries
git-mergetool.sh mergetool: run prompt only if guessed tool
git-p4.py Merge branch 'cl/p4-use-diff-tree'
git-parse-remote.sh remove #!interpreter line from shell libraries
git-pull.sh Merge branch 'bc/gpg-sign-everywhere'
git-quiltimport.sh git-sh-setup.sh: add variable to use the stuck-long mode
git-rb-setup.rb ruby: add simpler option parser
git-rebase--am.sh Merge branch 'km/avoid-non-function-return-in-rebase'
git-rebase--interactive.sh Merge tag 'v2.0.0'
git-rebase--merge.sh Merge branch 'km/avoid-non-function-return-in-rebase'
git-rebase.sh Merge tag 'v2.0.0'
git-relink.perl git-relink: use a lowercase "usage:" string
git-remote-bzr.py remote-bzr: Try to export HEAD
git-remote-hg.py Fix memfilectx API change
git-remote-testgit.sh Merge tag 'v1.8.5' into fc/master
git-request-pull.sh Merge branch 'lt/request-pull'
git-send-email.perl Merge branch 'rk/send-email-ssl-cert' into maint
git-sh-i18n.sh remove #!interpreter line from shell libraries
git-sh-setup.sh git-sh-setup.sh: add variable to use the stuck-long mode
git-stash.sh Merge tag 'v1.9.2' into fc/master
git-submodule.sh Merge tag 'v2.0.0'
git-svn.perl Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not g…
git-update.sh update: remove squash option
git-web--browse.sh web--browse: Add support for xdg-open
git.c Merge tag 'v2.0.0'
git.rc Makefile: Fix compilation of Windows resource file
git.spec.in spec: add missing build dependency
gpg-interface.c Merge branch 'mg/gpg-interface-using-status' into maint
gpg-interface.h merge/pull Check for untrusted good GPG signatures
graph.c graph: fix coloring around octopus merges
graph.h Revert "graph.c: mark private file-scope symbols as static"
grep.c Merge branch 'rs/grep-h-c'
grep.h grep: allow to use textconv filters
hashmap.c add a hashtable implementation that supports O(1) removal
hashmap.h hashmap.h: use 'unsigned int' for hash-codes everywhere
help.c Merge branch 'rt/help-pretty-prints-cmd-names'
help.h help: add help_unknown_ref()
hex.c get_sha1_hex(): do not read past a NUL character
http-backend.c replace {pre,suf}fixcmp() with {starts,ends}_with()
http-fetch.c Merge branch 'ab/enable-i18n'
http-push.c object.h: centralize object flag allocation
http-walker.c Rename static function fetch_pack() to http_fetch_pack()
http.c Merge branch 'mh/object-code-cleanup'
http.h Merge branch 'jl/nor-or-nand-and'
ident.c Merge branch 'jk/split-broken-ident' into maint
imap-send.c replace {pre,suf}fixcmp() with {starts,ends}_with()
khash.h pack-bitmap: add support for bitmap indexes
kwset.c typofix: in-code comments
kwset.h Adapt the kwset code to Git
levenshtein.c Fix typos / spelling in comments
levenshtein.h Typofixes outside documentation area
line-log.c line-log: convert to using diff_tree_sha1()
line-log.h range-set: publish API for re-use by git-blame -L
line-range.c line-range: reject -L line numbers less than 1
line-range.h line-range: teach -L/RE/ to search relative to anchor point
list-objects.c Merge branch 'jk/pack-bitmap'
list-objects.h list-objects: reduce one argument in mark_edges_uninteresting
ll-merge.c convert some config callbacks to parse_config_key
ll-merge.h merge-recursive --patience
lockfile.c lockfile: fix buffer overflow in path handling
log-tree.c Merge branch 'nd/log-show-linear-break'
log-tree.h pretty: share code between format_decoration and show_decorations
mailmap.c Merge branch 'jc/strcasecmp-pure-inline'
mailmap.h mailmap: simplify map_user() interface
match-trees.c use strchrnul() in place of strchr() and strlen()
merge-blobs.c Which merge_file() function do you mean?
merge-blobs.h Which merge_file() function do you mean?
merge-recursive.c Merge branch 'bk/refresh-missing-ok-in-merge-recursive' into maint
merge-recursive.h Move try_merge_command and checkout_fast_forward to libgit.a
merge.c Move try_merge_command and checkout_fast_forward to libgit.a
mergesort.c mergesort: rename it to llist_mergesort()
mergesort.h mergesort: rename it to llist_mergesort()
name-hash.c name-hash: retire unused index_name_exists()
notes-cache.c Merge branch 'jc/show-sig'
notes-cache.h introduce notes-cache interface
notes-merge.c remove diff_tree_{setup,release}_paths
notes-merge.h Move create_notes_commit() from notes-merge.c into notes-utils.c
notes-utils.c notes-utils: handle boolean notes.rewritemode correctly
notes-utils.h typofix: commit is spelled with two ems
notes.c replace {pre,suf}fixcmp() with {starts,ends}_with()
notes.h many small typofixes
object.c Document some functions defined in object.c
object.h Merge branch 'nd/log-show-linear-break'
pack-bitmap-write.c Use hashcpy() when copying object names
pack-bitmap.c add `ignore_missing_links` mode to revwalk
pack-bitmap.h pack-bitmap: implement optional name_hash cache
pack-check.c fsck: print progress
pack-objects.c pack-objects: refactor the packing list
pack-objects.h pack-objects: implement bitmap writing
pack-revindex.c do not discard revindex when re-preparing packfiles
pack-revindex.h do not discard revindex when re-preparing packfiles
pack-write.c finish_tmp_packfile():use strbuf for pathname construction
pack.h finish_tmp_packfile():use strbuf for pathname construction
pager.c Merge branch 'jn/pager-lv-default-env'
parse-options-cb.c prune: introduce OPT_EXPIRY_DATE() and use it
parse-options.c Merge tag 'v2.0.0'
parse-options.h Merge tag 'v2.0.0'
patch-delta.c compat: helper for detecting unsigned overflow
patch-ids.c patch-ids.c: use ALLOC_GROW() in add_commit()
patch-ids.h Refactor patch-id filtering out of git-cherry and git-format-patch.
path.c Merge branch 'jk/config-path-include-fix' into maint
pathspec.c pathspec: convert some match_pathspec_depth() to ce_path_match()
pathspec.h Support pathspec magic :(exclude) and its short form :!
pkt-line.c replace {pre,suf}fixcmp() with {starts,ends}_with()
pkt-line.h comments: fix misuses of "nor"
preload-index.c pathspec: convert some match_pathspec_depth() to ce_path_match()
pretty.c Merge branch 'rm/strchrnul-not-strlen'
prio-queue.c sort-in-topological-order: use prio-queue
prio-queue.h sort-in-topological-order: use prio-queue
progress.c i18n: mark all progress lines for translation
progress.h nicer display of thin pack completion
prompt.c Revert "prompt: clean up strbuf usage"
prompt.h prompt: use git_terminal_prompt
quote.c quote: remove sq_quote_print()
quote.h quote: remove sq_quote_print()
reachable.c clear parsed flag when we free tree buffers
reachable.h prune: show progress while marking reachable objects
read-cache.c Merge branch 'dd/use-alloc-grow'
reflog-walk.c Merge branch 'sh/use-hashcpy'
reflog-walk.h Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint
refs.c Merge branch 'sh/use-hashcpy'
refs.h Merge branch 'sb/refs-code-cleanup'
remote-curl.c http: never use curl_easy_perform
remote-testsvn.c use strchrnul() in place of strchr() and strlen()
remote.c Merge tag 'v2.0.0'
remote.h Merge tag 'v2.0.0'
replace_object.c Merge branch 'dd/use-alloc-grow'
rerere.c pathspec: pass directory indicator to match_pathspec_item()
rerere.h rerere: convert to use parse_pathspec
resolve-undo.c Merge branch 'nd/submodule-pathspec-ending-with-slash'
resolve-undo.h convert unmerge_cache to take struct pathspec
revision.c Merge branch 'jk/pack-bitmap'
revision.h Merge branch 'jk/pack-bitmap'
rewrite.c builtin: rewrite: add copy_rewrite_notes()
rewrite.h builtin: rewrite: add copy_rewrite_notes()
ruby.c ruby: bind log_tree_diff_flush()
run-command.c commit: fix patch hunk editing with "commit -p -m"
run-command.h run-command: mark run_hook_with_custom_index as deprecated
send-pack.c Merge branch 'nd/shallow-clone'
send-pack.h remote.h: replace struct extra_have_objects with struct sha1_array
sequencer.c Merge tag 'v2.0.0'
sequencer.h Merge tag 'v2.0.0'
server-info.c update-server-info: Shorten read_pack_info_file()
setup.c Merge branch 'mw/symlinks'
sh-i18n--envsubst.c sh-i18n--envsubst: retire unused string_list_member()
sha1-array.c sha1-array.c: mark a private file-scope symbol as static
sha1-array.h sha1-array.c: mark a private file-scope symbol as static
sha1-lookup.c sha1-lookup: handle duplicate keys with GIT_USE_LOOKUP
sha1-lookup.h sha1-lookup: add new "sha1_pos" function to efficiently lookup sha1
sha1_file.c Merge branch 'jl/nor-or-nand-and'
sha1_name.c Merge tag 'v2.0.0'
shallow.c shallow: verify shallow file after taking lock
shell.c replace {pre,suf}fixcmp() with {starts,ends}_with()
shortlog.c Merge tag 'v1.9.0' into fc/master
shortlog.h shortlog: split builtin from common code
show-index.c i18n: add infrastructure for translating Git with gettext
sideband.c pkt-line: share buffer/descriptor reading implementation
sideband.h pkt-line: move LARGE_PACKET_MAX definition from sideband
sigchain.c refactor signal handling for cleanup functions
sigchain.h refactor signal handling for cleanup functions
strbuf.c strbuf: remove prefixcmp() and suffixcmp()
strbuf.h strbuf: style fix -- top opening bracket on a separate line
streaming.c open_istream(): do not dereference NULL in the error case
streaming.h streaming: void pointer instead of char pointer
string-list.c Merge branch 'ap/log-mailmap'
string-list.h Merge branch 'ap/log-mailmap'
submodule.c Merge branch 'kb/fast-hashmap'
submodule.h rm: delete .gitmodules entry of submodules removed from the work tree
symlinks.c symlinks.c: mark private file-scope symbols as static
tag.c replace {pre,suf}fixcmp() with {starts,ends}_with()
tag.h upload-pack: avoid parsing tag destinations
tar.h tar-tree: Introduce write_entry()
test-chmtime.c comments: fix misuses of "nor"
test-ctype.c test-ctype: add test for is_pathspec_magic
test-date.c i18n: mark relative dates for translation
test-delta.c tests: use a lowercase "usage:" string
test-dump-cache-tree.c Convert "struct cache_entry *" to "const ..." wherever possible
test-genrandom.c tests: use a lowercase "usage:" string
test-hashmap.c test-hashmap.c: drop unnecessary #includes
test-index-version.c sparse: Fix mingw_main() argument number/type errors
test-line-buffer.c replace {pre,suf}fixcmp() with {starts,ends}_with()
test-match-trees.c use 'tree-ish' instead of 'treeish'
test-mergesort.c sparse: Fix mingw_main() argument number/type errors
test-mktemp.c Improve error messages when temporary file creation fails
test-parse-options.c parse-options: remove unused OPT_SET_PTR
test-path-utils.c path-utils test: rename mingw_path function to print_path
test-prio-queue.c prio-queue: priority queue of pointers to structs
test-read-cache.c read-cache: add simple performance test
test-regex.c test-regex: Add a test to check for a bug in the regex routines
test-revision-walking.c Teach revision walking machinery to walk multiple times sequencially
test-run-command.c tests: check error message from run_command
test-scrap-cache-tree.c Add test-scrap-cache-tree
test-sha1.c test-sha1: add a binary output mode
test-sha1.sh more tr portability test script fixes
test-sigchain.c t0005: use SIGTERM for sigchain test
test-string-list.c replace {pre,suf}fixcmp() with {starts,ends}_with()
test-subprocess.c sparse: Fix mingw_main() argument number/type errors
test-svn-fe.c msvc: test-svn-fe: Fix linker "unresolved external" error
test-urlmatch-normalization.c builtin/config.c: compilation fix
test-wildmatch.c stop using fnmatch (either native or compat)
thread-utils.c mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE
thread-utils.h thread-utils.h: simplify the inclusion
trace.c shallow.c: the 8 steps to select new commits for .git/shallow
transport-helper.c Merge tag 'v2.0.0'
transport.c Merge tag 'v2.0.0'
transport.h Merge tag 'v1.9.0' into fc/master
tree-diff.c tree-diff: convert diff_root_tree_sha1() to just call diff_tree_sha1 …
tree-walk.c tree-walk: finally switch over tree descriptors to contain a pre-pars…
tree-walk.h tree-walk: finally switch over tree descriptors to contain a pre-pars…
tree.c Merge branch 'jk/free-tree-buffer'
tree.h Merge branch 'jk/free-tree-buffer'
unimplemented.sh Makefile: allow building without perl
unix-socket.c unix-socket: do not let close() or chdir() clobber errno during cleanup
unix-socket.h credentials: add "cache" helper
unpack-trees.c Merge branch 'nd/i18n-progress'
unpack-trees.h diff-lib, read-tree, unpack-trees: mark cache_entry array paramters c…
upload-pack.c Merge branch 'nd/log-show-linear-break'
url.c Merge branch 'jk/http-auth'
url.h url: decode buffers that are not NUL-terminated
urlmatch.c urlmatch.c: recompute pointer after append_normalized_escapes
urlmatch.h config: add generic callback wrapper to parse section.<url>.key
usage.c Revert "make error()'s constant return value more visible"
userdiff.c userdiff: have 'cpp' hunk header pattern catch more C++ anchor points
userdiff.h refactor get_textconv to not require diff_filespec
utf8.c Merge branch 'tb/unicode-6.3-zero-width'
utf8.h add missing "format" function attributes
varint.c varint: make it available outside the context of pack
varint.h varint: make it available outside the context of pack
version.c include agent identifier in capability string
version.h include agent identifier in capability string
versioncmp.c tag: support --sort=<spec>
walker.c object.h: centralize object flag allocation
walker.h http: init and cleanup separately from http-walker
wildmatch.c wildmatch: properly fold case everywhere
wildmatch.h wildmatch: support "no FNM_PATHNAME" mode
wrap-for-bin.sh wrap-for-bin: make bin-wrappers chainable
wrapper.c typofixes: fix misspelt comments
write_or_die.c write_or_die: raise SIGPIPE when we get EPIPE
ws.c use strchrnul() in place of strchr() and strlen()
wt-status.c Merge tag 'v2.0.0'
wt-status.h Merge branch 'mm/status-porcelain-format-i18n-fix'
xdiff-interface.c xdiff: remove emit_func() and xdi_diff_hunks()
xdiff-interface.h xdiff: remove emit_func() and xdi_diff_hunks()
zlib.c zlib: fix compilation failures with Sun C Compilaer
README.md

git-fc

git-fc is a friendly fork of Git, which means it's a fork that won't deviate from the mainline; it is more like a branch in Git terms. This branch will move forward close to Git's mainline, and it could be merged at any point in time, if the maintainer wished to do so.

git-fc doesn't include experimental code, or half-assed features, so you can expect the same level of stability as Git's mainline. Also, it doesn't remove any feature, or do any backwards incompatible changes, so you can replace git with git-fc and you wouldn't notice the difference. The difference comes in the extra features, that is all.

Maintenance

Each release of Git is merged directly into git-fc, so if there's a new feature in Git, git-fc will get it as well.

Every extra feature is maintained individually in a separate branch, so if you are interested in a specific feature and don't trust the rest of git-fc, you can use that branch instead. For example the publish tracking branch feature is maintained in the 'fc/publish' branch which sits on top of git.git's v1.9.2. You can grab the specific branch and do whatever you want with it.

Extra features

Streamlined remote helpers

git-remote-hg and git-remote-bzr are remote helpers that allow two-way communication between Git and Mercurial/Bazaar. They have been proven to be very reliable and solid, and used by many people. In order to use them in Git mainline you might need a bit of tinkering.

With git-fc they are installed by default, and in the right way. Plus there are fixes in the remote helper infraestructure so they always work better than in Git mainline.

New 'git update' tool

Everybody has agreed the git pull command is broken for most use-cases, which is why most seasoned Git users avoid it, and it is recommended for new users to avoid it.

A new tool is necessary for the most common use case, which is fetch all the updates and update the current branch if possible.

The new git update will fast-forward to the latest commit in the remote branch if there's no divergence (you haven't made extra commits). But if you have made extra commits you will be told to either merge or rebase, or run git update --merge or git update --rebase.

This ensures that new users won't be making merges by mistake.

Additionally, when doing a merge the order of the parents will be reversed, so it would appear as if you are merging your local branch to the remote one, and not the other way around like git pull does. Everybody has agreed this is a problem with git pull.

Publish tracking branch

Git mainline doesn't have the greatest support for triangular workflows, a good solution for that is to introduce a second "upstream" tracking branch which is for the reverse; the branch you normally push to.

Say you clone a repository (libgit2) in GitHub, then create a branch (feature-a) and push it to your personal repository, you would want to track two branches (origin/master), and (mine/feature-a), but Git mainline only provides support for a single upstream tracking branch.

If you setup your upstream tracking branch to 'origin/master', then you can just do git rebase without arguments and git will pick the right branch (origin/master) to rebase to. However, git push by default will also try to push to 'origin/master', which is not what you want. Plus git branch -v will show how ahead/behind your branch is compared to origin/master, not mine/feature-a.

If you set up your upstream to 'mine/feature-a', then git push will work, but git rebase won't.

With this option, git rebase uses the upstream branch, and git push uses the publish branch.

Setting the upstream tracking branch is easy:

git push --set-publish mine feature-a

Or:

git branch --set-publish mine/feature-a

And git branch -v will show it as well:

  fc/branch/fast      177dcad [master, gh/fc/branch/fast] branch: ...
  fc/stage            abb6ad5 [master, gh/fc/stage] completion: ..
  fc/transport/improv eb4d3c7 [master, gh/fc/transport/improv] ...

Official staging area

Everybody already uses the term "staging area" already, and Git developers also agreed it the best term to what is officially referred to as "the index". So git-fc has new options for all commands that modify the staging area (e.g. git grep --staged, git rm --staged), and also adds a new git stage command that makes it easier to work with the staging area.

'git stage' [options] [--] [<paths>...]
'git stage add' [options] [--] [<paths>...]
'git stage reset' [-q|--patch] [--] [<paths>...]
'git stage diff' [options] [<commit>] [--] [<paths>...]
'git stage rm' [options] [--] [<paths>...]
'git stage apply' [options] [--] [<paths>...]
'git stage edit'

Without any command, git stage adds files to the stage, same as git add, same as in Git mainline.

Nice 'branch -v'

Currently git branch -v will show you the tracking status (ahead/behind), but wouldn't show you which from which branch, and it takes considerable amount of time (compared to most Git commands).

This is fixed so the branch is showed instead, which is more useful and faster. If you want the tracking status, you can use git branch -vv which shows everything, as with Git mainline.

  fc/branch/fast      177dcad [master] branch: ...
  fc/stage            abb6ad5 [master] completion: ...
  fc/transport/improv eb4d3c7 [master] transport-helper: ...

Default aliases

Many (if not all) version control system tools have shortcuts for their most common operations; hg ci, svn co, cvs st, but not Git... git-fc does:

co = checkout
ci = commit
rb = rebase
st = status
br = branch
pi = cherry-pick
mt = mergetool

If you have already these aliases, or mapped to something else, your aliases would take precedence over the default ones, so you won't have any problems.

New core.mode configuration

The behavior of Git v2.0 is already being defined, but there's no way to test it, if you want to test it, along with all future behaviors, you can enable it on git-fc by setting the configuration core.mode = next.

In addition to the "next" (v2.0) mode, there's the "progress" mode. This mode enables "next" plus other configurations that are saner.

It is recommended that you setup this mode for git-fc:

git config --global core.mode progress

New fetch.default configuration

When you have configured the upstream tracking branch for all your branches, you will probably have tracking branches that point to a local branch, for example 'feature-a' pointing to 'master', in which case you would get something like:

% git fetch
From .
 * branch            master     -> FETCH_HEAD

Which makes absolutely no sense, since the '.' repository is not even documented, and FETCH_HEAD is a marginally known concept. In this case git fetch is basically doing nothing from the user's point of view.

So the user can configure fetch.default = simple to get a simple sensible default; git fetch will always use 'origin' by default.

If you use the "progress" mode, this option is also enabled.

Support for Ruby

There is partial optional support for Ruby. Git already has tooling so any language can use it's plumbing and achieve plenty of tasks:

IO.popen(%w[git for-each-ref]) do |io|
  io.each do |line|
    sha1, kind, name = line.split()
    # stuff
  end
end

However, this a) requires a process fork, and b) requires I/O communication to get the desired data. While this is not a big deal on many systems, it is in Windows systems where forks are slow, and many Git core programs don't work as well as they do in Linux.

Git has a goal to replace all the core scripts with native C versions, but it's a goal only in name that is not actually pursued. In addition, that still leaves out any third party tools since Git doesn't provide a shared libgit library, which is why an independent libgit2 was needed in the first place.

Ruby bindings solve these problems:

for_each_ref() do |name, sha1, flags|
  # stuff
end

The command git ruby can use this script by providing the bindings for many Git's internal C functions (though not all), which makes it easier to write Ruby programs that take full advantage of Git without any need of forks, or I/O communication.

Contributions

All these patches were written by me, Felipe Contreras, but contributions from other people are welcome, as long as they follow these guidelines:

  1. Follows Git coding guidelines and is technically correct according to Git standards
  2. Doesn't break backwards compatibility
  3. It doesn't conflict with other Git features so it can be rebased on newer versions of Git without much maintenance burden

Patches should be sent using git send-email to the mailing list git-fc@googlegroups.com.

Something went wrong with that request. Please try again.