aboutsummaryrefslogtreecommitdiff
path: root/sha1_name.c
Commit message (Collapse)AuthorAge
...
| * sha1_name.c: restructure disambiguation of short namesJunio C Hamano2012-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We try to find zero, one or more matches from loose objects and packed objects independently and then decide if the given short object name is unique across them. Instead, introduce a "struct disambiguate_state" that keeps track of what we have found so far, that can be one of: - We have seen one object that _could_ be what we are looking for; - We have also checked that object for additional constraints (if any), and found that the object satisfies it; - We have also checked that object for additional constraints (if any), and found that the object does not satisfy it; or - We have seen more than one objects that satisfy the constraints. and pass it to the enumeration functions for loose and packed objects. The disambiguation state can optionally take a callback function that takes a candidate object name and reports if the object satisifies additional criteria (e.g. when the caller knows that the short name must refer to a commit, this mechanism can be used to check the type of the given object). Compared to the earlier attempt, this round avoids the optional check if there is only one candidate that matches the short name in the first place. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: correct misnamed "canonical" and "res"Junio C Hamano2012-07-03
| | | | | | | | | | | | | | | | | | These are hexadecimal and binary representation of the short object name given to the callchain as its input. Rename them with _pfx suffix to make it clear they are prefixes, and call them hex and bin respectively. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: refactor find_short_packed_object()Junio C Hamano2012-07-03
| | | | | | | | | | | | | | | | Extract the logic to find object(s) that match a given prefix inside a single pack into a separate helper function, and give it a bit more comment. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: rename "now" to "current"Junio C Hamano2012-07-03
| | | | | | | | | | | | | | | | This variable points at the element we are currently looking at, and does not have anything to do with the current time which the name "now" implies. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: clarify what "fake" is for in find_short_object_filename()Junio C Hamano2012-07-03
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: get rid of get_sha1_with_mode()Junio C Hamano2012-07-03
| | | | | | | | | | | | | | | | There are only two callers, and they will benefit from being able to pass disambiguation hints to underlying get_sha1_with_context() API once it happens. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: get rid of get_sha1_with_mode_1()Junio C Hamano2012-07-03
| | | | | | | | | | | | | | | | | | The only external caller is setup.c that tries to give a nicer error message when an object name is misspelt (e.g. "HEAD:cashe.h"). Retire it and give the caller a dedicated and more intuitive API function maybe_die_on_misspelt_object_name(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: hide get_sha1_with_context_1() uglinessJunio C Hamano2012-07-02
| | | | | | | | | | | | There is no outside caller that cares about the "only-to-die" ugliness. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name.c: indentation fixJunio C Hamano2012-06-18
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mm/verify-filename-fix'Junio C Hamano2012-06-28
|\ \ | | | | | | | | | | | | "git diff COPYING HEAD:COPYING" gave a nonsense error message that claimed that the treeish HEAD did not have COPYING in it.
| * | sha1_name: do not trigger detailed diagnosis for file argumentsMatthieu Moy2012-06-18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnose_invalid_sha1_path() is meant to be called to diagnose a misspelt <treeish>:<pathname> when <pathname> does not exist in <treeish>. However, the code may call it if <treeish>:<pathname> is invalid (which triggers another call with only_to_die == 1), but for another reason. This happens when calling e.g. git log existing-file HEAD:existing-file because existing-file is a path and not a revision, the code verifies that the arguments that follow to be paths. This leads to an incorrect message like "existing-file does not exist in HEAD", even though the path exists in HEAD. Check that the search for <pathname> in <treeish> fails before triggering the diagnosis. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | i18n: mark @{upstream} error messages for translationZbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Be more specific if upstream branch is not trackedZbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the branch configured as upstream didn't have a local tracking branch, git said "Upstream branch not found". We can be more helpful, and separate the cases when upstream is not configured, and when it is configured, but the upstream branch is not tracked in a local branch. The following configuration leads to the second scenario: [remote "origin"] url = ... fetch = refs/heads/master [branch "master"] remote = origin merge = refs/heads/master 'git pull' will work on master, but master@{upstream} is not defined. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Provide better message for barnhc_wiht_tpyo@{u}Zbigniew Jędrzejewski-Szmek2012-04-15
| | | | | | | | | | | | | | | | | | Instead of just saying that no upstream exists for such branch, which is true but not very helpful, check that there's no refs/heads/barnhc_wiht_tpyo and tell it to the user. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Provide branch name in error message when using @{u}Zbigniew Jędrzejewski-Szmek2012-04-15
|/ | | | | | | | | | | | | | | | | | When using @{u} or @{upstream} it is common to omit the branch name, implying current branch. If the upstream is not configured, the error message was "No upstream branch found for ''". When resolving '@{u}', branch_get() is called, which almost always returns a description of a branch. This allows us to use a branch name in the error message, even if the user said something like '@{u}'. The only case when branch_get() returns NULL is when HEAD points to so something which is not a branch. Of course this also means that no upstream is configured, but it is better to directly say that HEAD does not point to a branch. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jc/broken-ref-dwim-fix'Junio C Hamano2011-10-21
|\ | | | | | | | | | | | | * jc/broken-ref-dwim-fix: resolve_ref(): report breakage to the caller without warning resolve_ref(): expose REF_ISBROKEN flag refs.c: move dwim_ref()/dwim_log() from sha1_name.c
| * refs.c: move dwim_ref()/dwim_log() from sha1_name.cJunio C Hamano2011-10-12
| | | | | | | | | | | | | | | | Both dwim_ref()/dwim_log() functions are intimately related to the ref parsing rules defined in refs.c and better fits there. Move them together with substitute_branch_name(), a file scope static helper function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mh/check-ref-format-3'Junio C Hamano2011-10-10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mh/check-ref-format-3: (23 commits) add_ref(): verify that the refname is formatted correctly resolve_ref(): expand documentation resolve_ref(): also treat a too-long SHA1 as invalid resolve_ref(): emit warnings for improperly-formatted references resolve_ref(): verify that the input refname has the right format remote: avoid passing NULL to read_ref() remote: use xstrdup() instead of strdup() resolve_ref(): do not follow incorrectly-formatted symbolic refs resolve_ref(): extract a function get_packed_ref() resolve_ref(): turn buffer into a proper string as soon as possible resolve_ref(): only follow a symlink that contains a valid, normalized refname resolve_ref(): use prefixcmp() resolve_ref(): explicitly fail if a symlink is not readable Change check_refname_format() to reject unnormalized refnames Inline function refname_format_print() Make collapse_slashes() allocate memory for its result Do not allow ".lock" at the end of any refname component Refactor check_refname_format() Change check_ref_format() to take a flags argument Change bad_ref_char() to return a boolean value ...
| * Change check_ref_format() to take a flags argumentMichael Haggerty2011-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change check_ref_format() to take a flags argument that indicates what is acceptable in the reference name (analogous to "git check-ref-format"'s "--allow-onelevel" and "--refspec-pattern"). This is more convenient for callers and also fixes a failure in the test suite (and likely elsewhere in the code) by enabling "onelevel" and "refspec-pattern" to be allowed independently of each other. Also rename check_ref_format() to check_refname_format() to make it obvious that it deals with refnames rather than references themselves. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Allow git merge ":/<pattern>"Junio C Hamano2011-09-15
|/ | | | | | | | | | | | | It probably is not such a good idea to use ":/<pattern>" to specify which commit to merge, as ":/<pattern>" can often hit unexpected commits, but somebody tried it and got a nonsense error message: fatal: ':/Foo bar' does not point to a commit So here is a for-the-sake-of-consistency update that is fairly useless that allows users to carefully try not shooting in the foot. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jc/magic-pathspec'Junio C Hamano2011-05-23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/magic-pathspec: setup.c: Fix some "symbol not declared" sparse warnings t3703: Skip tests using directory name ":" on Windows revision.c: leave a note for "a lone :" enhancement t3703, t4208: add test cases for magic pathspec rev/path disambiguation: further restrict "misspelled index entry" diag fix overslow :/no-such-string-ever-existed diagnostics fix overstrict :<path> diagnosis grep: use get_pathspec() correctly pathspec: drop "lone : means no pathspec" from get_pathspec() Revert "magic pathspec: add ":(icase)path" to match case insensitively" magic pathspec: add ":(icase)path" to match case insensitively magic pathspec: futureproof shorthand form magic pathspec: add tentative ":/path/from/top/level" pathspec support
| * fix overslow :/no-such-string-ever-existed diagnosticsJunio C Hamano2011-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git cmd :/no-such-string-ever-existed" runs an extra round of get_sha1() since 009fee4 (Detailed diagnosis when parsing an object name fails., 2009-12-07). Once without error diagnosis to see there is no commit with such a string in the log message (hence "it cannot be a ref"), and after seeing that :/no-such-string-ever-existed is not a filename (hence "it cannot be a path, either"), another time to give "better diagnosis". The thing is, the second time it runs, we already know that traversing the history all the way down to the root will _not_ find any matching commit. Rename misguided "gently" parameter, which is turned off _only_ when the "detailed diagnosis" codepath knows that it cannot be a ref and making the call only for the caller to die with a message. Flip its meaning (and adjust the callers) and call it "only_to_die", which is not a great name, but it describes far more clearly what the codepaths that switches their behaviour based on this variable do. On my box, the command spends ~1.8 seconds without the patch to make the report; with the patch it spends ~1.12 seconds. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * fix overstrict :<path> diagnosisJunio C Hamano2011-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given "git log :", we get a disambiguation message that tries to be helpful and yet totally misses the point, i.e. $ git log : fatal: Path '' does not exist (neither on disk nor in the index). $ git log :/ fatal: Path '/' exists on disk, but not in the index. An empty path nor anything that begins with '/' cannot possibly in the index, and it is wrong to guess that the user might have meant to access such an index entry. It should yield the same error message as "git log '*.c'", i.e. $ git log '*.c' fatal: ambiguous argument '*.c': unknown revision or path not in the working tree. Use '--' to separate paths from revisions Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | sha1_name: Suggest commit:./file for path in subdirMichael J Gruber2011-04-03
|/ | | | | | | | Currently, the "Did you mean..." message suggests "commit:fullpath" only. Extend this to show the more convenient "commit:./file" form also. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Revert "core.abbrevguard: Ensure short object names stay unique a bit longer"Junio C Hamano2011-03-10
| | | | | | | | | This reverts commit 72a5b561fc1c4286bc7c5b0693afc076af261e1f, as adding fixed number of hexdigits more than necessary to make one object name locally unique does not help in futureproofing the uniqueness of names we generate today. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'tf/commit-list-prefix'Junio C Hamano2010-12-22
|\ | | | | | | | | | | | | | | * tf/commit-list-prefix: commit: Add commit_list prefix in two function names. Conflicts: sha1_name.c
| * commit: Add commit_list prefix in two function names.Thiago Farina2010-11-29
| | | | | | | | | | | | | | | | Add commit_list prefix to insert_by_date function and to sort_by_date, so it's clear that these functions refer to commit_list structure. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'nd/oneline-sha1-name-from-specific-ref'Junio C Hamano2010-12-21
|\ \ | | | | | | | | | | | | | | | | | | | | | * nd/oneline-sha1-name-from-specific-ref: get_sha1: handle special case $commit^{/} get_sha1: support $commit^{/regex} syntax get_sha1_oneline: make callers prepare the commit list to traverse get_sha1_oneline: fix lifespan rule of temp_commit_buffer variable
| * | get_sha1: handle special case $commit^{/}Nguyễn Thái Ngọc Duy2010-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Empty regex pattern should always match. But the exact behavior of regexec() may vary. Because it always matches anyway, we can just return 'matched' without calling regex machinery. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | get_sha1: support $commit^{/regex} syntaxNguyễn Thái Ngọc Duy2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | This works like ":/regex" syntax that finds a recently created commit starting from all refs, but limits the discovery to those reachable from the named commit. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | get_sha1_oneline: make callers prepare the commit list to traverseNguyễn Thái Ngọc Duy2010-12-12
| | | | | | | | | | | | | | | | | | | | | | | | This gives callers more control, i.e. which ref will be searched from. They must prepare the list ordered by committer date. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | get_sha1_oneline: fix lifespan rule of temp_commit_buffer variableJunio C Hamano2010-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is trying to free only what we ourselves read (as opposed to what we borrowed from commit->buffer) but do so lazily only to work around the fact that the code has many irregular exit points, and doing it right makes it necessary to call free() from many different places in the loop. Rewrite the structure of the code inside the loop so that the variable has to live within a single iteration, ever. This should make the logic easier to follow as well. Also we didn't free a temporary commit list we kept to hold the original set of commits. Free it. Noticed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'nd/extended-sha1-relpath'Junio C Hamano2010-12-16
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | * nd/extended-sha1-relpath: get_sha1: teach ":$n:<path>" the same relative path logic get_sha1: support relative path ":path" syntax Make prefix_path() return char* without const Conflicts: sha1_name.c
| * | get_sha1: teach ":$n:<path>" the same relative path logicJunio C Hamano2010-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We taught the object name parser to take ":./<path>", ":../<path>", etc. and understand them to be relative to the current working directory. Given that ":<path>" is just a short-hand for ":0:<path>" (i.e. "take stage #0 of that path"), we should allow ":$n:<path>" to interpret them the same way. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | get_sha1: support relative path ":path" syntaxNguyễn Thái Ngọc Duy2010-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently :path and ref:path can be used to refer to a specific object in index or ref respectively. "path" component is absolute path. This patch allows "path" to be written as "./path" or "../path", which is relative to user's original cwd. This does not work in commands for which startup_info is NULL (i.e. non-builtin ones, it seems none of them needs this anyway). Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jn/thinner-wrapper'Junio C Hamano2010-12-03
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/thinner-wrapper: Remove pack file handling dependency from wrapper.o pack-objects: mark file-local variable static wrapper: give zlib wrappers their own translation unit strbuf: move strbuf_branchname to sha1_name.c path helpers: move git_mkstemp* to wrapper.c wrapper: move odb_* to environment.c wrapper: move xmmap() to sha1_file.c
| * | | strbuf: move strbuf_branchname to sha1_name.cJonathan Nieder2010-11-10
| |/ / | | | | | | | | | | | | | | | | | | | | | strbuf_branchname is a thin wrapper around interpret_branch_name from sha1_name.o. Most strbuf.o users do not need it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/abbrev-guard'Junio C Hamano2010-12-03
|\ \ \ | |_|/ |/| | | | | | | | * jc/abbrev-guard: core.abbrevguard: Ensure short object names stay unique a bit longer
| * | core.abbrevguard: Ensure short object names stay unique a bit longerJunio C Hamano2010-10-28
| |/ | | | | | | | | | | | | | | | | | | | | Even though git makes sure that it uses enough hexdigits to show an abbreviated object name unambiguously, as more objects are added to the repository over time, a short name that used to be unique will stop being unique. Git uses this many extra hexdigits that are more than necessary to make the object name currently unique, in the hope that its output will stay unique a bit longer. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ks/no-textconv-symlink'Junio C Hamano2010-11-17
|\ \ | |/ |/| | | | | | | | | * ks/no-textconv-symlink: blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
| * blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''Kirill Smelkov2010-09-29
| | | | | | | | | | | | | | | | | | | | We need to get the correct mode when blame reads the source from the working tree, the index, or trees. This allows us to omit running textconv filters on symbolic links. Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru> Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Merge branch 'jc/sha1-name-find-fix' into maintJunio C Hamano2010-08-19
| |\ | | | | | | | | | | | | | | | | | | | | | * jc/sha1-name-find-fix: sha1_name.c: fix parsing of ":/token" syntax Conflicts: sha1_name.c
* | | update comment and documentation for :/foo syntaxMatthieu Moy2010-09-27
| | | | | | | | | | | | | | | | | | | | | | | | The documentation in revisions.txt did not match the implementation, and the comment in sha1_name.c was incomplete. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/maint-reflog-beyond-horizon'Junio C Hamano2010-09-03
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-reflog-beyond-horizon: t1503: fix broken test_must_fail calls rev-parse: tests git rev-parse --verify master@{n}, for various n sha1_name.c: use warning in preference to fprintf(stderr rev-parse: exit with non-zero status if ref@{n} is not valid.
| * | | sha1_name.c: use warning in preference to fprintf(stderrJon Seymour2010-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes sha1_name.c to use warning instead of fprintf(stderr). Trailing newlines from message formats have been removed since warning adds one itself. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | rev-parse: exit with non-zero status if ref@{n} is not valid.Jon Seymour2010-08-24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "The current behaviour of ref@{...} syntax parser is suboptimal: $ git rev-parse --verify jch@{99999} && echo true warning: Log for 'jch' only has 1368 entries. cfb88e9a8d4926b0011ae2dd67e1f57a98f4b768 true It even knows that it is running off the cut-off point; it should just cause the caller to notice that fact. I don't think changing it to error out should cause any harm to existing callers." With this change: $ git rev-parse --verify jch@{99999} || echo false fatal: Log for 'jch' only has 1368 entries. false $ git rev-parse jch@{99999} || echo false fatal: Log for 'jch' only has 1368 entries. false Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/sha1-name-find-fix'Junio C Hamano2010-08-12
|\ \ \ | |/ / |/| / | |/ | | | | | | | | * jc/sha1-name-find-fix: sha1_name.c: fix parsing of ":/token" syntax Conflicts: sha1_name.c
| * sha1_name.c: fix parsing of ":/token" syntaxJunio C Hamano2010-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser tried to clean up the object flags it used while finding commits with matching string, but was not doing a very good job at it. This caused "checkout -b new ':/token'", which internally tries to parse ':/token' twice as an object name, to fail when the commit in question was reachable from only one ref. The mask bits given to pop_most_recent_commit(&list, MASK) means "I have already been on the list to be processed, so please do not place me again even if I am found to be a parent of some other commit on the list." So mark them when we add them to the list at the beginning. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'cp/textconv-cat-file'Junio C Hamano2010-06-27
|\ \ | | | | | | | | | | | | | | | | | | | | | * cp/textconv-cat-file: git-cat-file.txt: Document --textconv t/t8007: test textconv support for cat-file textconv: support for cat_file sha1_name: add get_sha1_with_context()
| * | sha1_name: add get_sha1_with_context()Clément Poulain2010-06-18
| |/ | | | | | | | | | | | | | | | | | | | | Textconv is defined by the diff driver, which is associated with a pathname, not a blob. This fonction permits to know the context for the sha1 you're looking for, especially his pathname Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>