1
0
mirror of https://github.com/git/git.git synced 2024-10-21 12:48:32 +02:00
Commit Graph

7836 Commits

Author SHA1 Message Date
Junio C Hamano
8a334727fc Merge branch 'rt/bfg-ad-in-filter-branch-doc'
* rt/bfg-ad-in-filter-branch-doc:
  docs: add filter-branch notes on The BFG
2014-01-10 10:32:25 -08:00
Junio C Hamano
b0504a9519 Merge branch 'cc/replace-object-info'
read_sha1_file() that is the workhorse to read the contents given
an object name honoured object replacements, but there is no
corresponding mechanism to sha1_object_info() that is used to
obtain the metainfo (e.g. type & size) about the object, leading
callers to weird inconsistencies.

* cc/replace-object-info:
  replace info: rename 'full' to 'long' and clarify in-code symbols
  Documentation/git-replace: describe --format option
  builtin/replace: unset read_replace_refs
  t6050: add tests for listing with --format
  builtin/replace: teach listing using short, medium or full formats
  sha1_file: perform object replacement in sha1_object_info_extended()
  t6050: show that git cat-file --batch fails with replace objects
  sha1_object_info_extended(): add an "unsigned flags" parameter
  sha1_file.c: add lookup_replace_object_extended() to pass flags
  replace_object: don't check read_replace_refs twice
  rename READ_SHA1_FILE_REPLACE flag to LOOKUP_REPLACE_OBJECT
2014-01-10 10:32:10 -08:00
Junio C Hamano
010d81ae35 Merge branch 'nd/negative-pathspec'
Introduce "negative pathspec" magic, to allow "git log -- . ':!dir'" to
tell us "I am interested in everything but 'dir' directory".

* nd/negative-pathspec:
  pathspec.c: support adding prefix magic to a pathspec with mnemonic magic
  Support pathspec magic :(exclude) and its short form :!
  glossary-content.txt: rephrase magic signature part
2014-01-10 10:31:48 -08:00
Junio C Hamano
932f7e4769 Merge branch 'maint'
* maint:
  Documentation/gitmodules: Only 'update' and 'url' are required
  l10n: de.po: fix translation of 'prefix'
2014-01-06 10:39:07 -08:00
W. Trevor King
43fda9455c Documentation/gitmodules: Only 'update' and 'url' are required
Descriptions for all the settings fell under the initial "Each
submodule section also contains the following required keys:".  The
example shows sections with just 'path' and 'url' entries, which are
indeed required, but we should still make the required/optional
distinction explicit to clarify that the rest of them are optional.

Signed-off-by: W. Trevor King <wking@tremily.us>
Reviewed-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-06 09:08:18 -08:00
Christian Couder
663a8566be replace info: rename 'full' to 'long' and clarify in-code symbols
Enum names SHORT/MEDIUM/FULL were too broad to be descriptive.  And
they clashed with built-in symbols on platforms like Windows.
Clarify by giving them REPLACE_FORMAT_ prefix.

Rename 'full' format in "git replace --format=<name>" to 'long', to
match others (i.e. 'short' and 'medium').

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-30 12:33:11 -08:00
Junio C Hamano
53b2a5ff30 Merge branch 'jk/name-pack-after-byte-representation'
Two packfiles that contain the same set of objects have
traditionally been named identically, but that made repacking a
repository that is already fully packed without any cruft with a
different packing parameter cumbersome. Update the convention to
name the packfile after the bytestream representation of the data,
not after the set of objects in it.

* jk/name-pack-after-byte-representation:
  pack-objects doc: treat output filename as opaque
  pack-objects: name pack files after trailer hash
  sha1write: make buffer const-correct
2013-12-27 14:58:19 -08:00
Junio C Hamano
6904f9aa5b Merge branch 'zk/difftool-counts'
Show the total number of paths and the number of paths shown so far
when "git difftool" prompts to launch an external diff tool, which
would give users some sense of progress.

* zk/difftool-counts:
  diff.c: fix some recent whitespace style violations
  difftool: display the number of files in the diff queue in the prompt
