summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'jc/index-v4'Junio C Hamano2012-05-029-91/+300
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivially shrinks the on-disk size of the index file to save both I/O and checksum overhead. The topic should give a solid base to build on further updates, with the code refactoring in its earlier parts, and the backward compatibility mechanism in its later parts. * jc/index-v4: index-v4: document the entry format unpack-trees: preserve the index file version of original update-index: upgrade/downgrade on-disk index version read-cache.c: write prefix-compressed names in the index read-cache.c: read prefix-compressed names in index on-disk version v4 read-cache.c: move code to copy incore to ondisk cache to a helper function read-cache.c: move code to copy ondisk to incore cache to a helper function read-cache.c: report the header version we do not understand read-cache.c: make create_from_disk() report number of bytes it consumed read-cache.c: allow unaligned mapping of the index file cache.h: hide on-disk index details varint: make it available outside the context of pack
| * index-v4: document the entry formatJunio C Hamano2012-04-271-0/+13
| | | | | | | | | | | | | | Document the format so that others can learn from and build on top of the series. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * unpack-trees: preserve the index file version of originalJunio C Hamano2012-04-271-0/+1
| | | | | | | | | | | | | | Otherwise "git checkout $other_branch" (or even "git checkout HEAD") would end up writing the index out in the default format. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * update-index: upgrade/downgrade on-disk index versionJunio C Hamano2012-04-042-1/+19
| | | | | | | | | | | | | | | | With the "--index-version <n>" parameter, write the index out in the specified version. With this, an index file that is written in newer format (say v4) can be downgraded to be read by older versions of Git. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: write prefix-compressed names in the indexJunio C Hamano2012-04-042-10/+58
| | | | | | | | | | | | | | | | | | Teach the code to write the index in the v4 on-disk format. Record the format version of the on-disk index we read from in the index_state, and use the format when writing the new index out. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: read prefix-compressed names in index on-disk version v4Junio C Hamano2012-04-031-7/+51
| | | | | | | | | | | | | | | | | | | | | | Because the entries are sorted by path, adjacent entries in the index tend to share the leading components of them, and it makes sense to only store the differences in later entries. In the v4 on-disk format of the index, each on-disk cache entry stores the number of bytes to be stripped from the end of the previous name, and the bytes to append to the result, to come up with its name. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: move code to copy incore to ondisk cache to a helper functionJunio C Hamano2012-04-031-9/+17
| | | | | | | | | | | | This makes the change in a later patch look less scary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: move code to copy ondisk to incore cache to a helper functionJunio C Hamano2012-04-031-19/+25
| | | | | | | | | | | | This makes the change in a later patch look less scary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: report the header version we do not understandJunio C Hamano2012-04-031-2/+4
| | | | | | | | | | | | | | Instead of just saying "bad index version", report the value we read from the disk. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: make create_from_disk() report number of bytes it consumedJunio C Hamano2012-04-031-3/+6
| | | | | | | | | | | | | | The function is the one that is reading from the data stream. It only is natural to make it responsible for reporting this number, not the caller. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * read-cache.c: allow unaligned mapping of the index fileJunio C Hamano2012-04-031-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | Both the on-disk format v2 and v3 pads the "name" field to the multiple of eight to make sure that various quantities in network long/short type can be accessed with ntohl/ntohs without having to worry about alignment, but this forces us to waste disk I/O bandwidth. Introduce ntoh_s()/ntoh_l() macros that the callers can use as if they were the regular ntohs()/ntohl() on a field that may not be aligned correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * cache.h: hide on-disk index detailsJunio C Hamano2012-04-032-48/+54
| | | | | | | | | | | | | | | | | | | | | | The on-disk format of the index file is a detail whose implementation is neatly encapsulated in read-cache.c; there is no need to expose it to the general public that include the cache.h header file. Also add a prominent mark to read-cache.c to delineate the parts that deal with the index file I/O routines from the remainder of the file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * varint: make it available outside the context of packJunio C Hamano2012-04-033-0/+40
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'master' of https://github.com/git-l10n/git-poJunio C Hamano2012-05-013-931/+1069
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | By Jiang Xin (2) and Ralf Thielow (1) via Jiang Xin * 'master' of https://github.com/git-l10n/git-po: l10n: Update German translation l10n: Update Simplified Chinese translation l10n: Update git.pot (33 new, 24 deleted messages)
| * | l10n: Update German translationRalf Thielow2012-05-021-345/+399
| | | | | | | | | | | | | | | | | | Translate new messages for git master branch. Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
| * | Merge l10n updates from branch 'maint' into masterJiang Xin2012-05-021-717/+984
| |\ \ | | | | | | | | | | | | | | | | | | | | By Ralf Thielow * maint: l10n: Initial German translation
| * | | l10n: Update Simplified Chinese translationJiang Xin2012-04-301-306/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate new messages for git master branch. - sha1_name.c: 4 new messages. - builtin/push.c: 3 new messages. - git-submodule.sh: variable name changed from '$path' to '$sm_path'. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | Merge branch 'maint'Jiang Xin2012-04-281-84/+100
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Jiang Xin * maint: l10n: Update Simplified Chinese translation l10n: Update git.pot (2 new messages)
| * | | | l10n: Update git.pot (33 new, 24 deleted messages)Jiang Xin2012-04-281-334/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes of po/git.pot from v1.7.10 to v1.7.10-382-g62bc8 * 33 new l10n messages at lines: 401, 406, 411, 416, 1602, 1780, 2753, 2766, 2774, 2782, 3403, 3408, 3423, 3428, 3433, 3438, 3443, 3448, 3453, 3458, 3463, 3468, 3473, 3480, 3485, 3490, 3495, 3500, 3505, 3510, 3515, 3520, 3525 * 24 deleted l10n messages at lines: 2740, 3351, 3356, 3371, 3376, 3381, 3386, 3391, 3396, 3401, 3406, 3411, 3416, 3421, 3428, 3433, 3438, 3443, 3448, 3453, 3458, 3463, 3468, 3473 Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | Merge master branch for tracking l10n updates of next releaseJiang Xin2012-04-28207-1907/+7952
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use master branch to track l10n updates for git next release, while use maint branch to track l10n updates for git stable version.
* | \ \ \ \ Sync with v1.7.10.1Junio C Hamano2012-05-019-284/+7636
|\ \ \ \ \ \
| * | | | | | Git 1.7.10.1v1.7.10.1Junio C Hamano2012-05-013-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | Merge branch 'pw/fast-import-dataref-parsing' into maintJunio C Hamano2012-05-012-33/+364
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser in "fast-import" did not diagnose ":9" style references that is not followed by required SP/LF as an error. By Pete Wyckoff * pw/fast-import-dataref-parsing: fast-import: tighten parsing of datarefs
| * \ \ \ \ \ \ Merge branch 'it/fetch-pack-many-refs' into maintJunio C Hamano2012-05-016-6/+162
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git fetch" encounters repositories with too many references, the command line of "fetch-pack" that is run by a helper e.g. remote-curl, may fail to hold all of them. Now such an internal invocation can feed the references through the standard input of "fetch-pack". By Ivan Todoroski * it/fetch-pack-many-refs: remote-curl: main test case for the OS command line overflow fetch-pack: test cases for the new --stdin option remote-curl: send the refs to fetch-pack on stdin fetch-pack: new --stdin option to read refs from stdin Conflicts: t/t5500-fetch-pack.sh
| * \ \ \ \ \ \ \ Merge branch 'jl/maint-submodule-recurse-fetch' into maintJunio C Hamano2012-05-011-3/+3
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git fetch" that recurses into submodules on demand did not check if it needs to go into submodules when non branches (most notably, tags) are fetched. By Jens Lehmann * jl/maint-submodule-recurse-fetch: submodules: recursive fetch also checks new tags for submodule commits
| * \ \ \ \ \ \ \ \ Merge branch 'jc/maint-blame-minimal' into maintJunio C Hamano2012-05-011-0/+1
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git blame" started missing quite a few changes from the origin since we stopped using the diff minimalization by default in v1.7.2 era. Teach "--minimal" option to "git blame" to work around this regression. * jc/maint-blame-minimal: blame: accept --need-minimal
| * \ \ \ \ \ \ \ \ \ Merge branch 'lp/maint-diff-three-dash-with-graph' into maintJunio C Hamano2012-05-013-2/+299
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "log -p --graph" used with "--stat" had a few formatting error. By Lucian Poston * lp/maint-diff-three-dash-with-graph: t4202: add test for "log --graph --stat -p" separator lines log --graph: fix break in graph lines log --graph --stat: three-dash separator should come after graph lines
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'jk/rebase-i-submodule-conflict-only' into maintJunio C Hamano2012-05-012-1/+31
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Giving "--continue" to a conflicted "rebase -i" session skipped a commit that only results in changes to submodules. By John Keeping * jk/rebase-i-submodule-conflict-only: rebase -i continue: don't skip commits that only change submodules
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'maint' of https://github.com/git-l10n/git-poJunio C Hamano2012-05-016-282/+7605
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Byrial Jensen (2) and others via Jiang Xin (1) and Ralf Thielow (1) * 'maint' of https://github.com/git-l10n/git-po: l10n: Initial German translation l10n: Update Simplified Chinese translation l10n: Update git.pot (2 new messages) l10n: Add the German translation team and initialize de.po l10n: Add Danish team (da) to list of teams l10n: New da.po file with 0 translations l10n: Updated pt_PT language
| | * | | | | | | | | | | l10n: Initial German translationRalf Thielow2012-05-011-717/+984
| | | |_|_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helped-by: Thomas Kuchs Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
| | * | | | | | | | | | l10n: Update Simplified Chinese translationJiang Xin2012-04-281-84/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 2 new messages come from git maint branch. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| | * | | | | | | | | | l10n: Update git.pot (2 new messages)Jiang Xin2012-04-281-83/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes of po/git.pot from v1.7.10 to v1.7.10-55-g868d6 * 2 new l10n messages at lines: 1583, 2730 Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| | * | | | | | | | | | Merge maint branch for tracking l10n updates of git stable versionJiang Xin2012-04-2840-213/+779
| | |\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | |/| | | | | | | / / / | | | |_|_|_|_|_|/ / / | | |/| | | | | | | | Use master branch to track l10n updates for git next release, while use maint branch to track l10n updates for git stable version.
| | * | | | | | | | | l10n: Add the German translation team and initialize de.poRalf Thielow2012-04-282-0/+3508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| | * | | | | | | | | l10n: Add Danish team (da) to list of teamsByrial Jensen2012-04-121-0/+4
| | | | | | | | | | |
| | * | | | | | | | | l10n: New da.po file with 0 translationsByrial Jensen2012-04-121-0/+3503
| | | | | | | | | | |
| | * | | | | | | | | l10n: Updated pt_PT languageMarco Sousa2012-04-111-115/+127
| | | | | | | | | | |
* | | | | | | | | | | Merge branch 'ld/git-p4-tags-and-labels'Junio C Hamano2012-04-306-69/+483
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By Luke Diamand * ld/git-p4-tags-and-labels: git p4: fix unit tests git p4: move verbose to base class git p4: Ignore P4EDITOR if it is empty git p4: Squash P4EDITOR in test harness git p4: fix-up "import/export of labels to/from p4" git p4: import/export of labels to/from p4 git p4: Fixing script editor checks
| * | | | | | | | | | | git p4: fix unit testsLuke Diamand2012-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The submit-edit tests relied on P4EDITOR being unset. Set it explicitly to an empty string. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | git p4: move verbose to base classLuke Diamand2012-04-242-28/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The verbose flag is common to all classes, or at least should be. Make it a member of the base Command class, rather than reimplementing for each class. Make option parsing mirror this. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | git p4: Ignore P4EDITOR if it is emptyLuke Diamand2012-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | p4 itself treats an empty value for P4EDITOR as the same as having P4EDITOR unset. Do the same for "git p4". Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | git p4: Squash P4EDITOR in test harnessLuke Diamand2012-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If P4EDITOR is set in the environment, test behavior could be unpredictable. Set it explicitly. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | git p4: fix-up "import/export of labels to/from p4"Luke Diamand2012-04-243-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous one is already in 'next' but was somewhat lacking. The configuration "git-p4.validLabelRegexp" is now called "labelExportRegexp", and its default covers lowercase alphabets as well. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | git p4: import/export of labels to/from p4Luke Diamand2012-04-113-39/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing label import code looks at each commit being imported, and then checks for labels at that commit. This doesn't work in the real world though because it will drop labels applied on changelists that have already been imported, a common pattern. This change adds a new --import-labels option. With this option, at the end of the sync, git p4 gets sets of labels in p4 and git, and then creates a git tag for each missing p4 label. This means that tags created on older changelists are still imported. Tags that could not be imported are added to an ignore list. The same sets of git and p4 tags and labels can also be used to derive a list of git tags to export to p4. This is enabled with --export-labels in 'git p4 submit'. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | git p4: Fixing script editor checksLuke Diamand2012-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If P4EDITOR is defined, the tests will fail when "git p4" starts an editor. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'nh/empty-rebase'Junio C Hamano2012-04-309-19/+193
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git rebase" learned to optionally keep commits that do not introduce any change in the original history. By Neil Horman * nh/empty-rebase: git-rebase: add keep_empty flag git-cherry-pick: Add test to validate new options git-cherry-pick: Add keep-redundant-commits option git-cherry-pick: add allow-empty option
| * | | | | | | | | | | | git-rebase: add keep_empty flagNeil Horman2012-04-244-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a command line switch to git-rebase to allow a user the ability to specify that they want to keep any commits in a series that are empty. When git-rebase's type is am, then this option will automatically keep any commit that has a tree object identical to its parent. This patch changes the default behavior of interactive rebases as well. With this patch, git-rebase -i will produce a revision set passed to git-revision-editor, in which empty commits are commented out. Empty commits may be kept manually by uncommenting them. If the new --keep-empty option is used in an interactive rebase the empty commits will automatically all be uncommented in the editor. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | git-cherry-pick: Add test to validate new optionsNeil Horman2012-04-241-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we've added the --allow-empty and --keep-redundant-commits options to git cherry-pick we should also add a test to ensure that its working properly. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | git-cherry-pick: Add keep-redundant-commits optionNeil Horman2012-04-244-13/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git-cherry-pick --allow-empty command by default only preserves empty commits that were originally empty, i.e only those commits for which <commit>^{tree} and <commit>^^{tree} are equal. By default commits which are non-empty, but were made empty by the inclusion of a prior commit on the current history are filtered out. This option allows us to override that behavior and include redundant commits as empty commits in the change history. Note that this patch changes the default behavior of git cherry-pick slightly. Prior to this patch all commits in a cherry-pick sequence were applied and git commit was run. The implication here was that, if a commit was redundant, and the commit did not trigger the fast forward logic, the git commit operation, and therefore the git cherry-pick operation would fail, displaying the cherry pick advice (i.e. run git commit --allow-empty). With this patch however, such redundant commits are automatically skipped without stopping, unless --keep-redundant-commits is specified, in which case, they are automatically applied as empty commits. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | git-cherry-pick: add allow-empty optionNeil Horman2012-04-114-2/+17
| | |_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git cherry-pick fails when picking a non-ff commit that is empty. The advice given with the failure is that a git-commit --allow-empty should be issued to explicitly add the empty commit during the cherry pick. This option allows a user to specify before hand that they want to keep the empty commit. This eliminates the need to issue both a cherry pick and a commit operation. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>