2013-12-27 14:58:13 -08:00
Junio C Hamano
2b0a564e02 Merge branch 'jk/pull-rebase-using-fork-point'
* jk/pull-rebase-using-fork-point:
  rebase: use reflog to find common base with upstream
  pull: use merge-base --fork-point when appropriate
2013-12-27 14:58:08 -08:00
Junio C Hamano
7cdebd8a20 Merge branch 'jc/push-refmap'
Make "git push origin master" update the same ref that would be
updated by our 'master' when "git push origin" (no refspecs) is run
while the 'master' branch is checked out, which makes "git push"
more symmetric to "git fetch" and more usable for the triangular
workflow.

* jc/push-refmap:
  push: also use "upstream" mapping when pushing a single ref
  push: use remote.$name.push as a refmap
  builtin/push.c: use strbuf instead of manual allocation
2013-12-27 14:57:50 -08:00
Roberto Tyley
615b8f1a8d docs: add filter-branch notes on The BFG
The BFG is a tool specifically designed for the task of removing
unwanted data from Git repository history - a common use-case for which
git-filter-branch has been the traditional workhorse.

It's beneficial to let users know that filter-branch has an alternative
here:

* speed : The BFG is 10-50x faster
  http://rtyley.github.io/bfg-repo-cleaner/#speed
* complexity of configuration : filter-branch is a very flexible tool,
  but demands very careful usage in order to get the desired results
  http://rtyley.github.io/bfg-repo-cleaner/#examples

Obviously, filter-branch has it's advantages too - it permits very
complex rewrites, and doesn't require a JVM - but for the common
use-case of deleting unwanted data, it's helpful to users to be aware
that an alternative exists.

The BFG was released under the GPL in February 2013, and has since seen
widespread production use (The Guardian, RedHat, Google, UK Government
Digital Service), been tested against large repos (~300K commits, ~5GB
packfiles) and received significant positive feedback from users:

http://rtyley.github.io/bfg-repo-cleaner/#feedback

Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-18 10:41:41 -08:00
Junio C Hamano
7794a680e6 Sync with 1.8.5.2
* maint:
  Git 1.8.5.2
  cmd_repack(): remove redundant local variable "nr_packs"
2013-12-17 14:12:17 -08:00
Junio C Hamano
b10cd577d8 Update draft release notes to 1.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-17 14:05:50 -08:00
Junio C Hamano
173473c287 Merge branch 'kn/gitweb-extra-branch-refs'
Allow gitweb to be configured to show refs out of refs/heads/ as if
they were branches.

* kn/gitweb-extra-branch-refs:
  gitweb: Denote non-heads, non-remotes branches
  gitweb: Add a feature for adding more branch refs
  gitweb: Return 1 on validation success instead of passed input
  gitweb: Move check-ref-format code into separate function
2013-12-17 12:03:33 -08:00
Junio C Hamano
0067272999 Merge branch 'bc/doc-merge-no-op-revert'
* bc/doc-merge-no-op-revert:
  Documentation: document pitfalls with 3-way merge
2013-12-17 11:47:01 -08:00
Junio C Hamano
4d1826d1d9 Merge branch 'fc/trivial'
* fc/trivial:
  remote: fix status with branch...rebase=preserve
  fetch: add missing documentation
  t: trivial whitespace cleanups
  abspath: trivial style fix
2013-12-17 11:46:32 -08:00
Junio C Hamano
f9633716d0 Merge branch 'kb/doc-exclude-directory-semantics'
* kb/doc-exclude-directory-semantics:
  gitignore.txt: clarify recursive nature of excluded directories
2013-12-17 11:44:19 -08:00
Junio C Hamano
5512ac5840 Git 1.8.5.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-17 11:42:12 -08:00
Junio C Hamano
59f3e3f1e2 Merge branch 'rs/doc-submitting-patches' into maint
* rs/doc-submitting-patches:
  SubmittingPatches: document how to handle multiple patches
2013-12-17 11:38:23 -08:00
Junio C Hamano
5169f5a484 Merge branch 'tr/doc-git-cherry' into maint
* tr/doc-git-cherry:
  Documentation: revamp git-cherry(1)
2013-12-17 11:37:55 -08:00
Junio C Hamano
212607494d Merge branch 'nd/glossary-content-pathspec-markup' into maint
* nd/glossary-content-pathspec-markup:
  glossary-content.txt: fix documentation of "**" patterns
2013-12-17 11:36:54 -08:00
Junio C Hamano
c8394bb466 Merge branch 'jj/doc-markup-gitcli' into maint
* jj/doc-markup-gitcli:
  Documentation/gitcli.txt: fix double quotes
2013-12-17 11:36:38 -08:00
Junio C Hamano
5712dcb209 Merge branch 'jj/doc-markup-hints-in-coding-guidelines' into maint
* jj/doc-markup-hints-in-coding-guidelines:
  State correct usage of literal examples in man pages in the coding standards
2013-12-17 11:36:10 -08:00
Junio C Hamano
ace08c2239 Merge branch 'jj/log-doc' into maint
* jj/log-doc:
  Documentation/git-log.txt: mark-up fix and minor rephasing
  Documentation/git-log: update "--log-size" description
2013-12-17 11:35:41 -08:00
Junio C Hamano
7be001dfbf Merge branch 'jj/rev-list-options-doc' into maint
* jj/rev-list-options-doc:
  Documentation/rev-list-options.txt: fix some grammatical issues and typos
  Documentation/rev-list-options.txt: fix mark-up
2013-12-17 11:34:41 -08:00
Junio C Hamano
e8fcf70cd4 Merge branch 'tb/doc-fetch-pack-url' into maint
* tb/doc-fetch-pack-url:
  git-fetch-pack uses URLs like git-fetch
2013-12-17 11:34:24 -08:00
Junio C Hamano
a4a227a725 Merge branch 'mi/typofixes' into maint
* mi/typofixes:
  contrib: typofixes
  Documentation/technical/http-protocol.txt: typofixes
  typofixes: fix misspelt comments
2013-12-17 11:34:01 -08:00
Jeff King
40a4f5a7bf pack-objects doc: treat output filename as opaque
After 1190a1a (pack-objects: name pack files after trailer hash,
2013-12-05), the SHA-1 used to determine the filename is calculated
differently.  Update the documentation to not guarantee anything more
than that the SHA-1 depends on the pack content somehow.

Hopefully this will discourage readers from depending on the old or
the new calculation.

Reported-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-16 11:36:09 -08:00
Junio C Hamano
d7aced95cd Update draft release notes to 1.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-12 14:24:39 -08:00
Junio C Hamano
72911f8c18 Merge branch 'cn/thin-push-capability'
Allow receive-pack to insist on receiving a fat pack from "git
push" clients.

* cn/thin-push-capability:
  send-pack: don't send a thin pack to a server which doesn't support it
2013-12-12 14:20:32 -08:00
Junio C Hamano
577aed296a Merge branch 'jk/remove-deprecated'
* jk/remove-deprecated:
  stop installing git-tar-tree link
  peek-remote: remove deprecated alias of ls-remote
  lost-found: remove deprecated command
  tar-tree: remove deprecated command
  repo-config: remove deprecated alias for "git config"
2013-12-12 14:18:34 -08:00
Junio C Hamano
fca26a3430 Merge branch 'rs/doc-submitting-patches'
* rs/doc-submitting-patches:
  SubmittingPatches: document how to handle multiple patches
2013-12-12 14:18:29 -08:00
Junio C Hamano
71fe59f880 Merge branch 'tr/doc-git-cherry'
* tr/doc-git-cherry:
  Documentation: revamp git-cherry(1)
2013-12-12 14:18:24 -08:00
Junio C Hamano
e66ef7ae6f Merge branch 'mh/fetch-tags-in-addition-to-normal-refs'
The "--tags" option to "git fetch" used to be literally a synonym to
a "refs/tags/*:refs/tags/*" refspec, which meant that (1) as an
explicit refspec given from the command line, it silenced the lazy
"git fetch" default that is configured, and (2) also as an explicit
refspec given from the command line, it interacted with "--prune"
to remove any tag that the remote we are fetching from does not
have.

This demotes it to an option; with it, we fetch all tags in
addition to what would be fetched without the option, and it does
not interact with the decision "--prune" makes to see what
remote-tracking refs the local has are missing the remote
counterpart.

* mh/fetch-tags-in-addition-to-normal-refs: (23 commits)
  fetch: improve the error messages emitted for conflicting refspecs
  handle_duplicate(): mark error message for translation
  ref_remote_duplicates(): extract a function handle_duplicate()
  ref_remove_duplicates(): simplify loop logic
  t5536: new test of refspec conflicts when fetching
  ref_remove_duplicates(): avoid redundant bisection
  git-fetch.txt: improve description of tag auto-following
  fetch-options.txt: simplify ifdef/ifndef/endif usage
  fetch, remote: properly convey --no-prune options to subprocesses
  builtin/remote.c:update(): use struct argv_array
  builtin/remote.c: reorder function definitions
  query_refspecs(): move some constants out of the loop
  fetch --prune: prune only based on explicit refspecs
  fetch --tags: fetch tags *in addition to* other stuff
  fetch: only opportunistically update references based on command line
  get_expanded_map(): avoid memory leak
  get_expanded_map(): add docstring
  builtin/fetch.c: reorder function definitions
  get_ref_map(): rename local variables
  api-remote.txt: correct section "struct refspec"
  ...
2013-12-12 14:14:10 -08:00
Krzesimir Nowak
8d646a9bac gitweb: Add a feature for adding more branch refs
Allow extra-branch-refs feature to tell gitweb to show refs from
additional hierarchies in addition to branches in the list-of-branches
view.

Signed-off-by: Krzesimir Nowak <krzesimir@endocode.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-12 12:37:37 -08:00
Christian Couder
34a332221c Documentation/git-replace: describe --format option
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-12 11:53:49 -08:00
John Keeping
ad8261d212 rebase: use reflog to find common base with upstream
Commit 15a147e (rebase: use @{upstream} if no upstream specified,
2011-02-09) says:

	Make it default to 'git rebase @{upstream}'. That is also what
	'git pull [--rebase]' defaults to, so it only makes sense that
	'git rebase' defaults to the same thing.

but that isn't actually the case.  Since commit d44e712 (pull: support
rebased upstream + fetch + pull --rebase, 2009-07-19), pull has actually
chosen the most recent reflog entry which is an ancestor of the current
branch if it can find one.

Add a '--fork-point' argument to git-rebase that can be used to trigger
this behaviour.  This option is turned on by default if no non-option
arguments are specified on the command line, otherwise we treat an
upstream specified on the command-line literally.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-10 10:56:30 -08:00
brian m. carlson
c566500032 Documentation: document pitfalls with 3-way merge
Oftentimes people will make the same change in two branches, revert the change
in one branch, and then be surprised when a merge reinstitutes that change when
the branches are merged.  Add an explanatory paragraph that explains that this
occurs and the reason why, so people are not surprised.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 13:42:40 -08:00
Felipe Contreras
379484b551 fetch: add missing documentation
There's no mention of the 'origin' default, or the fact that the
upstream tracking branch remote is used.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 13:24:33 -08:00
Karsten Blees
59856de171 gitignore.txt: clarify recursive nature of excluded directories
Additionally, precedence of negated patterns is exactly as outlined in
the DESCRIPTION section, we don't need to repeat this.

Signed-off-by: Karsten Blees <blees@dcon.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 10:55:48 -08:00
Zoltan Klinger
ee7fb0b1d4 difftool: display the number of files in the diff queue in the prompt
When --prompt option is set, git-difftool displays a prompt for each
modified file to be viewed in an external diff program.  At that
point, it could be useful to display a counter and the total number
of files in the diff queue.

Below is the current difftool prompt for the first of 5 modified files:

    Viewing: 'diff.c'
    Launch 'vimdiff' [Y/n]:

Consider the modified prompt:

    Viewing (1/5): 'diff.c'
    Launch 'vimdiff' [Y/n]:

The current GIT_EXTERNAL_DIFF mechanism does not tell the number of
paths in the diff queue nor the current counter.  To make this
"counter/total" info available for GIT_EXTERNAL_DIFF programs
without breaking existing ones by doing the following:

 - Keep track of the number of paths shown so far in diff_options;

 - Export two new environment variables from run_external_diff() to
   show the total number of paths (from diff_queue_struct) and the
   current value of the counter (from diff_options); and

 - Update git-difftool--helper to use these two environment variables.

Signed-off-by: Zoltan Klinger <zoltan.klinger@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06 14:00:27 -08:00
Nguyễn Thái Ngọc Duy
ef79b1f870 Support pathspec magic :(exclude) and its short form :!
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06 13:00:39 -08:00
Nguyễn Thái Ngọc Duy
8b7cb51a9d glossary-content.txt: rephrase magic signature part
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06 13:00:38 -08:00
Junio C Hamano
077f43447c Start 1.9 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06 11:20:04 -08:00
Junio C Hamano
cb6bd5722f Merge branch 'rr/for-each-ref-decoration'
Add a few formatting directives to "git for-each-ref --format=...",
to paint them in color, etc.

* rr/for-each-ref-decoration:
  for-each-ref: avoid color leakage
  for-each-ref: introduce %(color:...) for color
  for-each-ref: introduce %(upstream:track[short])
  for-each-ref: introduce %(HEAD) asterisk marker
  t6300 (for-each-ref): don't hardcode SHA-1 hexes
  t6300 (for-each-ref): clearly demarcate setup
2013-12-06 11:07:21 -08:00
Junio C Hamano
15a42a10ec Sync with 1.8.5 2013-12-05 14:11:20 -08:00
Junio C Hamano
10167eb251 Merge branch 'jc/ref-excludes'
People often wished a way to tell "git log --branches" (and "git
log --remotes --not --branches") to exclude some local branches
from the expansion of "--branches" (similarly for "--tags", "--all"
and "--glob=<pattern>").  Now they have one.

* jc/ref-excludes:
  rev-parse: introduce --exclude=<glob> to tame wildcards
  rev-list --exclude: export add/clear-ref-exclusion and ref-excluded API
  rev-list --exclude: tests
  document --exclude option
  revision: introduce --exclude=<glob> to tame wildcards
2013-12-05 12:59:09 -08:00
Junio C Hamano
3576f113cb Merge branch 'nv/parseopt-opt-arg'
Enhance "rev-parse --parseopt" mode to help parsing options with
an optional parameter.

* nv/parseopt-opt-arg:
  rev-parse --parseopt: add the --stuck-long mode
  Use the word 'stuck' instead of 'sticked'
2013-12-05 12:59:04 -08:00
Junio C Hamano
07d406b742 Merge branch 'jc/merge-base-reflog'
Code the logic in "pull --rebase" that figures out a fork point
from reflog entries in C.

* jc/merge-base-reflog:
  merge-base: teach "--fork-point" mode
  merge-base: use OPT_CMDMODE and clarify the command line parsing
2013-12-05 12:58:27 -08:00
Junio C Hamano
ca02465b41 push: use remote.$name.push as a refmap
Since f2690487 (fetch: opportunistically update tracking refs,
2013-05-11), we stopped taking a non-storing refspec given on the
command line of "git fetch" literally, and instead started mapping
it via remote.$name.fetch refspecs.  This allows

    $ git fetch origin master

from the 'origin' repository, which is configured with

    [remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*

to update refs/remotes/origin/master with the result, as if the
command line were

    $ git fetch origin +master:refs/remotes/origin/master

to reduce surprises and improve usability.  Before that change, a
refspec on the command line without a colon was only to fetch the
history and leave the result in FETCH_HEAD, without updating the
remote-tracking branches.

When you are simulating a fetch from you by your mothership with a
push by you into your mothership, instead of having:

    [remote "satellite"]
        fetch = +refs/heads/*:refs/remotes/satellite/*

on the mothership repository and running:

    mothership$ git fetch satellite

you would have:

    [remote "mothership"]
        push = +refs/heads/*:refs/remotes/satellite/*

on your satellite machine, and run:

    satellite$ git push mothership

Because we so far did not make the corresponding change to the push
side, this command:

    satellite$ git push mothership master

does _not_ allow you on the satellite to only push 'master' out but
still to the usual destination (i.e. refs/remotes/satellite/master).

Implement the logic to map an unqualified refspec given on the
command line via the remote.$name.push refspec.  This will bring a
bit more symmetry between "fetch" and "push".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-04 15:11:08 -08:00